All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.text.StyleConstants

java.lang.Object
    |
    +----java.awt.swing.text.StyleConstants

public class StyleConstants
extends Object

A collection of well known or common attribute names and methods to apply to an AttributeSet or MutableAttributeSet to get/set the properties in a typesafe manner.

The paragraph attributes form the definition of a paragraph to be rendered. All sizes are specified in points (such as found in postscript), a device independent measure.


Variable Index

 o ALIGN_CENTER
A possible value for paragraph alignment.
 o ALIGN_JUSTIFIED
A possible value for paragraph alignment.
 o ALIGN_LEFT
A possible value for paragraph alignment.
 o ALIGN_RIGHT
A possible value for paragraph alignment.
 o Alignment
Alignment for the paragraph.
 o Background
Name of the background color attribute.
 o Bold
Name of the bold attribute.
 o ComponentAttribute
Name of the component attribute.
 o ComponentElementName
Name of elements used to represent components.
 o FirstLineIndent
The amount of space to indent the first line of the paragraph.
 o FontFamily
Name of the font family.
 o FontSize
Name of the font size.
 o Foreground
Name of the foreground color attribute.
 o IconAttribute
Name of the icon attribute.
 o IconElementName
Name of elements used to represent icons.
 o Italic
Name of the italic attribute.
 o LeftIndent
The amount to indent the left side of the paragraph.
 o LineSpacing
The amount of space between lines of the paragraph.
 o RightIndent
The amount to indent the right side of the paragraph.
 o SpaceAbove
The amount of space above the paragraph.
 o SpaceBelow
The amount of space below the paragraph.
 o Underline
Name of the underline attribute.

Constructor Index

 o StyleConstants()

Method Index

 o getAlignment(AttributeSet)
Gets alignment.
 o getComponent(AttributeSet)
Gets the component from the attribute list.
 o getFirstLineIndent(AttributeSet)
Gets the first line indent.
 o getFontFamily(AttributeSet)
Gets the font family from the attribute list.
 o getFontSize(AttributeSet)
Gets the font size from the attribute list.
 o getForeground(AttributeSet)
Gets the foreground color from the attribute list.
 o getIcon(AttributeSet)
Gets the icon from the attribute list.
 o getLeftIndent(AttributeSet)
Gets left indent.
 o getLineSpacing(AttributeSet)
Gets line spacing.
 o getRightIndent(AttributeSet)
Gets right indent.
 o getSpaceAbove(AttributeSet)
Gets space above.
 o getSpaceBelow(AttributeSet)
Gets space below.
 o isBold(AttributeSet)
Checks whether the bold attribute is set.
 o isItalic(AttributeSet)
Checks whether the italic attribute is set.
 o isUnderline(AttributeSet)
Checks whether the underline attribute is set.
 o setAlignment(MutableAttributeSet, int)
Sets alignment.
 o setBold(MutableAttributeSet, boolean)
Sets the bold attribute.
 o setComponent(MutableAttributeSet, Component)
Sets the component attribute.
 o setFirstLineIndent(MutableAttributeSet, float)
Sets the first line indent.
 o setFontFamily(MutableAttributeSet, String)
Sets the font attribute.
 o setFontSize(MutableAttributeSet, int)
Sets the font size attribute.
 o setForeground(MutableAttributeSet, Color)
Sets the foreground color.
 o setIcon(MutableAttributeSet, Icon)
Sets the icon attribute.
 o setItalic(MutableAttributeSet, boolean)
Sets the italic attribute.
 o setLeftIndent(MutableAttributeSet, float)
Sets left indent.
 o setLineSpacing(MutableAttributeSet, float)
Sets line spacing.
 o setRightIndent(MutableAttributeSet, float)
Sets right indent.
 o setSpaceAbove(MutableAttributeSet, float)
Sets space above.
 o setSpaceBelow(MutableAttributeSet, float)
Sets space below.
 o setUnderline(MutableAttributeSet, boolean)
Sets the underline attribute.

Variables

 o ComponentElementName
public static final String ComponentElementName
Name of elements used to represent components.

 o IconElementName
public static final String IconElementName
Name of elements used to represent icons.

 o FontFamily
public static final String FontFamily
Name of the font family.

 o FontSize
public static final String FontSize
Name of the font size.

 o Bold
public static final String Bold
Name of the bold attribute.

 o Italic
public static final String Italic
Name of the italic attribute.

 o Underline
public static final String Underline
Name of the underline attribute.

 o Foreground
public static final String Foreground
Name of the foreground color attribute.

 o Background
public static final String Background
Name of the background color attribute.

 o ComponentAttribute
public static final String ComponentAttribute
Name of the component attribute.

 o IconAttribute
public static final String IconAttribute
Name of the icon attribute.

 o FirstLineIndent
public static final String FirstLineIndent
The amount of space to indent the first line of the paragraph. This value may be negative to offset in the reverse direction. The type is Float and specifies the size of the space in points.

 o LeftIndent
public static final String LeftIndent
The amount to indent the left side of the paragraph. Type is float and specifies the size in points.

 o RightIndent
public static final String RightIndent
The amount to indent the right side of the paragraph. Type is float and specifies the size in points.

 o LineSpacing
public static final String LineSpacing
The amount of space between lines of the paragraph. Type is float and specifies the size in points.

 o SpaceAbove
public static final String SpaceAbove
The amount of space above the paragraph. Type is float and specifies the size in points.

 o SpaceBelow
public static final String SpaceBelow
The amount of space below the paragraph. Type is float and specifies the size in points.

 o Alignment
public static final String Alignment
Alignment for the paragraph. The type is Integer. Valid values are:

 o ALIGN_LEFT
public static final int ALIGN_LEFT
A possible value for paragraph alignment. This specifies that the text aligned to the left indent and extra whitespace should be placed on the right.

 o ALIGN_CENTER
public static final int ALIGN_CENTER
A possible value for paragraph alignment. This specifies that the text aligned to the center and extra whitespace should be placed equally on the left and right.

 o ALIGN_RIGHT
public static final int ALIGN_RIGHT
A possible value for paragraph alignment. This specifies that the text aligned to the right indent and extra whitespace should be placed on the left.

 o ALIGN_JUSTIFIED
public static final int ALIGN_JUSTIFIED
A possible value for paragraph alignment. This specifies that extra whitespace should be spread out through the rows of the paragraph with the text lined up with the left and right indent except on the last line which should be aligned to the left.

Constructors

 o StyleConstants
public StyleConstants()

Methods

 o getComponent
public static Component getComponent(AttributeSet a)
Gets the component from the attribute list.

Parameters:
a - the attribute set
Returns:
the component
 o setComponent
public static void setComponent(MutableAttributeSet a,
                                Component c)
Sets the component attribute.

Parameters:
a - the attribute set
c - the component
 o getIcon
public static Icon getIcon(AttributeSet a)
Gets the icon from the attribute list.

Parameters:
a - the attribute set
Returns:
the icon
 o setIcon
public static void setIcon(MutableAttributeSet a,
                           Icon c)
Sets the icon attribute.

Parameters:
a - the attribute set
c - the icon
 o getFontFamily
public static String getFontFamily(AttributeSet a)
Gets the font family from the attribute list.

Parameters:
a - the attribute set
Returns:
the font family
 o setFontFamily
public static void setFontFamily(MutableAttributeSet a,
                                 String fam)
Sets the font attribute.

Parameters:
a - the attribute set
fam - the font
 o getFontSize
public static int getFontSize(AttributeSet a)
Gets the font size from the attribute list.

Parameters:
a - the attribute set
Returns:
the font size
 o setFontSize
public static void setFontSize(MutableAttributeSet a,
                               int s)
Sets the font size attribute.

Parameters:
a - the attribute set
s - the font size
 o isBold
public static boolean isBold(AttributeSet a)
Checks whether the bold attribute is set.

Parameters:
a - the attribute set
Returns:
true if set else false
 o setBold
public static void setBold(MutableAttributeSet a,
                           boolean b)
Sets the bold attribute.

Parameters:
a - the attribute set
b - specifies true/false for setting the attribute
 o isItalic
public static boolean isItalic(AttributeSet a)
Checks whether the italic attribute is set.

Parameters:
a - the attribute set
Returns:
true if set else false
 o setItalic
public static void setItalic(MutableAttributeSet a,
                             boolean b)
Sets the italic attribute.

Parameters:
a - the attribute set
b - specifies true/false for setting the attribute
 o isUnderline
public static boolean isUnderline(AttributeSet a)
Checks whether the underline attribute is set.

Parameters:
a - the attribute set
Returns:
true if set else false
 o setUnderline
public static void setUnderline(MutableAttributeSet a,
                                boolean b)
Sets the underline attribute.

Parameters:
a - the attribute set
b - specifies true/false for setting the attribute
 o getForeground
public static Color getForeground(AttributeSet a)
Gets the foreground color from the attribute list.

Parameters:
a - the attribute set
Returns:
the color
 o setForeground
public static void setForeground(MutableAttributeSet a,
                                 Color fg)
Sets the foreground color.

Parameters:
a - the attribute set
fg - the color
 o getFirstLineIndent
public static float getFirstLineIndent(AttributeSet a)
Gets the first line indent.

Parameters:
a - the attribute set
 o setFirstLineIndent
public static void setFirstLineIndent(MutableAttributeSet a,
                                      float i)
Sets the first line indent.

Parameters:
a - the attribute set
i - the value
 o getRightIndent
public static float getRightIndent(AttributeSet a)
Gets right indent.

Parameters:
a - the attribute set
 o setRightIndent
public static void setRightIndent(MutableAttributeSet a,
                                  float i)
Sets right indent.

Parameters:
a - the attribute set
i - the value
 o getLeftIndent
public static float getLeftIndent(AttributeSet a)
Gets left indent.

Parameters:
a - the attribute set
 o setLeftIndent
public static void setLeftIndent(MutableAttributeSet a,
                                 float i)
Sets left indent.

Parameters:
a - the attribute set
i - the value
 o getLineSpacing
public static float getLineSpacing(AttributeSet a)
Gets line spacing.

Parameters:
a - the attribute set
 o setLineSpacing
public static void setLineSpacing(MutableAttributeSet a,
                                  float i)
Sets line spacing.

Parameters:
a - the attribute set
i - the value
 o getSpaceAbove
public static float getSpaceAbove(AttributeSet a)
Gets space above.

Parameters:
a - the attribute set
 o setSpaceAbove
public static void setSpaceAbove(MutableAttributeSet a,
                                 float i)
Sets space above.

Parameters:
a - the attribute set
i - the value
 o getSpaceBelow
public static float getSpaceBelow(AttributeSet a)
Gets space below.

Parameters:
a - the attribute set
 o setSpaceBelow
public static void setSpaceBelow(MutableAttributeSet a,
                                 float i)
Sets space below.

Parameters:
a - the attribute set
i - the value
 o getAlignment
public static int getAlignment(AttributeSet a)
Gets alignment.

Parameters:
a - the attribute set
 o setAlignment
public static void setAlignment(MutableAttributeSet a,
                                int align)
Sets alignment.

Parameters:
a - the attribute set
align - the alignment value

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature