Class StyleConstants.FontConstants
java.lang.Object
javax.swing.text.StyleConstants
javax.swing.text.StyleConstants.FontConstants
- All Implemented Interfaces:
AttributeSet.CharacterAttribute, AttributeSet.FontAttribute
- Enclosing class:
StyleConstants
public static final class StyleConstants.FontConstants
extends StyleConstants
implements AttributeSet.FontAttribute, AttributeSet.CharacterAttribute
This is a typesafe enumeration of the well-known
attributes that contribute to a font. These are aliased
by the outer class for general presentation.
-
Nested Class Summary
Nested classes/interfaces declared in class StyleConstants
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstantsModifier and TypeClassDescriptionstatic final classThis is a typesafe enumeration of the well-known attributes that contribute to a character style.static final classThis is a typesafe enumeration of the well-known attributes that contribute to a color.static final classThis is a typesafe enumeration of the well-known attributes that contribute to a font.static final classThis is a typesafe enumeration of the well-known attributes that contribute to a paragraph style. -
Field Summary
Fields declared in class StyleConstants
ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_LEFT, ALIGN_RIGHT, Alignment, Background, BidiLevel, Bold, ComponentAttribute, ComponentElementName, ComposedTextAttribute, Family, FirstLineIndent, FontFamily, FontSize, Foreground, IconAttribute, IconElementName, Italic, LeftIndent, LineSpacing, ModelAttribute, NameAttribute, Orientation, ResolveAttribute, RightIndent, Size, SpaceAbove, SpaceBelow, StrikeThrough, Subscript, Superscript, TabSet, UnderlineModifier and TypeFieldDescriptionstatic final intA possible value for paragraph alignment.static final intA possible value for paragraph alignment.static final intA possible value for paragraph alignment.static final intA possible value for paragraph alignment.static final ObjectAlignment for the paragraph.static final ObjectName of the background color attribute.static final ObjectBidirectional level of a character as assigned by the Unicode bidi algorithm.static final ObjectName of the bold attribute.static final ObjectName of the component attribute.static final StringName of elements used to represent components.static final ObjectName of the input method composed text attribute.static final ObjectName of the font family.static final ObjectThe amount of space to indent the first line of the paragraph.static final ObjectName of the font family.static final ObjectName of the font size.static final ObjectName of the foreground color attribute.static final ObjectName of the icon attribute.static final StringName of elements used to represent icons.static final ObjectName of the italic attribute.static final ObjectThe amount to indent the left side of the paragraph.static final ObjectThe amount of space between lines of the paragraph.static final ObjectAttribute used to identify the model for embedded objects that have a model view separation.static final ObjectAttribute name used to name the collection of attributes.static final ObjectOrientation for a paragraph.static final ObjectAttribute name used to identify the resolving parent set of attributes, if one is defined.static final ObjectThe amount to indent the right side of the paragraph.static final ObjectName of the font size.static final ObjectThe amount of space above the paragraph.static final ObjectThe amount of space below the paragraph.static final ObjectName of the Strikethrough attribute.static final ObjectName of the Subscript attribute.static final ObjectName of the Superscript attribute.static final ObjectTabSet for the paragraph, type is a TabSet containing TabStops.static final ObjectName of the underline attribute. -
Method Summary
Methods declared in class StyleConstants
getAlignment, getBackground, getBidiLevel, getComponent, getFirstLineIndent, getFontFamily, getFontSize, getForeground, getIcon, getLeftIndent, getLineSpacing, getRightIndent, getSpaceAbove, getSpaceBelow, getTabSet, isBold, isItalic, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setAlignment, setBackground, setBidiLevel, setBold, setComponent, setFirstLineIndent, setFontFamily, setFontSize, setForeground, setIcon, setItalic, setLeftIndent, setLineSpacing, setRightIndent, setSpaceAbove, setSpaceBelow, setStrikeThrough, setSubscript, setSuperscript, setTabSet, setUnderline, toStringModifier and TypeMethodDescriptionstatic intGets the alignment setting.static ColorGets the background color setting from the attribute list.static intGets the BidiLevel setting.static ComponentGets the component setting from the attribute list.static floatGets the first line indent setting.static StringGets the font family setting from the attribute list.static intGets the font size setting from the attribute list.static ColorGets the foreground color setting from the attribute list.static IconGets the icon setting from the attribute list.static floatGets the left indent setting.static floatGets the line spacing setting.static floatGets the right indent setting.static floatGets the space above setting.static floatGets the space below setting.static TabSetGets the TabSet.static booleanChecks whether the bold attribute is set.static booleanChecks whether the italic attribute is set.static booleanChecks whether the strikethrough attribute is set.static booleanChecks whether the subscript attribute is set.static booleanChecks whether the superscript attribute is set.static booleanChecks whether the underline attribute is set.static voidsetAlignment(MutableAttributeSet a, int align) Sets alignment.static voidSets the background color.static voidsetBidiLevel(MutableAttributeSet a, int o) Sets the BidiLevel.static voidsetBold(MutableAttributeSet a, boolean b) Sets the bold attribute.static voidSets the component attribute.static voidsetFirstLineIndent(MutableAttributeSet a, float i) Sets the first line indent.static voidsetFontFamily(MutableAttributeSet a, String fam) Sets the font attribute.static voidsetFontSize(MutableAttributeSet a, int s) Sets the font size attribute.static voidSets the foreground color.static voidsetIcon(MutableAttributeSet a, Icon c) Sets the icon attribute.static voidsetItalic(MutableAttributeSet a, boolean b) Sets the italic attribute.static voidsetLeftIndent(MutableAttributeSet a, float i) Sets left indent.static voidsetLineSpacing(MutableAttributeSet a, float i) Sets line spacing.static voidsetRightIndent(MutableAttributeSet a, float i) Sets right indent.static voidsetSpaceAbove(MutableAttributeSet a, float i) Sets space above.static voidsetSpaceBelow(MutableAttributeSet a, float i) Sets space below.static voidsetStrikeThrough(MutableAttributeSet a, boolean b) Sets the strikethrough attribute.static voidsetSubscript(MutableAttributeSet a, boolean b) Sets the subscript attribute.static voidsetSuperscript(MutableAttributeSet a, boolean b) Sets the superscript attribute.static voidsetTabSet(MutableAttributeSet a, TabSet tabs) Sets the TabSet.static voidsetUnderline(MutableAttributeSet a, boolean b) Sets the underline attribute.toString()Returns the string representation.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.