Extension SDK 10.1.2

oracle.javatools.editor.language
Class BaseStyle

java.lang.Object
  extended byoracle.javatools.editor.language.BaseStyle

public final class BaseStyle
extends java.lang.Object

The BaseStyle defines a set of color attributes for painting a segment of text. This is a simplification of the style functionality provided in the text package for our purposes.

Note that the constructor is package-private intentionally - you must go through the StyleRegistry to create new styles, or to modify existing styles.


Method Summary
 java.awt.Color getBackgroundColor()
          Fetches the background color of the style.
 int getFontStyle()
          Fetches the font style of this style.
 java.awt.Color getForegroundColor()
          Fetches the foreground color of the style
 boolean getHasParent()
          Fetches whether this style has a parent or not.
 java.lang.String getName()
          Fetches the name of the style.
 java.lang.String getParentName()
          Fetches the name of the parent style.
 java.lang.String getPresentationName()
          Fetch the visible or presentation name of the style.
 boolean getUsesParentBackgroundColor()
          Fetch whether this style uses the parent background color.
 boolean getUsesParentFontStyle()
          Fetch whether this style uses the parent's font style.
 boolean getUsesParentForegroundColor()
          Fetch whether this style uses the parent foreground color.
 java.lang.String toString()
          Fetches the human-readable name of the style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Fetches the name of the style.

Returns:
the style name

getPresentationName

public java.lang.String getPresentationName()
Fetch the visible or presentation name of the style. This is generally a translated name that can be used for UI purposes.

Returns:
the name of the style in human-readable form

toString

public java.lang.String toString()
Fetches the human-readable name of the style.

Returns:
the style name

getHasParent

public boolean getHasParent()
Fetches whether this style has a parent or not. For the base style, this will always return false. All other styles will return true

Returns:
whether this style has a parent or not

getParentName

public java.lang.String getParentName()
Fetches the name of the parent style. For the base style, this will return null. All other styles will return the name of the parent.

Returns:
the name of the parent style

getForegroundColor

public java.awt.Color getForegroundColor()
Fetches the foreground color of the style

Returns:
the foreground color

getUsesParentForegroundColor

public boolean getUsesParentForegroundColor()
Fetch whether this style uses the parent foreground color. For the base style, this will always return false. All other styles will return true if they inherit from the parent's foreground color.

Returns:
whether this style uses the parent's foreground color

getBackgroundColor

public java.awt.Color getBackgroundColor()
Fetches the background color of the style.

Returns:
the background color

getUsesParentBackgroundColor

public boolean getUsesParentBackgroundColor()
Fetch whether this style uses the parent background color. For the base style, this will always return false. All other styles will return true if they inherit from the parent's background color.

Returns:
whether this style uses the parent's background color

getFontStyle

public int getFontStyle()
Fetches the font style of this style. For the BaseStyle, this is always the plain font.

Returns:
the plain font style

getUsesParentFontStyle

public boolean getUsesParentFontStyle()
Fetch whether this style uses the parent's font style. For the base style, this will always return false. All other styles will return true if they inherit from the parent's font style.

Returns:
whether this style uses the parent's font style

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.