Class SelectionManager
java.lang.Object
org.odftoolkit.odfdom.incubator.search.SelectionManager
The SelectionManager can manage all the selections that are returned to end users by a Navigation
instance. The SelectionManager contains a repository of all selections, and will refresh the
status/mIndex of selections after certain operation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrefresh(OdfElement containerElement, int offset, int positionIndex) A direct method to update all the selections contained in a mElement after a certain position.voidrefreshAfterCut(Selection cutItem) Refresh the selections in repository after a item is cut.voidrefreshAfterPasteAtEndOf(Selection item, Selection positionItem) Refresh the selections in repository after a pastedAtEndOf operation is called.voidrefreshAfterPasteAtFrontOf(Selection item, Selection positionItem) Refresh the selections in repository after a pastedAtFrontOf operation is called.voidregisterItem(Selection item) Register the selection itemvoidRemoves all selections from the SelectionManager.voidunregisterItem(Selection item) Remove the selection from repository.
-
Constructor Details
-
SelectionManager
public SelectionManager()
-
-
Method Details
-
registerItem
Register the selection item- Parameters:
item- the selection item
-
refreshAfterCut
Refresh the selections in repository after a item is cut.- Parameters:
cutItem- the cut item
-
refreshAfterPasteAtFrontOf
Refresh the selections in repository after a pastedAtFrontOf operation is called.- Parameters:
item- the pasted itempositionItem- the position item
-
refreshAfterPasteAtEndOf
Refresh the selections in repository after a pastedAtEndOf operation is called.- Parameters:
item- the pasted itempositionItem- the position item
-
unregisterItem
Remove the selection from repository.- Parameters:
item- selection item
-
unregisterAll
public void unregisterAll()Removes all selections from the SelectionManager. -
refresh
A direct method to update all the selections contained in a mElement after a certain position.- Parameters:
containerElement- the container mElementoffset- the offsetpositionIndex- the mIndex of a certain position
-