|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.editor.underline.UnderlineRegistry
A UnderlineRegistry
is a registry of all known
underline styles used for text underlining.
Field Summary | |
static int |
DOUBLE_DOTTED_SEPARATOR
This is similar to DOUBLE_LINE_SEPARATOR except that
the separator is dotted instead of being solid. |
static int |
DOUBLE_DOTTED_UNDERLINE
This is similar to DOUBLE_UNDERLINE except that the
separator is dotted instead of being solid. |
static int |
DOUBLE_LINE_SEPARATOR
This is a double-pixel thickness (solid) line separator that is positioned at the bottom of the text area (below the baseline by descent pixels.) It is intended to be used to separate regions of text in the editor view. |
static int |
DOUBLE_UNDERLINE
This is a double-pixel (solid) underline that is positioned at the baseline of the text. |
static int |
LAST_UNDERLINE
Last valid underline index. |
static int |
PERFORATED_SEPARATOR
This is similar to SINGLE_DOTTED_SEPARATOR with
shorter dots and gaps (really subtle). |
static java.lang.String |
PROPERTY_UNDERLINE_CHANGED
Name of the pseudo-property that the UnderlineRegistry uses to notify listeners (views) that settings in the registry have changed. |
static int |
SINGLE_DOTTED_SEPARATOR
This is similar to SINGLE_LINE_SEPARATOR except that
the separator is dotted instead of being solid. |
static int |
SINGLE_DOTTED_UNDERLINE
This is similar to SINGLE_UNDERLINE except that the
separator is dotted instead of being solid. |
static int |
SINGLE_LINE_SEPARATOR
This is a single-pixel thickness (solid) line separator that is positioned at the bottom of the text area (below the baseline by descent pixels.) It is intended to be used to separate regions of text in the editor view. |
static int |
SINGLE_UNDERLINE
This is a single-pixel (solid) underline that is positioned at the baseline of the text. |
static int |
ZIGZAG_UNDERLINE
This is a zig-zag (squiggly) underline, similar to what Microsoft Word uses to flag spelling errors. |
Constructor Summary | |
UnderlineRegistry()
Constructs a new underline registry. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this registry
to track changes to styles. |
java.lang.Object |
clone()
Creates and returns a copy of this class. |
UnderlineStyle |
createStyle(java.lang.String styleName,
java.lang.String presentationName,
boolean enabled,
int priority,
java.awt.Color color,
int shapeIndex)
Create a new UnderlineStyle with the given name
and attributes. |
java.util.Iterator |
getStyleIterator()
Fetch an Iterator for all of the styles within this
registry. |
UnderlineStyle |
lookupStyle(java.lang.String styleName)
Fetches the style with the given name. |
void |
modifyStyle(java.lang.String styleName,
boolean enabled,
int priority,
java.awt.Color color,
int shapeIndex)
Modifies this style's attributes. |
void |
modifyStyle(java.lang.String styleName,
boolean enabled,
int priority,
java.awt.Color color,
UnderlinePainter painter)
Modifies this style's attributes. |
void |
modifyStyleColor(java.lang.String styleName,
java.awt.Color color)
Modifies the style's color attributes. |
void |
modifyStyleEnabled(java.lang.String styleName,
boolean enabled)
Modifies the style's enabled status. |
void |
modifyStylePriority(java.lang.String styleName,
int priority)
Modifies the style's priority attribute. |
void |
modifyStyleShape(java.lang.String styleName,
int shapeIndex)
Modifies the style's underline shape attribute. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from this registry. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SINGLE_LINE_SEPARATOR
public static final int DOUBLE_LINE_SEPARATOR
public static final int SINGLE_DOTTED_SEPARATOR
SINGLE_LINE_SEPARATOR
except that
the separator is dotted instead of being solid.
public static final int DOUBLE_DOTTED_SEPARATOR
DOUBLE_LINE_SEPARATOR
except that
the separator is dotted instead of being solid.
public static final int PERFORATED_SEPARATOR
SINGLE_DOTTED_SEPARATOR
with
shorter dots and gaps (really subtle).
public static final int SINGLE_UNDERLINE
public static final int DOUBLE_UNDERLINE
public static final int SINGLE_DOTTED_UNDERLINE
SINGLE_UNDERLINE
except that the
separator is dotted instead of being solid.
public static final int DOUBLE_DOTTED_UNDERLINE
DOUBLE_UNDERLINE
except that the
separator is dotted instead of being solid.
public static final int ZIGZAG_UNDERLINE
public static final int LAST_UNDERLINE
public static final java.lang.String PROPERTY_UNDERLINE_CHANGED
Constructor Detail |
public UnderlineRegistry()
Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
to this registry
to track changes to styles.
listener
- the listener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
from this registry.
listener
- the listener to be removedpublic java.util.Iterator getStyleIterator()
Iterator
for all of the styles within this
registry. Note that some of these styles may not be completely
initialized - clients that use this style list for the purposes
of display a list of available styles should call lookupStyle()
on each style to ensure that the given style has been initialized
properly.
public java.lang.Object clone()
UnderlineRegistry
with
a copy of its own styles separate from this one.
UnderlineRegistry
public UnderlineStyle createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, java.awt.Color color, int shapeIndex)
UnderlineStyle
with the given name
and attributes. Note that if the specified underline shape
is invalid, it will automatically be substituted with
SINGLE_UNDERLINE
.
styleName
- the name of the stylepresentationName
- the presentation or public name of the
style that can be used for UI purposesenabled
- whether the underline is enabled by defaultpriority
- the priority of the underlinecolor
- the color of the underlineshapeIndex
- the pre-defined underline shape to usepublic UnderlineStyle lookupStyle(java.lang.String styleName)
public void modifyStyleEnabled(java.lang.String styleName, boolean enabled)
styleName
- the name of the style to modifyenabled
- the enabled status of the stylepublic void modifyStylePriority(java.lang.String styleName, int priority)
styleName
- the name of the style to modifypriority
- the new priority to usepublic void modifyStyleColor(java.lang.String styleName, java.awt.Color color)
styleName
- the name of the style to modifycolor
- the underline color to usepublic void modifyStyleShape(java.lang.String styleName, int shapeIndex)
SINGLE_UNDERLINE
.
styleName
- the name of the style to modifyshapeIndex
- the pre-defined underline shape to usepublic void modifyStyle(java.lang.String styleName, boolean enabled, int priority, java.awt.Color color, int shapeIndex)
SINGLE_UNDERLINE
.
styleName
- the name of the style to modifyenabled
- whether the underline is enabled by defaultpriority
- the priority of the underlinecolor
- the color of the underlineshapeIndex
- the pre-defined underline shape to usepublic void modifyStyle(java.lang.String styleName, boolean enabled, int priority, java.awt.Color color, UnderlinePainter painter)
styleName
- the name of the style to modifyenabled
- whether the underline is enabled by defaultpriority
- the priority of the underlinecolor
- the color of the underlinepainter
- the UnderlinePainter to use
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.