|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.common.navigation.Selection
org.odftoolkit.simple.common.navigation.TextSelection
org.odftoolkit.simple.common.navigation.CellSelection
public class CellSelection
Based on TextSelection
, CellSelection
updates table
cell value and value type when the cell text is replaced by other content.
This is a more complete realization than TextSelection for cell content
replacement, which keeps the synchronization among cell value, value type and
display text.
TextSelection
,
CellValueAdapter
Method Summary | |
---|---|
void |
advancedReplaceWith(String newText)
Replace the text content of selection with a new string. |
void |
advancedReplaceWith(String newText,
CellValueAdapter adapter)
Replace the text content of selection with a new string. |
Cell |
getCell()
Get the selected table cell. |
void |
replaceWith(String newText)
Replace the text content of selection with a new string. |
Methods inherited from class org.odftoolkit.simple.common.navigation.TextSelection |
---|
addComment, addHref, applyStyle, createSpanElement, cut, getContainerElement, getElement, getIndex, getText, newTextSelection, pasteAtEndOf, pasteAtFrontOf, refresh, refreshAfterFrontalDelete, refreshAfterFrontalInsert, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void replaceWith(String newText) throws InvalidNavigationException
replaceWith
in class TextSelection
newText
- the replace text String
InvalidNavigationException
- if the selection is unavailable.Cell.setValueType(String)
,
Cell.setStringValue(String)
public void advancedReplaceWith(String newText, CellValueAdapter adapter) throws InvalidNavigationException
CellValueAdapter
.
newText
- the replace text Stringadapter
- the CellValueAdapter
used to adapt cell value and
value type
InvalidNavigationException
- if the selection is unavailable.replaceWith(String)
,
CellValueAdapter
public void advancedReplaceWith(String newText) throws InvalidNavigationException
DefaultCellValueAdapter
.
newText
- the replace text String
InvalidNavigationException
- if the selection is unavailable.DefaultCellValueAdapter
public Cell getCell()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |