|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.common.navigation.Selection
public abstract class Selection
Selection
describes one of the matched results, which is
recognized by the container element, the start index of the text content in
this element and the text content.
Constructor Summary | |
---|---|
Selection()
|
Method Summary | |
---|---|
abstract void |
cut()
Cut current Selection . |
OdfElement |
getElement()
Get the container element of this Selection . |
int |
getIndex()
Get the start index of the text content in the container element. |
abstract void |
pasteAtEndOf(Selection positionItem)
Paste current Selection at end of the specified position
Selection . |
abstract void |
pasteAtFrontOf(Selection positionItem)
Paste current Selection at front of the specified position
Selection . |
protected abstract void |
refresh(int offset)
A quick method to update the index of this Selection . |
protected abstract void |
refreshAfterFrontalDelete(Selection deletedItem)
When a selected item has been deleted, the Selection s after
this deleted Selection should be refreshed, as these
Selection s index have been changed. |
protected abstract void |
refreshAfterFrontalInsert(Selection insertedItem)
When a selected item has been inserted, the Selection after
the inserted item should be refresh, as these Selection s
index have been changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Selection()
Method Detail |
---|
public OdfElement getElement()
Selection
.
public int getIndex()
TextSelection
and its sub
classes, other type of Selection
will return 0.
public abstract void cut() throws InvalidNavigationException
Selection
.
InvalidNavigationException
public abstract void pasteAtFrontOf(Selection positionItem) throws InvalidNavigationException
Selection
at front of the specified position
Selection
.
positionItem
- the position Selection
InvalidNavigationException
public abstract void pasteAtEndOf(Selection positionItem) throws InvalidNavigationException
Selection
at end of the specified position
Selection
.
positionItem
- the position Selection
InvalidNavigationException
protected abstract void refreshAfterFrontalDelete(Selection deletedItem)
Selection
s after
this deleted Selection
should be refreshed, as these
Selection
s index have been changed.
deletedItem
- the deleted Selection
protected abstract void refreshAfterFrontalInsert(Selection insertedItem)
Selection
after
the inserted item should be refresh, as these Selection
s
index have been changed.
insertedItem
- the inserted Selection
protected abstract void refresh(int offset)
Selection
.
offset
- the offset that the index should be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |