org.odftoolkit.simple.common.navigation
public class CellSelection extends TextSelection
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
Modifier and Type | Method and Description |
---|---|
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.
|
addComment, addHref, applyStyle, createSpanElement, cut, getContainerElement, getElement, getIndex, getText, getTextNavigation, isSelectionReplaced, newTextSelection, pasteAtEndOf, pasteAtFrontOf, refresh, refreshAfterFrontalDelete, refreshAfterFrontalInsert, replaceWith, replaceWith, replaceWith, replaceWith, replaceWith, replaceWith, replaceWith, setSelectionReplaced, toString
getNavigation
public void advancedReplaceWith(String newText, CellValueAdapter adapter) throws InvalidNavigationException
CellValueAdapter
.newText
- the replace text Stringadapter
- the CellValueAdapter
used to adapt cell value and
value typeInvalidNavigationException
- if the selection is unavailable.TextSelection.replaceWith(String)
,
CellValueAdapter
public void advancedReplaceWith(String newText) throws InvalidNavigationException
DefaultCellValueAdapter
.newText
- the replace text StringInvalidNavigationException
- if the selection is unavailable.DefaultCellValueAdapter
public Cell getCell()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.