org.odftoolkit.odfdom.incubator.search
Class Selection

java.lang.Object
  extended by org.odftoolkit.odfdom.incubator.search.Selection
Direct Known Subclasses:
TextSelection

Deprecated. As of release 0.8.8, replaced by org.odftoolkit.simple.common.navigation.Selection in Simple API.

public abstract class Selection
extends Object

Abstract class Selection describe one of the matched results The selection can be recognized by the container mElement, the start mIndex of the text content of this mElement and the text content.


Constructor Summary
Selection()
          Deprecated.  
 
Method Summary
abstract  void cut()
          Deprecated. cut the current selection
 OdfElement getElement()
          Deprecated. get the container mElement of this selection
 int getIndex()
          Deprecated. get the start mIndex of the text content of the container mElement this is only meaningful for TextSelection.
abstract  void pasteAtEndOf(Selection positionitem)
          Deprecated. paste the current selection at end of the specified position selection
abstract  void pasteAtFrontOf(Selection positionitem)
          Deprecated. paste the current selection at front of the specified position selection
protected abstract  void refresh(int offset)
          Deprecated. A quick method to update the mIndex of this selection
protected abstract  void refreshAfterFrontalDelete(Selection deleteditem)
          Deprecated. when a selected item has been delete, the selections after this deleted selection should be refresh because these selections mIndex will be changed
protected abstract  void refreshAfterFrontalInsert(Selection inserteditem)
          Deprecated. when a selected item has been inserted, the selection after the inserted item should be refresh because these selections mIndex will be changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Selection

public Selection()
Deprecated. 
Method Detail

getElement

public OdfElement getElement()
Deprecated. 
get the container mElement of this selection

Returns:
the container mElement

getIndex

public int getIndex()
Deprecated. 
get the start mIndex of the text content of the container mElement this is only meaningful for TextSelection. other type Selection will return 0.

Returns:
the start mIndex of the container mElement

cut

public abstract void cut()
                  throws InvalidNavigationException
Deprecated. 
cut the current selection

Throws:
InvalidNavigationException

pasteAtFrontOf

public abstract void pasteAtFrontOf(Selection positionitem)
                             throws InvalidNavigationException
Deprecated. 
paste the current selection at front of the specified position selection

Parameters:
positionitem - the position selection
Throws:
InvalidNavigationException

pasteAtEndOf

public abstract void pasteAtEndOf(Selection positionitem)
                           throws InvalidNavigationException
Deprecated. 
paste the current selection at end of the specified position selection

Parameters:
positionitem - the position selection
Throws:
InvalidNavigationException

refreshAfterFrontalDelete

protected abstract void refreshAfterFrontalDelete(Selection deleteditem)
Deprecated. 
when a selected item has been delete, the selections after this deleted selection should be refresh because these selections mIndex will be changed

Parameters:
deleteditem - the deleted selection

refreshAfterFrontalInsert

protected abstract void refreshAfterFrontalInsert(Selection inserteditem)
Deprecated. 
when a selected item has been inserted, the selection after the inserted item should be refresh because these selections mIndex will be changed

Parameters:
inserteditem - the inserted selection

refresh

protected abstract void refresh(int offset)
Deprecated. 
A quick method to update the mIndex of this selection

Parameters:
offset - the offset that the mIndex should be added


Copyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.