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 TypeMethodDescriptionvoid
refresh
(OdfElement containerElement, int offset, int positionIndex) A direct method to update all the selections contained in a mElement after a certain position.void
refreshAfterCut
(Selection cutItem) Refresh the selections in repository after a item is cut.void
refreshAfterPasteAtEndOf
(Selection item, Selection positionItem) Refresh the selections in repository after a pastedAtEndOf operation is called.void
refreshAfterPasteAtFrontOf
(Selection item, Selection positionItem) Refresh the selections in repository after a pastedAtFrontOf operation is called.void
registerItem
(Selection item) Register the selection itemvoid
Removes all selections from the SelectionManager.void
unregisterItem
(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
-