|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alee.extended.label.StyleRange
public class StyleRange
This class represents custom text style for WebStyledLabel component. It contains various style settings supported by the styled label UI.
WebStyledLabel
Field Summary | |
---|---|
protected java.awt.Color |
background
Text background. |
protected java.util.List<CustomStyle> |
customStyles
Custom text styles. |
protected java.awt.Color |
foreground
Text foreground. |
protected int |
length
Text style length. |
protected int |
startIndex
Text style start index. |
protected int |
style
Basic text style. |
Constructor Summary | |
---|---|
StyleRange(int startIndex,
int length,
java.awt.Color foreground,
java.awt.Color background,
CustomStyle... customStyles)
Constructs new StyleRange with the specified settings |
|
StyleRange(int startIndex,
int length,
java.awt.Color foreground,
CustomStyle... customStyles)
Constructs new StyleRange with the specified settings |
|
StyleRange(int startIndex,
int length,
CustomStyle... customStyles)
Constructs new empty StyleRange. |
|
StyleRange(int startIndex,
int length,
int style,
java.awt.Color foreground,
java.awt.Color background,
CustomStyle... customStyles)
Constructs new StyleRange with the specified settings |
|
StyleRange(int startIndex,
int length,
int style,
java.awt.Color foreground,
CustomStyle... customStyles)
Constructs new StyleRange with the specified settings |
|
StyleRange(int startIndex,
int length,
int style,
CustomStyle... customStyles)
Constructs new StyleRange with the specified settings |
|
StyleRange(StyleRange styleRange)
Constructs new StyleRange based on another StyleRange settings. |
Method Summary | |
---|---|
java.awt.Color |
getBackground()
Returns background color. |
java.util.List<CustomStyle> |
getCustomStyle()
Returns custom styles applied to the text. |
protected static CustomStyle[] |
getCustomStyles(StyleRange styleRange)
Returns custom styles array. |
java.awt.Color |
getForeground()
Returns foreground color. |
int |
getLength()
Returns text style length. |
int |
getStartIndex()
Returns text style start index. |
int |
getStyle()
Returns basic text style. |
boolean |
isDoubleStrikeThrough()
Returns whether the text is double strike through or not. |
boolean |
isStrikeThrough()
Returns whether the text is strike through or not. |
boolean |
isSubscript()
Returns whether the text is subscript or not. |
boolean |
isSuperscript()
Returns whether the text is superscript or not. |
boolean |
isUnderlined()
Returns whether the text is underlined or not. |
boolean |
isWaved()
Returns whether the line is waved or not. |
void |
setLength(int length)
Sets text style length. |
void |
setStartIndex(int startIndex)
Sets text style start index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int startIndex
protected int length
protected java.awt.Color foreground
protected java.awt.Color background
protected int style
protected java.util.List<CustomStyle> customStyles
CustomStyle
Constructor Detail |
---|
public StyleRange(StyleRange styleRange)
styleRange
- style rangepublic StyleRange(int startIndex, int length, CustomStyle... customStyles)
startIndex
- text style start indexlength
- text style lengthcustomStyles
- custom text stylespublic StyleRange(int startIndex, int length, int style, CustomStyle... customStyles)
startIndex
- text style start indexlength
- text style lengthstyle
- basic text stylecustomStyles
- custom text stylespublic StyleRange(int startIndex, int length, java.awt.Color foreground, CustomStyle... customStyles)
startIndex
- text style start indexlength
- text style lengthforeground
- text foreground colorcustomStyles
- custom text stylespublic StyleRange(int startIndex, int length, java.awt.Color foreground, java.awt.Color background, CustomStyle... customStyles)
startIndex
- text style start indexlength
- text style lengthforeground
- text foreground colorbackground
- text background colorcustomStyles
- custom text stylespublic StyleRange(int startIndex, int length, int style, java.awt.Color foreground, CustomStyle... customStyles)
startIndex
- text style start indexlength
- text style lengthstyle
- basic text styleforeground
- text foreground colorcustomStyles
- custom text stylespublic StyleRange(int startIndex, int length, int style, java.awt.Color foreground, java.awt.Color background, CustomStyle... customStyles)
startIndex
- text style start indexlength
- text style lengthstyle
- basic text styleforeground
- text foreground colorbackground
- text background colorcustomStyles
- custom text stylesMethod Detail |
---|
public int getStartIndex()
public void setStartIndex(int startIndex)
startIndex
- new text style start indexpublic int getLength()
public void setLength(int length)
length
- new text style lengthpublic int getStyle()
public java.awt.Color getForeground()
public java.awt.Color getBackground()
public boolean isStrikeThrough()
public boolean isDoubleStrikeThrough()
public boolean isWaved()
public boolean isUnderlined()
public boolean isSuperscript()
public boolean isSubscript()
public java.util.List<CustomStyle> getCustomStyle()
protected static CustomStyle[] getCustomStyles(StyleRange styleRange)
styleRange
- style range
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |