public class SelectionManager extends Object
Selections that are returned to end users. This
SelectionManager contains a repository of all Selections, and will refresh the
status/index of Selections after certain operation.| Constructor and Description |
|---|
SelectionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearRepository()
Clears the repository being used by the SelectionManager.
|
void |
refresh(OdfElement containerElement,
int offset,
int positionIndex)
A direct method to update all the
Selections contained in a element 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 pastedAtEndOf operation is called. |
void |
refreshAfterPasteAtFrontOf(Selection item,
Selection positionItem)
Refresh the selections in repository after pastedAtFrontOf operation is called.
|
void |
registerItem(Selection item)
Register the
Selection item. |
void |
unregisterItem(Selection item)
Remove the
Selection from repository. |
public void registerItem(Selection item)
Selection item.item - the Selection itempublic void refreshAfterCut(Selection cutItem)
Selections in repository after a item is cut.cutItem - the cut itempublic void refreshAfterPasteAtFrontOf(Selection item, Selection positionItem)
item - the pasted itempositionItem - the position itempublic void refreshAfterPasteAtEndOf(Selection item, Selection positionItem)
Selections in repository after pastedAtEndOf operation is called.item - the pasted itempositionItem - the position itempublic void unregisterItem(Selection item)
Selection from repository.item - Selection itempublic void refresh(OdfElement containerElement, int offset, int positionIndex)
Selections contained in a element after a
certain position.containerElement - the container elementoffset - the offsetpositionIndex - the index of a certain positionpublic void clearRepository()
Copyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.