Fields Summary |
---|
public static final String | ComponentElementNameName of elements used to represent components. |
public static final String | IconElementNameName of elements used to represent icons. |
public static final Object | NameAttributeAttribute name used to name the collection of
attributes. |
public static final Object | ResolveAttributeAttribute name used to identifiy the resolving parent
set of attributes, if one is defined. |
public static final Object | ModelAttributeAttribute used to identify the model for embedded
objects that have a model view separation. |
public static final Object | BidiLevelBidirectional level of a character as assigned by the Unicode bidi
algorithm. |
public static final Object | FontFamilyName of the font family. |
public static final Object | FamilyName of the font family. |
public static final Object | FontSizeName of the font size. |
public static final Object | SizeName of the font size. |
public static final Object | BoldName of the bold attribute. |
public static final Object | ItalicName of the italic attribute. |
public static final Object | UnderlineName of the underline attribute. |
public static final Object | StrikeThroughName of the Strikethrough attribute. |
public static final Object | SuperscriptName of the Superscript attribute. |
public static final Object | SubscriptName of the Subscript attribute. |
public static final Object | ForegroundName of the foreground color attribute. |
public static final Object | BackgroundName of the background color attribute. |
public static final Object | ComponentAttributeName of the component attribute. |
public static final Object | IconAttributeName of the icon attribute. |
public static final Object | ComposedTextAttributeName of the input method composed text attribute. The value of
this attribute is an instance of AttributedString which represents
the composed text. |
public static final Object | FirstLineIndentThe 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. |
public static final Object | LeftIndentThe amount to indent the left side
of the paragraph.
Type is float and specifies the size in points. |
public static final Object | RightIndentThe amount to indent the right side
of the paragraph.
Type is float and specifies the size in points. |
public static final Object | LineSpacingThe amount of space between lines
of the paragraph.
Type is float and specifies the size as a factor of the line height |
public static final Object | SpaceAboveThe amount of space above the paragraph.
Type is float and specifies the size in points. |
public static final Object | SpaceBelowThe amount of space below the paragraph.
Type is float and specifies the size in points. |
public static final Object | AlignmentAlignment for the paragraph. The type is
Integer. Valid values are:
- ALIGN_LEFT
- ALIGN_RIGHT
- ALIGN_CENTER
- ALIGN_JUSTIFED
|
public static final Object | TabSetTabSet for the paragraph, type is a TabSet containing
TabStops. |
public static final Object | OrientationOrientation for a paragraph. |
public static final int | ALIGN_LEFTA 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. |
public static final int | ALIGN_CENTERA 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. |
public static final int | ALIGN_RIGHTA 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. |
public static final int | ALIGN_JUSTIFIEDA 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. |
static Object[] | keys |
private String | representation |
Methods Summary |
---|
public static int | getAlignment(javax.swing.text.AttributeSet a)Gets the alignment setting.
Integer align = (Integer) a.getAttribute(Alignment);
if (align != null) {
return align.intValue();
}
return ALIGN_LEFT;
|
public static java.awt.Color | getBackground(javax.swing.text.AttributeSet a)Gets the background color setting from the attribute list.
Color fg = (Color) a.getAttribute(Background);
if (fg == null) {
fg = Color.black;
}
return fg;
|
public static int | getBidiLevel(javax.swing.text.AttributeSet a)Gets the BidiLevel setting.
// --- character attribute accessors ---------------------------
Integer o = (Integer) a.getAttribute(BidiLevel);
if (o != null) {
return o.intValue();
}
return 0; // Level 0 is base level (non-embedded) left-to-right
|
public static java.awt.Component | getComponent(javax.swing.text.AttributeSet a)Gets the component setting from the attribute list.
return (Component) a.getAttribute(ComponentAttribute);
|
public static float | getFirstLineIndent(javax.swing.text.AttributeSet a)Gets the first line indent setting.
Float indent = (Float) a.getAttribute(FirstLineIndent);
if (indent != null) {
return indent.floatValue();
}
return 0;
|
public static java.lang.String | getFontFamily(javax.swing.text.AttributeSet a)Gets the font family setting from the attribute list.
String family = (String) a.getAttribute(FontFamily);
if (family == null) {
family = "Monospaced";
}
return family;
|
public static int | getFontSize(javax.swing.text.AttributeSet a)Gets the font size setting from the attribute list.
Integer size = (Integer) a.getAttribute(FontSize);
if (size != null) {
return size.intValue();
}
return 12;
|
public static java.awt.Color | getForeground(javax.swing.text.AttributeSet a)Gets the foreground color setting from the attribute list.
Color fg = (Color) a.getAttribute(Foreground);
if (fg == null) {
fg = Color.black;
}
return fg;
|
public static javax.swing.Icon | getIcon(javax.swing.text.AttributeSet a)Gets the icon setting from the attribute list.
return (Icon) a.getAttribute(IconAttribute);
|
public static float | getLeftIndent(javax.swing.text.AttributeSet a)Gets the left indent setting.
Float indent = (Float) a.getAttribute(LeftIndent);
if (indent != null) {
return indent.floatValue();
}
return 0;
|
public static float | getLineSpacing(javax.swing.text.AttributeSet a)Gets the line spacing setting.
Float space = (Float) a.getAttribute(LineSpacing);
if (space != null) {
return space.floatValue();
}
return 0;
|
public static float | getRightIndent(javax.swing.text.AttributeSet a)Gets the right indent setting.
Float indent = (Float) a.getAttribute(RightIndent);
if (indent != null) {
return indent.floatValue();
}
return 0;
|
public static float | getSpaceAbove(javax.swing.text.AttributeSet a)Gets the space above setting.
Float space = (Float) a.getAttribute(SpaceAbove);
if (space != null) {
return space.floatValue();
}
return 0;
|
public static float | getSpaceBelow(javax.swing.text.AttributeSet a)Gets the space below setting.
Float space = (Float) a.getAttribute(SpaceBelow);
if (space != null) {
return space.floatValue();
}
return 0;
|
public static javax.swing.text.TabSet | getTabSet(javax.swing.text.AttributeSet a)Gets the TabSet.
TabSet tabs = (TabSet)a.getAttribute(TabSet);
// PENDING: should this return a default?
return tabs;
|
public static boolean | isBold(javax.swing.text.AttributeSet a)Checks whether the bold attribute is set.
Boolean bold = (Boolean) a.getAttribute(Bold);
if (bold != null) {
return bold.booleanValue();
}
return false;
|
public static boolean | isItalic(javax.swing.text.AttributeSet a)Checks whether the italic attribute is set.
Boolean italic = (Boolean) a.getAttribute(Italic);
if (italic != null) {
return italic.booleanValue();
}
return false;
|
public static boolean | isStrikeThrough(javax.swing.text.AttributeSet a)Checks whether the strikethrough attribute is set.
Boolean strike = (Boolean) a.getAttribute(StrikeThrough);
if (strike != null) {
return strike.booleanValue();
}
return false;
|
public static boolean | isSubscript(javax.swing.text.AttributeSet a)Checks whether the subscript attribute is set.
Boolean subscript = (Boolean) a.getAttribute(Subscript);
if (subscript != null) {
return subscript.booleanValue();
}
return false;
|
public static boolean | isSuperscript(javax.swing.text.AttributeSet a)Checks whether the superscript attribute is set.
Boolean superscript = (Boolean) a.getAttribute(Superscript);
if (superscript != null) {
return superscript.booleanValue();
}
return false;
|
public static boolean | isUnderline(javax.swing.text.AttributeSet a)Checks whether the underline attribute is set.
Boolean underline = (Boolean) a.getAttribute(Underline);
if (underline != null) {
return underline.booleanValue();
}
return false;
|
public static void | setAlignment(javax.swing.text.MutableAttributeSet a, int align)Sets alignment.
a.addAttribute(Alignment, new Integer(align));
|
public static void | setBackground(javax.swing.text.MutableAttributeSet a, java.awt.Color fg)Sets the background color.
a.addAttribute(Background, fg);
|
public static void | setBidiLevel(javax.swing.text.MutableAttributeSet a, int o)Sets the BidiLevel.
a.addAttribute(BidiLevel, new Integer(o));
|
public static void | setBold(javax.swing.text.MutableAttributeSet a, boolean b)Sets the bold attribute.
a.addAttribute(Bold, Boolean.valueOf(b));
|
public static void | setComponent(javax.swing.text.MutableAttributeSet a, java.awt.Component c)Sets the component attribute.
a.addAttribute(AbstractDocument.ElementNameAttribute, ComponentElementName);
a.addAttribute(ComponentAttribute, c);
|
public static void | setFirstLineIndent(javax.swing.text.MutableAttributeSet a, float i)Sets the first line indent.
a.addAttribute(FirstLineIndent, new Float(i));
|
public static void | setFontFamily(javax.swing.text.MutableAttributeSet a, java.lang.String fam)Sets the font attribute.
a.addAttribute(FontFamily, fam);
|
public static void | setFontSize(javax.swing.text.MutableAttributeSet a, int s)Sets the font size attribute.
a.addAttribute(FontSize, new Integer(s));
|
public static void | setForeground(javax.swing.text.MutableAttributeSet a, java.awt.Color fg)Sets the foreground color.
a.addAttribute(Foreground, fg);
|
public static void | setIcon(javax.swing.text.MutableAttributeSet a, javax.swing.Icon c)Sets the icon attribute.
a.addAttribute(AbstractDocument.ElementNameAttribute, IconElementName);
a.addAttribute(IconAttribute, c);
|
public static void | setItalic(javax.swing.text.MutableAttributeSet a, boolean b)Sets the italic attribute.
a.addAttribute(Italic, Boolean.valueOf(b));
|
public static void | setLeftIndent(javax.swing.text.MutableAttributeSet a, float i)Sets left indent.
a.addAttribute(LeftIndent, new Float(i));
|
public static void | setLineSpacing(javax.swing.text.MutableAttributeSet a, float i)Sets line spacing.
a.addAttribute(LineSpacing, new Float(i));
|
public static void | setRightIndent(javax.swing.text.MutableAttributeSet a, float i)Sets right indent.
a.addAttribute(RightIndent, new Float(i));
|
public static void | setSpaceAbove(javax.swing.text.MutableAttributeSet a, float i)Sets space above.
a.addAttribute(SpaceAbove, new Float(i));
|
public static void | setSpaceBelow(javax.swing.text.MutableAttributeSet a, float i)Sets space below.
a.addAttribute(SpaceBelow, new Float(i));
|
public static void | setStrikeThrough(javax.swing.text.MutableAttributeSet a, boolean b)Sets the strikethrough attribute.
a.addAttribute(StrikeThrough, Boolean.valueOf(b));
|
public static void | setSubscript(javax.swing.text.MutableAttributeSet a, boolean b)Sets the subscript attribute.
a.addAttribute(Subscript, Boolean.valueOf(b));
|
public static void | setSuperscript(javax.swing.text.MutableAttributeSet a, boolean b)Sets the superscript attribute.
a.addAttribute(Superscript, Boolean.valueOf(b));
|
public static void | setTabSet(javax.swing.text.MutableAttributeSet a, javax.swing.text.TabSet tabs)Sets the TabSet.
a.addAttribute(TabSet, tabs);
|
public static void | setUnderline(javax.swing.text.MutableAttributeSet a, boolean b)Sets the underline attribute.
a.addAttribute(Underline, Boolean.valueOf(b));
|
public java.lang.String | toString()Returns the string representation.
return representation;
|