java.lang.Object | |
↳ | javax.swing.text.StyleConstants |
![]() |
A collection of well known or common attribute keys 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.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StyleConstants.CharacterConstants | This is a typesafe enumeration of the well-known attributes that contribute to a character style. | ||||||||||
StyleConstants.ColorConstants | This is a typesafe enumeration of the well-known attributes that contribute to a color. | ||||||||||
StyleConstants.FontConstants | This is a typesafe enumeration of the well-known attributes that contribute to a font. | ||||||||||
StyleConstants.ParagraphConstants | This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ALIGN_CENTER | A possible value for paragraph alignment. | |||||||||
int | ALIGN_JUSTIFIED | A possible value for paragraph alignment. | |||||||||
int | ALIGN_LEFT | A possible value for paragraph alignment. | |||||||||
int | ALIGN_RIGHT | A possible value for paragraph alignment. | |||||||||
String | ComponentElementName | Name of elements used to represent components. | |||||||||
String | IconElementName | Name of elements used to represent icons. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Alignment | Alignment for the paragraph. | ||||||||||
Background | Name of the background color attribute. | ||||||||||
BidiLevel | Bidirectional level of a character as assigned by the Unicode bidi algorithm. | ||||||||||
Bold | Name of the bold attribute. | ||||||||||
ComponentAttribute | Name of the component attribute. | ||||||||||
ComposedTextAttribute | Name of the input method composed text attribute. | ||||||||||
Family | Name of the font family. | ||||||||||
FirstLineIndent | The amount of space to indent the first line of the paragraph. | ||||||||||
FontFamily | Name of the font family. | ||||||||||
FontSize | Name of the font size. | ||||||||||
Foreground | Name of the foreground color attribute. | ||||||||||
IconAttribute | Name of the icon attribute. | ||||||||||
Italic | Name of the italic attribute. | ||||||||||
LeftIndent | The amount to indent the left side of the paragraph. | ||||||||||
LineSpacing | The amount of space between lines of the paragraph. | ||||||||||
ModelAttribute | Attribute used to identify the model for embedded objects that have a model view separation. | ||||||||||
NameAttribute | Attribute name used to name the collection of attributes. | ||||||||||
Orientation | Orientation for a paragraph. | ||||||||||
ResolveAttribute | Attribute name used to identifiy the resolving parent set of attributes, if one is defined. | ||||||||||
RightIndent | The amount to indent the right side of the paragraph. | ||||||||||
Size | Name of the font size. | ||||||||||
SpaceAbove | The amount of space above the paragraph. | ||||||||||
SpaceBelow | The amount of space below the paragraph. | ||||||||||
StrikeThrough | Name of the Strikethrough attribute. | ||||||||||
Subscript | Name of the Subscript attribute. | ||||||||||
Superscript | Name of the Superscript attribute. | ||||||||||
TabSet | TabSet for the paragraph, type is a TabSet containing TabStops. | ||||||||||
Underline | Name of the underline attribute. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the alignment setting.
| |||||||||||
Gets the background color setting from the attribute list.
| |||||||||||
Gets the BidiLevel setting.
| |||||||||||
Gets the component setting from the attribute list.
| |||||||||||
Gets the first line indent setting.
| |||||||||||
Gets the font family setting from the attribute list.
| |||||||||||
Gets the font size setting from the attribute list.
| |||||||||||
Gets the foreground color setting from the attribute list.
| |||||||||||
Gets the icon setting from the attribute list.
| |||||||||||
Gets the left indent setting.
| |||||||||||
Gets the line spacing setting.
| |||||||||||
Gets the right indent setting.
| |||||||||||
Gets the space above setting.
| |||||||||||
Gets the space below setting.
| |||||||||||
Gets the TabSet.
| |||||||||||
Checks whether the bold attribute is set.
| |||||||||||
Checks whether the italic attribute is set.
| |||||||||||
Checks whether the strikethrough attribute is set.
| |||||||||||
Checks whether the subscript attribute is set.
| |||||||||||
Checks whether the superscript attribute is set.
| |||||||||||
Checks whether the underline attribute is set.
| |||||||||||
Sets alignment.
| |||||||||||
Sets the background color.
| |||||||||||
Sets the BidiLevel.
| |||||||||||
Sets the bold attribute.
| |||||||||||
Sets the component attribute.
| |||||||||||
Sets the first line indent.
| |||||||||||
Sets the font attribute.
| |||||||||||
Sets the font size attribute.
| |||||||||||
Sets the foreground color.
| |||||||||||
Sets the icon attribute.
| |||||||||||
Sets the italic attribute.
| |||||||||||
Sets left indent.
| |||||||||||
Sets line spacing.
| |||||||||||
Sets right indent.
| |||||||||||
Sets space above.
| |||||||||||
Sets space below.
| |||||||||||
Sets the strikethrough attribute.
| |||||||||||
Sets the subscript attribute.
| |||||||||||
Sets the superscript attribute.
| |||||||||||
Sets the TabSet.
| |||||||||||
Sets the underline attribute.
| |||||||||||
Returns the string representation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
A possible value for paragraph alignment. This specifies that the text is aligned to the center and extra whitespace should be placed equally on the left and right.
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.
A possible value for paragraph alignment. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right.
A possible value for paragraph alignment. This specifies that the text is aligned to the right indent and extra whitespace should be placed on the left.
Name of elements used to represent components.
Name of elements used to represent icons.
Alignment for the paragraph. The type is Integer. Valid values are:
Bidirectional level of a character as assigned by the Unicode bidi algorithm.
Name of the input method composed text attribute. The value of this attribute is an instance of AttributedString which represents the composed text.
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.
The amount to indent the left side of the paragraph. Type is float and specifies the size in points.
The amount of space between lines of the paragraph. Type is float and specifies the size as a factor of the line height
Attribute used to identify the model for embedded objects that have a model view separation.
Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
The amount to indent the right side of the paragraph. Type is float and specifies the size in points.
The amount of space above the paragraph. Type is float and specifies the size in points.
The amount of space below the paragraph. Type is float and specifies the size in points.
Gets the alignment setting.
a | the attribute set |
---|
StyleConstants.ALIGN_LEFT
if not set
Gets the background color setting from the attribute list.
a | the attribute set |
---|
Gets the BidiLevel setting.
a | the attribute set |
---|
Gets the component setting from the attribute list.
a | the attribute set |
---|
Gets the first line indent setting.
a | the attribute set |
---|
Gets the font family setting from the attribute list.
a | the attribute set |
---|
Gets the font size setting from the attribute list.
a | the attribute set |
---|
Gets the foreground color setting from the attribute list.
a | the attribute set |
---|
Gets the icon setting from the attribute list.
a | the attribute set |
---|
Gets the left indent setting.
a | the attribute set |
---|
Gets the line spacing setting.
a | the attribute set |
---|
Gets the right indent setting.
a | the attribute set |
---|
Gets the space above setting.
a | the attribute set |
---|
Gets the space below setting.
a | the attribute set |
---|
Gets the TabSet.
a | the attribute set |
---|
TabSet
Checks whether the bold attribute is set.
a | the attribute set |
---|
Checks whether the italic attribute is set.
a | the attribute set |
---|
Checks whether the strikethrough attribute is set.
a | the attribute set |
---|
Checks whether the subscript attribute is set.
a | the attribute set |
---|
Checks whether the superscript attribute is set.
a | the attribute set |
---|
Checks whether the underline attribute is set.
a | the attribute set |
---|
Sets alignment.
a | the attribute set |
---|---|
align | the alignment value |
Sets the background color.
a | the attribute set |
---|---|
fg | the color |
Sets the BidiLevel.
a | the attribute set |
---|---|
o | the bidi level value |
Sets the bold attribute.
a | the attribute set |
---|---|
b | specifies true/false for setting the attribute |
Sets the component attribute.
a | the attribute set |
---|---|
c | the component |
Sets the first line indent.
a | the attribute set |
---|---|
i | the value |
Sets the font attribute.
a | the attribute set |
---|---|
fam | the font |
Sets the font size attribute.
a | the attribute set |
---|---|
s | the font size |
Sets the foreground color.
a | the attribute set |
---|---|
fg | the color |
Sets the icon attribute.
a | the attribute set |
---|---|
c | the icon |
Sets the italic attribute.
a | the attribute set |
---|---|
b | specifies true/false for setting the attribute |
Sets left indent.
a | the attribute set |
---|---|
i | the value |
Sets line spacing.
a | the attribute set |
---|---|
i | the value |
Sets right indent.
a | the attribute set |
---|---|
i | the value |
Sets space above.
a | the attribute set |
---|---|
i | the value |
Sets space below.
a | the attribute set |
---|---|
i | the value |
Sets the strikethrough attribute.
a | the attribute set |
---|---|
b | specifies true/false for setting the attribute |
Sets the subscript attribute.
a | the attribute set |
---|---|
b | specifies true/false for setting the attribute |
Sets the superscript attribute.
a | the attribute set |
---|---|
b | specifies true/false for setting the attribute |
Sets the TabSet.
a | the attribute set. |
---|---|
tabs | the TabSet |
Sets the underline attribute.
a | the attribute set |
---|---|
b | specifies true/false for setting the attribute |