|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.GapVector javax.swing.text.GapContent.MarkVector
Field Summary | |
(package private) GapContent.MarkData[] |
oneMark
|
Constructor Summary | |
(package private) |
GapContent.MarkVector()
|
(package private) |
GapContent.MarkVector(int size)
|
Method Summary | |
void |
addElement(GapContent.MarkData m)
Add a mark to the end |
protected Object |
allocateArray(int len)
Allocate an array to store items of the type appropriate (which is determined by the subclass). |
(package private) void |
close(int position,
int nItems)
Delete nItems at position. |
GapContent.MarkData |
elementAt(int index)
Fetches the mark at the given index |
protected Object |
getArray()
Access to the array. |
protected int |
getArrayLength()
Get the length of the allocated array |
protected int |
getGapEnd()
Access to the end of the gap. |
protected int |
getGapStart()
Access to the start of the gap. |
void |
insertElementAt(GapContent.MarkData m,
int index)
Inserts a mark into the vector |
(package private) int |
open(int position,
int nItems)
Make space for the given number of items at the given location. |
protected void |
replace(int position,
int rmSize,
Object addItems,
int addSize)
Replace the given logical position in the storage with the given new items. |
protected void |
replaceRange(int start,
int end,
Object[] marks)
Replaces the elements in the specified range with the passed in objects. |
(package private) void |
resize(int nsize)
resize the underlying storage array to the given new size |
protected void |
shiftEnd(int newSize)
Make the gap bigger, moving any necessary data and updating the appropriate marks |
protected void |
shiftGap(int newGapStart)
Move the start of the gap to a new location, without changing the size of the gap. |
protected void |
shiftGapEndUp(int newGapEnd)
Adjust the gap end upward. |
protected void |
shiftGapStartDown(int newGapStart)
Adjust the gap end downward. |
int |
size()
Returns the number of marks currently held |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
GapContent.MarkData[] oneMark
Constructor Detail |
GapContent.MarkVector()
GapContent.MarkVector(int size)
Method Detail |
protected Object allocateArray(int len)
allocateArray
in class GapVector
protected int getArrayLength()
getArrayLength
in class GapVector
public int size()
public void insertElementAt(GapContent.MarkData m, int index)
public void addElement(GapContent.MarkData m)
public GapContent.MarkData elementAt(int index)
protected void replaceRange(int start, int end, Object[] marks)
elementAt
.
protected final Object getArray()
protected final int getGapStart()
protected final int getGapEnd()
protected void replace(int position, int rmSize, Object addItems, int addSize)
position
- the location to make the replacement. This
is not the location in the underlying storage array, but
the location in the contiguous space being modeled.rmSize
- the number of items to removeaddItems
- the new items to place in storage.void close(int position, int nItems)
int open(int position, int nItems)
void resize(int nsize)
protected void shiftEnd(int newSize)
protected void shiftGap(int newGapStart)
protected void shiftGapStartDown(int newGapStart)
protected void shiftGapEndUp(int newGapEnd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |