|
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.language.StyledFragmentsList
public final class StyledFragmentsList
A StyledFragmentsList
is just a list of StyledFragments that we can re-use without having to constantly reallocate arrays and StyledFragment objects. This should help overall performance by reducing the amount of object allocation going on. We can do this because the current usage is to build up a list of StyledFragments for a range of lines, then iterate through them one by one to paint them.
The methods on this class are a subset of the List interface based on the needs of this package. Note that this is an unsynchronized class, and the StyledFragment returned by get() is just a cached member of the list - this means that multiple readers should not be using the list at the same time. This is generally not a problem as a given list will be used only by one renderer at a time.
Constructor Summary | |
---|---|
StyledFragmentsList() Constructs a new StyledFragmentList with an initial size of the default (100). |
|
StyledFragmentsList(int preferredSize) Constructs a new StyledFragmentList with the given preferred size. |
Method Summary | |
---|---|
void |
add(java.lang.String styleName, int startOffset, int endOffset) Adds the given fragment to the end of the list. |
void |
clear() Discards all fragments from the list. |
StyledFragment |
get(int index) Get the fragment at the specified index. |
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 StyledFragmentsList()
public StyledFragmentsList(int preferredSize)
preferredSize
- requested perferred sizeMethod Detail |
---|
public void add(java.lang.String styleName, int startOffset, int endOffset)
styleName
- the name of the style of the fragment to addstartOffset
- the start offset of the fragmentendOffset
- the end offset of the fragmentpublic void clear()
public int size()
public StyledFragment get(int index)
index
- the index of the fragment to retrieve
|
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 |