Class SelectionManager
- java.lang.Object
-
- org.odftoolkit.odfdom.incubator.search.SelectionManager
-
public class SelectionManager extends Object
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 Constructor Description SelectionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
unregisterAll()
Removes all selections from the SelectionManager.void
unregisterItem(Selection item)
Remove the selection from repository.
-
-
-
Method Detail
-
registerItem
public void registerItem(Selection item)
Register the selection item- Parameters:
item
- the selection item
-
refreshAfterCut
public void refreshAfterCut(Selection cutItem)
Refresh the selections in repository after a item is cut.- Parameters:
cutItem
- the cut item
-
refreshAfterPasteAtFrontOf
public void refreshAfterPasteAtFrontOf(Selection item, Selection positionItem)
Refresh the selections in repository after a pastedAtFrontOf operation is called.- Parameters:
item
- the pasted itempositionItem
- the position item
-
refreshAfterPasteAtEndOf
public void refreshAfterPasteAtEndOf(Selection item, Selection positionItem)
Refresh the selections in repository after a pastedAtEndOf operation is called.- Parameters:
item
- the pasted itempositionItem
- the position item
-
unregisterItem
public void unregisterItem(Selection item)
Remove the selection from repository.- Parameters:
item
- selection item
-
unregisterAll
public void unregisterAll()
Removes all selections from the SelectionManager.
-
refresh
public void refresh(OdfElement containerElement, int offset, int positionIndex)
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
-
-