|
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.HighlightStyle
The HighlightStyle
class defines a set of foreground
and background color attributes used for painting highlights for a
segment of text. This is useful for highlighting certain segments
of text to the user's attention, such as find text occurrences,
compiler errors, breakpoints, and so on. Create new highlights
or modify existing highlights through the
HighlightRegistry
.
A HighlightStyle
must define either a foreground
attribute, a background attribute, or both. Text highlights are
applied in layers to styled text (such as syntax highlighted text)
based on the priority of the highlight - this is similar to how the
priority levels work in a JLayeredPane
. Note that the
highlight does not change the font attributes used for the
highlighted text however. In general, do not define highlights
with a higher priority level then the priority level for the
selected text unless you want the particular highlight to really
stand out.
As a final note, text highlights are never merged, even in cases where one overlapping highlight defines only one color attribute (say, foreground), and the other overlapping highlight defines another color attribute (say, background.) In this case, if the first highlight (with the foreground color) has a higher priority, the text will be painted with the foreground of the highlight, and background of the underlying styled text.
Field Summary | |
static int |
DEFAULT_SELECTION_PRIORITY
The default priority level given to the highlight for selected text. |
static int |
MAXIMUM_PRIORITY
The maximum priority level a highlight can use. |
static int |
MINIMUM_PRIORITY
The minimum priority level a highlight can use. |
Method Summary | |
java.awt.Color |
getBackgroundColor()
Fetches the background color of the higlight |
boolean |
getEnabled()
Fetches the enabled status of this highlight style. |
java.awt.Color |
getForegroundColor()
Fetches the foreground color of the highlight |
java.lang.String |
getName()
Fetches the name of the highlight. |
java.lang.String |
getPresentationName()
Fetch the visible or presentation name of the style. |
int |
getPriority()
Fetches the priority of the highlight |
boolean |
getUseBackgroundColor()
Fetches whether the background color is in use or not. |
boolean |
getUseForegroundColor()
Fetches whether the foreground color is in use or not. |
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 |
Field Detail |
public static final int MINIMUM_PRIORITY
public static final int MAXIMUM_PRIORITY
public static final int DEFAULT_SELECTION_PRIORITY
Method Detail |
public java.lang.String getName()
public java.lang.String getPresentationName()
public java.lang.String toString()
public boolean getEnabled()
public int getPriority()
public boolean getUseForegroundColor()
public java.awt.Color getForegroundColor()
public boolean getUseBackgroundColor()
public java.awt.Color getBackgroundColor()
|
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.