|
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.highlight.HighlightRegistry
A HighlightRegistry
is a registry of all known
highlight styles used for background highlighting.
Field Summary | |
static java.lang.String |
PROPERTY_HIGHLIGHT_CHANGED
Name of the pseudo-property that the HighlightRegistry uses to notify listeners (views) that settings in the registry have changed. |
Constructor Summary | |
HighlightRegistry()
Constructs a new highlight 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. |
HighlightStyle |
createStyle(java.lang.String styleName,
java.lang.String presentationName,
boolean enabled,
int priority,
java.awt.Color fgColor,
java.awt.Color bgColor)
Create a new HighlightStyle with the given name
and highlight attributes. |
HighlightStyle |
createStyle(java.lang.String styleName,
java.lang.String presentationName,
int priority,
java.awt.Color fgColor,
java.awt.Color bgColor)
Create a new HighlightStyle with the given name
and highlight attributes with a default enabled status of true. |
java.util.Iterator |
getStyleIterator()
Fetch an Iterator for all of the styles within this
registry. |
HighlightStyle |
lookupStyle(java.lang.String styleName)
Fetches the style with the given name. |
void |
modifyStyle(java.lang.String styleName,
boolean enabled,
int priority,
boolean useFG,
java.awt.Color fgColor,
boolean useBG,
java.awt.Color bgColor)
Modifies this style's attributes. |
void |
modifyStyleBackground(java.lang.String styleName,
boolean useBG,
java.awt.Color bgColor)
Modifies the style's background attributes. |
void |
modifyStyleEnabled(java.lang.String styleName,
boolean enabled)
Modifies the style's enabled status. |
void |
modifyStyleForeground(java.lang.String styleName,
boolean useFG,
java.awt.Color fgColor)
Modifies the style's foreground attributes. |
void |
modifyStylePriority(java.lang.String styleName,
int priority)
Modifies the style's priority 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 java.lang.String PROPERTY_HIGHLIGHT_CHANGED
Constructor Detail |
public HighlightRegistry()
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()
HighlightRegistry
with
a copy of its own styles separate from this one.
HighlightRegistry
public HighlightStyle createStyle(java.lang.String styleName, java.lang.String presentationName, int priority, java.awt.Color fgColor, java.awt.Color bgColor)
HighlightStyle
with the given name
and highlight attributes with a default enabled status of true.
styleName
- the name of the stylepresentationName
- the presentation or public name of the
style that can be used for UI purposespriority
- the priority of the highlightfgColor
- the foreground color to usebgColor
- the background color to usepublic HighlightStyle createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor)
HighlightStyle
with the given name
and highlight attributes.
styleName
- the name of the stylepresentationName
- the presentation or public name of the
style that can be used for UI purposesenabled
- whether the highlight is enabled by defaultpriority
- the priority of the highlightfgColor
- the foreground color to usebgColor
- the background color to usepublic HighlightStyle 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 modifyStyleForeground(java.lang.String styleName, boolean useFG, java.awt.Color fgColor)
styleName
- the name of the style to modifyuseFG
- whether to use the foreground or notfgColor
- the foreground color to usepublic void modifyStyleBackground(java.lang.String styleName, boolean useBG, java.awt.Color bgColor)
styleName
- the name of the style to modifyuseBG
- whether to use the background or notbgColor
- the background color to usepublic void modifyStyle(java.lang.String styleName, boolean enabled, int priority, boolean useFG, java.awt.Color fgColor, boolean useBG, java.awt.Color bgColor)
styleName
- the name of the style to modifyenabled
- whether to enable the highlight or notpriority
- the new priority to useuseFG
- whether to use the fg or notfgColor
- the foreground color to useuseBG
- whether to use the bg or notbgColor
- the background color 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.