oracle.javatools.editor.language
Class StyledFragment
java.lang.Object
|
+--oracle.javatools.editor.language.StyledFragment
- public final class StyledFragment
- extends java.lang.Object
A StyledFragment
just associates a BaseStyle with
a region of text. Data members are public for convenience. Note
that fragments may span multiple lines.
Field Summary |
int |
endOffset
The ending offset for this fragment (exclusive). |
int |
startOffset
The starting offset for this fragment. |
java.lang.String |
styleName
The name of the style to use for rendering this fragment. |
Constructor Summary |
StyledFragment(java.lang.String styleName,
int startOffset,
int endOffset)
Constructs a new StyledFragment. |
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 |
styleName
public java.lang.String styleName
- The name of the 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).
StyledFragment
public StyledFragment(java.lang.String styleName,
int startOffset,
int endOffset)
- Constructs a new StyledFragment.
- Parameters:
styleName
- the name of the style to usestartOffset
- starting offsetendOffset
- ending offset (exclusive)
toString
public java.lang.String toString()
- Fetches a string representation of this fragment. This is only
for debugging purposes.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a string representation