oracle.javatools.editor.highlight
Class HighlightedFragment
java.lang.Object
|
+--oracle.javatools.editor.highlight.HighlightedFragment
- public final class HighlightedFragment
- extends java.lang.Object
A HighlightedFragment
is used for associating a
HighlightStyle
with a segment of text. Data members
are public for convenience. Note that fragments may span
multiple lines. This class is identical to a
StyledFragment
except that it applies to highlights.
This class is used internally by the editor component and is not
returned to editor clients. When clients add highlights to a given
layer, the object returned is of type Highlight
.
Method Summary |
java.lang.String |
toString()
Fetches a string representation of this fragment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
highlightStyle
public HighlightStyle highlightStyle
- The highlight style to use for rendering this fragment.
startOffset
public int startOffset
- The starting offset for this fragment.
endOffset
public int endOffset
- The ending offset for this fragment (exclusive).
HighlightedFragment
public HighlightedFragment(HighlightStyle highlightStyle,
int startOffset,
int endOffset)
- Constructs a new HighlightedFragment
- Parameters:
highlightStyle
- the highlight style to usestartOffset
- starting offsetendOffset
- ending offset (exclusive)
toString
public java.lang.String toString()
- Fetches a string representation of this fragment. This is mostly
for debugging purposes.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a string representation