Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.swing.text.StyleConstants
public class StyleConstants
extends Object
AttributeSet
.
Nested Class Summary | |
static class |
|
static class |
|
static class |
|
static class |
|
Method Summary | |
static int |
|
static Color |
|
static int |
|
static Component |
|
static float |
|
static String |
|
static int |
|
static Color |
|
static Icon |
|
static float |
|
static float |
|
static float |
|
static float |
|
static float |
|
static TabSet |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
String |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public static final int ALIGN_CENTER
A value representing center alignment for theStyleConstants.ParagraphConstants.Alignment
attribute.
- Field Value:
- 1
public static final int ALIGN_JUSTIFIED
A value representing ful justification for theStyleConstants.ParagraphConstants.Alignment
attribute.
- Field Value:
- 3
public static final int ALIGN_LEFT
A value representing left alignment for theStyleConstants.ParagraphConstants.Alignment
attribute.
- Field Value:
- 0
public static final int ALIGN_RIGHT
A value representing right alignment for theStyleConstants.ParagraphConstants.Alignment
attribute.
- Field Value:
- 2
public static final Object Alignment
An alias forStyleConstants.ParagraphConstants.Alignment
.
public static final Object Background
An alias forStyleConstants.CharacterConstants.Background
.
public static final Object BidiLevel
An alias forStyleConstants.CharacterConstants.BidiLevel
.
public static final Object ComponentAttribute
An alias forStyleConstants.CharacterConstants.ComponentAttribute
.
public static final Object FirstLineIndent
An alias forStyleConstants.ParagraphConstants.FirstLineIndent
.
public static final Object FontFamily
An alias forStyleConstants.CharacterConstants.Family
.
public static final Object Foreground
An alias forStyleConstants.CharacterConstants.Foreground
.
public static final Object IconAttribute
An alias forStyleConstants.CharacterConstants.IconAttribute
.
public static final Object LeftIndent
An alias forStyleConstants.ParagraphConstants.LeftIndent
.
public static final Object LineSpacing
An alias forStyleConstants.ParagraphConstants.LineSpacing
.
public static final Object Orientation
An alias forStyleConstants.ParagraphConstants.Orientation
.
public static final Object RightIndent
An alias forStyleConstants.ParagraphConstants.RightIndent
.
public static final Object SpaceAbove
An alias forStyleConstants.ParagraphConstants.SpaceAbove
.
public static final Object SpaceBelow
An alias forStyleConstants.ParagraphConstants.SpaceBelow
.
public static final Object StrikeThrough
An alias forStyleConstants.CharacterConstants.StrikeThrough
.
public static final Object Subscript
An alias forStyleConstants.CharacterConstants.Subscript
.
public static final Object Superscript
An alias forStyleConstants.CharacterConstants.Superscript
.
public static final Object Underline
An alias forStyleConstants.CharacterConstants.Underline
.
public static int getAlignment(AttributeSet a)
Returns the alignment specified in the given attributes, orALIGN_LEFT
if no alignment is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The alignment (typically one of
ALIGN_LEFT
,ALIGN_RIGHT
,ALIGN_CENTER
orALIGN_JUSTIFIED
).
public static Color getBackground(AttributeSet a)
Returns the background color specified in the given attributes, orColor.BLACK
if no background color is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The background color.
public static int getBidiLevel(AttributeSet a)
Returns the bidi level specified in the given attributes, or0
if no bidi level is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The bidi level.
public static Component getComponent(AttributeSet a)
Returns the component specified in the given attributes, ornull
if no component is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The component (possibly
null
).
public static float getFirstLineIndent(AttributeSet a)
Returns the indentation specified in the given attributes, or0.0f
if no indentation is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The indentation.
public static String getFontFamily(AttributeSet a)
Returns the font family specified in the given attributes, orMonospaced
if no font family is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The font family.
public static int getFontSize(AttributeSet a)
Returns the font size specified in the given attributes, or12
if no font size is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The font size.
- See Also:
setFontSize(MutableAttributeSet,int)
public static Color getForeground(AttributeSet a)
Returns the foreground color specified in the given attributes, orColor.BLACK
if no foreground color is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The foreground color.
public static Icon getIcon(AttributeSet a)
Returns the icon specified in the given attributes, ornull
if no icon is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The icon (possibly
null
).
- See Also:
setIcon(MutableAttributeSet,Icon)
public static float getLeftIndent(AttributeSet a)
Returns the left indentation specified in the given attributes, or0.0f
if no left indentation is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The left indentation.
public static float getLineSpacing(AttributeSet a)
Returns the line spacing specified in the given attributes, or0.0f
if no line spacing is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The line spacing.
public static float getRightIndent(AttributeSet a)
Returns the right indentation specified in the given attributes, or0.0f
if no right indentation is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The right indentation.
public static float getSpaceAbove(AttributeSet a)
Returns the 'space above' specified in the given attributes, or0.0f
if no 'space above' is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The 'space above'.
public static float getSpaceBelow(AttributeSet a)
Returns the 'space below' specified in the given attributes, or0.0f
if no 'space below' is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The 'space below'.
public static TabSet getTabSet(AttributeSet a)
Returns the tab set specified in the given attributes, ornull
if no tab set is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The tab set.
public static boolean isBold(AttributeSet a)
Returns the value of the bold flag in the given attributes, orfalse
if no bold flag is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The bold flag.
- See Also:
setBold(MutableAttributeSet,boolean)
public static boolean isItalic(AttributeSet a)
Returns the value of the italic flag in the given attributes, orfalse
if no italic flag is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The italic flag.
public static boolean isStrikeThrough(AttributeSet a)
Returns the value of the strike-through flag in the given attributes, orfalse
if no strike-through flag is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The strike-through flag.
public static boolean isSubscript(AttributeSet a)
Returns the value of the subscript flag in the given attributes, orfalse
if no subscript flag is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The subscript flag.
public static boolean isSuperscript(AttributeSet a)
Returns the value of the superscript flag in the given attributes, orfalse
if no superscript flag is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The superscript flag.
public static boolean isUnderline(AttributeSet a)
Returns the value of the underline flag in the given attributes, orfalse
if no underline flag is specified.
- Parameters:
a
- the attribute set (null
not permitted).
- Returns:
- The underline flag.
public static void setAlignment(MutableAttributeSet a, int align)
Adds an alignment attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).align
- the alignment (typically one ofALIGN_LEFT
,ALIGN_RIGHT
,ALIGN_CENTER
orALIGN_JUSTIFIED
).
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getAlignment(AttributeSet)
public static void setBackground(MutableAttributeSet a, Color bg)
Adds a background attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).bg
- the background (null
not permitted).
- Throws:
NullPointerException
- if either argument isnull
.
- See Also:
getBackground(AttributeSet)
public static void setBidiLevel(MutableAttributeSet a, int lev)
Adds a bidi-level attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).lev
- the level.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getBidiLevel(AttributeSet)
public static void setBold(MutableAttributeSet a, boolean b)
Adds a bold attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).b
- the new value of the bold attribute.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
isBold(AttributeSet)
public static void setComponent(MutableAttributeSet a, Component c)
Adds a component attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).c
- the component (null
not permitted).
- Throws:
NullPointerException
- if either argument isnull
.
- See Also:
getComponent(AttributeSet)
public static void setFirstLineIndent(MutableAttributeSet a, float i)
Adds a first line indentation attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).i
- the indentation.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getFirstLineIndent(AttributeSet)
public static void setFontFamily(MutableAttributeSet a, String fam)
Adds a font family attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).fam
- the font family name (null
not permitted).
- Throws:
NullPointerException
- if either argument isnull
.
- See Also:
getFontFamily(AttributeSet)
public static void setFontSize(MutableAttributeSet a, int s)
Adds a font size attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).s
- the font size (in points).
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getFontSize(AttributeSet)
public static void setForeground(MutableAttributeSet a, Color fg)
Adds a foreground color attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).fg
- the foreground color (null
not permitted).
- Throws:
NullPointerException
- if either argument isnull
.
- See Also:
getForeground(AttributeSet)
public static void setIcon(MutableAttributeSet a, Icon c)
Adds an icon attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).c
- the icon (null
not permitted).
- Throws:
NullPointerException
- if either argument isnull
.
- See Also:
getIcon(AttributeSet)
public static void setItalic(MutableAttributeSet a, boolean b)
Adds an italic attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).b
- the new value of the italic attribute.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
isItalic(AttributeSet)
public static void setLeftIndent(MutableAttributeSet a, float i)
Adds a left indentation attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).i
- the indentation.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getLeftIndent(AttributeSet)
public static void setLineSpacing(MutableAttributeSet a, float i)
Adds a line spacing attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).i
- the line spacing.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getLineSpacing(AttributeSet)
public static void setRightIndent(MutableAttributeSet a, float i)
Adds a right indentation attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).i
- the right indentation.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getRightIndent(AttributeSet)
public static void setSpaceAbove(MutableAttributeSet a, float i)
Adds a 'space above' attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).i
- the space above attribute value.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getSpaceAbove(AttributeSet)
public static void setSpaceBelow(MutableAttributeSet a, float i)
Adds a 'space below' attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).i
- the space below attribute value.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
getSpaceBelow(AttributeSet)
public static void setStrikeThrough(MutableAttributeSet a, boolean b)
Adds a strike-through attribue to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).b
- the strike-through attribute value.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
isStrikeThrough(AttributeSet)
public static void setSubscript(MutableAttributeSet a, boolean b)
Adds a subscript attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).b
- the subscript attribute value.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
isSubscript(AttributeSet)
public static void setSuperscript(MutableAttributeSet a, boolean b)
Adds a superscript attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).b
- the superscript attribute value.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
isSuperscript(AttributeSet)
public static void setTabSet(MutableAttributeSet a, TabSet tabs)
Adds aTabSet
attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).tabs
- the tab set (null
not permitted).
- Throws:
NullPointerException
- if either argument isnull
.
- See Also:
getTabSet(AttributeSet)
public static void setUnderline(MutableAttributeSet a, boolean b)
Adds an underline attribute to the specified set.
- Parameters:
a
- the attribute set (null
not permitted).b
- the underline attribute value.
- Throws:
NullPointerException
- ifa
isnull
.
- See Also:
isUnderline(AttributeSet)