|
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.underline.UnderlinedFragmentsList
An UnderlinedFragmentsList
is just a list of UnderlinedFragments that we can re-use without having to constantly reallocate arrays and UnderlinedFragment objects. This class is similar to the HighlightedFragmentsList
except that it applies to UnderlinedFragments.
Since this fragments list is typically used for rendering underlines, it will take care of resolving priority levels of underlines as they are added to the list. This means underlines can be added to the list out of order (both in terms of offsets as well as priority levels), relieving the view and renderers from the responsibility of having to manually sort through the underlines.
Note, unlike the StyledFragmentsList
, fragments added to this list are not required to be adjacent regions of text.
Constructor Summary | |
UnderlinedFragmentsList() Constructs a new UnderlinedFragmentList with an initial size of the default. |
Method Summary | |
void |
add(UnderlineStyle underlineStyle, int startOffset, int endOffset) Adds the given fragment to the list, accounting for priority and offsets so that the list is always sorted in increasing offsets with higher priority underlines displacing lower priority ones. |
void |
clear() Discards all fragments from the list. |
UnderlinedFragment |
get(int index) Get the fragment at the specified index. |
void |
setUnderlineRegistry(UnderlineRegistry registry) Set the UnderlineRegistry used by this list when building up its list of underline fragments. |
int |
size() Returns the size of the list (number of fragments.) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UnderlinedFragmentsList()
Method Detail |
public void setUnderlineRegistry(UnderlineRegistry registry)
UnderlineRegistry
used by this list when building up its list of underline fragments.public void add(UnderlineStyle underlineStyle, int startOffset, int endOffset)
underlineStyle
- the underline stylestartOffset
- the starting offset of the underlineendOffset
- the ending offset of the underlinepublic void clear()
public int size()
public UnderlinedFragment get(int index)
index
- the index of the fragment to retrieve
|
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.