|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.editor.highlight.HighlightRegistry
public final class HighlightRegistry
A HighlightRegistry
is a registry of all known highlight styles used for background highlighting.
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_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_STRIKETHRU This is a double-pixel thickness (solid) line strikethru that is positioned centered in the text area. |
static int |
DOUBLE_UNDERLINE This is a double-pixel (solid) underline that is positioned at the baseline of the text. |
static int |
PERFORATED_SEPARATOR This is similar to SINGLE_DOTTED_SEPARATOR with shorter dots and gaps (really subtle). |
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. |
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_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_STRIKETHRU This is a single-pixel thickness (solid) line strikethru that is positioned centered in the text area. |
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 | |
---|---|
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, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor, int fontStyle, int underlinePredefinedPainter, java.awt.Color underlineColor) Create a new HighlightStyle with the given name and highlight attributes. |
HighlightStyle |
createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, int fontStyle) Create a new HighlightStyle with the given name and highlight attributes. |
HighlightStyle |
createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, int underlinePredefinedPainter, java.awt.Color underlineColor) 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. |
HighlightStyle |
createTransientStyle(java.lang.String styleName, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor, int fontStyle, int underlinePredefinedPainter, java.awt.Color underlineColor) Create a new transient HighlightStyle with the given name and highlight attributes. |
java.util.Iterator<HighlightStyle> |
getStyleIterator() Fetch an Iterator for all of the styles within this registry. |
static int |
lookupPredefinedPainter(UnderlinePainter painter) Utility routine to determine the predefined index number for a painter. |
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) Deprecated. |
void |
modifyStyle(java.lang.String styleName, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor, int fontStyle, int underlinePredefinedPainter, java.awt.Color underlineColor) Modifies this style's attributes. |
void |
modifyStyleBackground(java.lang.String styleName, 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 |
modifyStyleFont(java.lang.String styleName, int fontStyle) Modifies the style's font attributes. |
void |
modifyStyleForeground(java.lang.String styleName, 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 |
modifyStyleUnderline(java.lang.String styleName, int underlinePredefinedPainter, java.awt.Color underlineColor) Modifies the style's underline attributes. |
void |
modifyStyleUnderline(java.lang.String styleName, UnderlinePainter underlinePainter, java.awt.Color underlineColor) Modifies the style's underline attributes. |
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_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 SINGLE_SEPARATOR
public static final int DOUBLE_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_STRIKETHRU
public static final int DOUBLE_STRIKETHRU
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<HighlightStyle> 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. Transient styles are not returned by this iteratorpublic java.lang.Object clone()
HighlightRegistry
with a copy of its own styles separate from this one.clone
in class java.lang.Object
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 createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, int underlinePredefinedPainter, java.awt.Color underlineColor)
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 highlightunderlinePredefinedPainter
- one of the predefined painters, i.e., SINGLE_UNDERLINEunderlineColor
- the underline color to use, or null for nonepublic HighlightStyle createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, int fontStyle)
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 highlightfontStyle
- the font style to apply, i.e., HighlightStyle.FONT_BOLDpublic HighlightStyle createStyle(java.lang.String styleName, java.lang.String presentationName, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor, int fontStyle, int underlinePredefinedPainter, java.awt.Color underlineColor)
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 use, or null for nonebgColor
- the background color to use, or null for nonefontStyle
- the font style to apply, i.e., HighlightStyle.FONT_BOLDunderlinePredefinedPainter
- one of the predefined painters, i.e., SINGLE_UNDERLINEunderlineColor
- the underline color to use, or null for nonepublic static int lookupPredefinedPainter(UnderlinePainter painter)
painter
- the painter to look uppublic HighlightStyle createTransientStyle(java.lang.String styleName, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor, int fontStyle, int underlinePredefinedPainter, java.awt.Color underlineColor)
HighlightStyle
with the given name and highlight attributes. Transient styles are not persisted, not displayed to users for customizations, and are generally based on a non-transient style and used for some special effect (such as fading).styleName
- the name of the styleenabled
- whether the highlight is enabled by defaultpriority
- the priority of the highlightfgColor
- the foreground color to use, or null for nonebgColor
- the background color to use, or null for nonefontStyle
- the font style to apply, i.e., HighlightStyle.FONT_BOLDunderlinePredefinedPainter
- one of the predefined painters, i.e., SINGLE_UNDERLINEunderlineColor
- the underline color to use, or null for nonepublic 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, 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, java.awt.Color bgColor)
styleName
- the name of the style to modifybgColor
- the background color to usepublic void modifyStyleFont(java.lang.String styleName, int fontStyle)
styleName
- the name of the style to modifyfontStyle
- the font style to usepublic void modifyStyleUnderline(java.lang.String styleName, int underlinePredefinedPainter, java.awt.Color underlineColor)
styleName
- the name of the style to modifyunderlinePredefinedPainter
- the predefined painter index to useunderlineColor
- the underline color to usepublic void modifyStyleUnderline(java.lang.String styleName, UnderlinePainter underlinePainter, java.awt.Color underlineColor)
styleName
- the name of the style to modifyunderlinePainter
- the underline painter to useunderlineColor
- the underline 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 usepublic void modifyStyle(java.lang.String styleName, boolean enabled, int priority, java.awt.Color fgColor, java.awt.Color bgColor, int fontStyle, int underlinePredefinedPainter, java.awt.Color underlineColor)
styleName
- the name of the style to modifyenabled
- whether to enable the highlight or notpriority
- the new priority to usefgColor
- the foreground color to usebgColor
- the background color to usefontStyle
- the font style to useunderlinePredefinedPainter
- the predefined painter index to useunderlineColor
- the underlineColor to use
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |