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
-
COMPONENT
-
-
FONT_BOLD
-
-
FONT_FAMILY
-
-
FONT_ITALIC
-
-
FONT_SIZE
-
-
FONT_UNDERLINE
-
-
FOREGROUND
-
-
ICON
-
-
copyCharacterAttributes(CharacterStyle)
- copy all of the attributes defined in the given
style definition into this style.
-
getComponent()
- Get the component attribute.
-
getFont()
- Font represented by the font attributes that this style
resolves to.
-
getFontFamily()
-
-
getFontMetrics()
- Metrics for the font that is represented by the font
attributes of this style.
-
getFontSize()
-
-
getForeground()
-
-
getIcon()
- Get the icon attribute.
-
isBold()
-
-
isBoldDefined()
- Is the Bold attribute defined locally without
resolving through the parent?
-
isCharacterStyleEqual(CharacterStyle)
- Does the given character style definition define
the same attributes as this character style, and
define them in the same way.
-
isFontFamilyDefined()
- Is the FontFamily attribute defined locally without
resolving through the parent.
-
isFontSizeDefined()
- Is the FontSize attribute defined locally without
resolving through the parent?
-
isForegroundDefined()
- Is the Foreground attribute defined locally without
resolving through the parent?
-
isItalic()
-
-
isItalicDefined()
- Is the Italic attribute defined locally without
resolving through the parent?
-
isUnderline()
-
-
isUnderlineDefined()
- Is the Underline attribute defined locally without
resolving through the parent?
-
removeCharacterAttributes()
- Remove all of the character style attributes defined
locally.
-
setBold()
-
-
setComponent(Component)
- Set the component attribute.
-
setFontFamily(String)
-
-
setFontSize(int)
-
-
setForeground(Color)
-
-
setIcon(Icon)
- Set the icon attribute.
-
setItalic()
-
-
setUnderline()
-
FONT_FAMILY
public static final String FONT_FAMILY
FONT_SIZE
public static final String FONT_SIZE
FONT_BOLD
public static final String FONT_BOLD
FONT_ITALIC
public static final String FONT_ITALIC
FONT_UNDERLINE
public static final String FONT_UNDERLINE
FOREGROUND
public static final String FOREGROUND
COMPONENT
public static final String COMPONENT
ICON
public static final String ICON
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.
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.
copyCharacterAttributes
public abstract void copyCharacterAttributes(CharacterStyle s)
- copy all of the attributes defined in the given
style definition into this style.
getFont
public abstract Font getFont()
- Font represented by the font attributes that this style
resolves to.
getFontMetrics
public abstract FontMetrics getFontMetrics()
- Metrics for the font that is represented by the font
attributes of this style.
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.
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.
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.
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.
isFontFamilyDefined
public abstract boolean isFontFamilyDefined()
- Is the FontFamily attribute defined locally without
resolving through the parent.
getFontFamily
public abstract String getFontFamily()
setFontFamily
public abstract void setFontFamily(String fam)
isFontSizeDefined
public abstract boolean isFontSizeDefined()
- Is the FontSize attribute defined locally without
resolving through the parent?
getFontSize
public abstract int getFontSize()
setFontSize
public abstract void setFontSize(int s)
isBoldDefined
public abstract boolean isBoldDefined()
- Is the Bold attribute defined locally without
resolving through the parent?
isBold
public abstract boolean isBold()
setBold
public abstract void setBold()
isItalicDefined
public abstract boolean isItalicDefined()
- Is the Italic attribute defined locally without
resolving through the parent?
isItalic
public abstract boolean isItalic()
setItalic
public abstract void setItalic()
isUnderlineDefined
public abstract boolean isUnderlineDefined()
- Is the Underline attribute defined locally without
resolving through the parent?
isUnderline
public abstract boolean isUnderline()
setUnderline
public abstract void setUnderline()
isForegroundDefined
public abstract boolean isForegroundDefined()
- Is the Foreground attribute defined locally without
resolving through the parent?
getForeground
public abstract Color getForeground()
setForeground
public abstract void setForeground(Color fg)
All Packages Class Hierarchy This Package Previous Next Index