All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.swing.text.CharacterStyle

public interface CharacterStyle
A collection of attributes representing character style. These attributes form the font and color of the characters to be rendered in text editors/viewers. They are used in the same manner as Attributes, but have a specific interface that is typesafe and might be implemented more effiently than the general Attributes.

See Also:
Attributes, Style

Variable Index

 o COMPONENT
 o FONT_BOLD
 o FONT_FAMILY
 o FONT_ITALIC
 o FONT_SIZE
 o FONT_UNDERLINE
 o FOREGROUND
 o ICON

Method Index

 o copyCharacterAttributes(CharacterStyle)
copy all of the attributes defined in the given style definition into this style.
 o getComponent()
Get the component attribute.
 o getFont()
Font represented by the font attributes that this style resolves to.
 o getFontFamily()
 o getFontMetrics()
Metrics for the font that is represented by the font attributes of this style.
 o getFontSize()
 o getForeground()
 o getIcon()
Get the icon attribute.
 o isBold()
 o isBoldDefined()
Is the Bold attribute defined locally without resolving through the parent?
 o isCharacterStyleEqual(CharacterStyle)
Does the given character style definition define the same attributes as this character style, and define them in the same way.
 o isFontFamilyDefined()
Is the FontFamily attribute defined locally without resolving through the parent.
 o isFontSizeDefined()
Is the FontSize attribute defined locally without resolving through the parent?
 o isForegroundDefined()
Is the Foreground attribute defined locally without resolving through the parent?
 o isItalic()
 o isItalicDefined()
Is the Italic attribute defined locally without resolving through the parent?
 o isUnderline()
 o isUnderlineDefined()
Is the Underline attribute defined locally without resolving through the parent?
 o removeCharacterAttributes()
Remove all of the character style attributes defined locally.
 o setBold()
 o setComponent(Component)
Set the component attribute.
 o setFontFamily(String)
 o setFontSize(int)
 o setForeground(Color)
 o setIcon(Icon)
Set the icon attribute.
 o setItalic()
 o setUnderline()

Variables

 o FONT_FAMILY
 public static final String FONT_FAMILY
 o FONT_SIZE
 public static final String FONT_SIZE
 o FONT_BOLD
 public static final String FONT_BOLD
 o FONT_ITALIC
 public static final String FONT_ITALIC
 o FONT_UNDERLINE
 public static final String FONT_UNDERLINE
 o FOREGROUND
 public static final String FOREGROUND
 o COMPONENT
 public static final String COMPONENT
 o ICON
 public static final String ICON

Methods

 o isCharacterStyleEqual
 public abstract boolean isCharacterStyleEqual(CharacterStyle s)
Does the given character style definition define the same attributes as this character style, and define them in the same way.

 o removeCharacterAttributes
 public abstract void removeCharacterAttributes()
Remove all of the character style attributes defined locally. All of the isXXXDefined methods will return false after calling this method, meaning that no attributes for character style are defined locally.

 o copyCharacterAttributes
 public abstract void copyCharacterAttributes(CharacterStyle s)
copy all of the attributes defined in the given style definition into this style.

 o getFont
 public abstract Font getFont()
Font represented by the font attributes that this style resolves to.

 o getFontMetrics
 public abstract FontMetrics getFontMetrics()
Metrics for the font that is represented by the font attributes of this style.

 o getComponent
 public abstract Component getComponent()
Get the component attribute. If there is no component assigned to this style, a null will be returned, otherwise the reference to the component.

 o setComponent
 public abstract void setComponent(Component c)
Set the component attribute. This establishes a component that should be rendered in place of normal character content.

 o getIcon
 public abstract Icon getIcon()
Get the icon attribute. If there is no icon assigned to this style, a null will be returned, otherwise the reference to the icon.

 o setIcon
 public abstract void setIcon(Icon c)
Set the icon attribute. This establishes a icon that should be rendered in place of normal character content.

 o isFontFamilyDefined
 public abstract boolean isFontFamilyDefined()
Is the FontFamily attribute defined locally without resolving through the parent.

 o getFontFamily
 public abstract String getFontFamily()
 o setFontFamily
 public abstract void setFontFamily(String fam)
 o isFontSizeDefined
 public abstract boolean isFontSizeDefined()
Is the FontSize attribute defined locally without resolving through the parent?

 o getFontSize
 public abstract int getFontSize()
 o setFontSize
 public abstract void setFontSize(int s)
 o isBoldDefined
 public abstract boolean isBoldDefined()
Is the Bold attribute defined locally without resolving through the parent?

 o isBold
 public abstract boolean isBold()
 o setBold
 public abstract void setBold()
 o isItalicDefined
 public abstract boolean isItalicDefined()
Is the Italic attribute defined locally without resolving through the parent?

 o isItalic
 public abstract boolean isItalic()
 o setItalic
 public abstract void setItalic()
 o isUnderlineDefined
 public abstract boolean isUnderlineDefined()
Is the Underline attribute defined locally without resolving through the parent?

 o isUnderline
 public abstract boolean isUnderline()
 o setUnderline
 public abstract void setUnderline()
 o isForegroundDefined
 public abstract boolean isForegroundDefined()
Is the Foreground attribute defined locally without resolving through the parent?

 o getForeground
 public abstract Color getForeground()
 o setForeground
 public abstract void setForeground(Color fg)

All Packages  Class Hierarchy  This Package  Previous  Next  Index