|
||||||||||
| 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.ImageSelection
public class ImageSelection
This is a decorator class of TextSelection, which help user replace a text content with a Image from Document or from URI.
| Field Summary |
|---|
| Fields inherited from class org.odftoolkit.simple.common.navigation.Selection |
|---|
search |
| Constructor Summary | |
|---|---|
ImageSelection(TextSelection selection)
Construct a ImageSelection with TextSelection. |
|
| Method Summary | |
|---|---|
void |
cut()
Delete the selection from the document the other matched selection in the same container element will be updated automatically because the start index of the following selections will be changed when the previous selection has been deleted. |
void |
pasteAtEndOf(Selection positionItem)
Paste this selection just after a specific selection. |
void |
pasteAtFrontOf(Selection positionItem)
Paste this selection just before a specific selection. |
protected void |
refresh(int offset)
A quick method to update the index of this Selection. |
protected void |
refreshAfterFrontalDelete(Selection deletedItem)
When a selected item has been deleted, the Selections after
this deleted Selection should be refreshed, as these
Selections index have been changed. |
protected void |
refreshAfterFrontalInsert(Selection insertedItem)
When a selected item has been inserted, the Selection after
the inserted item should be refresh, as these Selections
index have been changed. |
Image |
replaceWithImage(Image image)
Replace the content with a Image |
Image |
replaceWithImage(URI imageUri)
Replace the content with a Image |
| Methods inherited from class org.odftoolkit.simple.common.navigation.Selection |
|---|
getElement, getIndex, getNavigation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageSelection(TextSelection selection)
selection - the TextSelection to be decorated.| Method Detail |
|---|
public Image replaceWithImage(Image image)
image - the reference Image to replace.
public Image replaceWithImage(URI imageUri)
imageUri - the URI of the reference Image to replace
public void cut()
throws InvalidNavigationException
cut in class SelectionInvalidNavigationException - if the selection is unavailable.
public void pasteAtEndOf(Selection positionItem)
throws InvalidNavigationException
pasteAtEndOf in class SelectionpositionItem - a selection that is used to point out the position
InvalidNavigationException - if the selection is unavailable.
public void pasteAtFrontOf(Selection positionItem)
throws InvalidNavigationException
pasteAtFrontOf in class SelectionpositionItem - a selection that is used to point out the position
InvalidNavigationException - if the selection is unavailable.protected void refresh(int offset)
SelectionSelection.
refresh in class Selectionoffset - the offset that the index should be added.protected void refreshAfterFrontalDelete(Selection deletedItem)
SelectionSelections after
this deleted Selection should be refreshed, as these
Selections index have been changed.
refreshAfterFrontalDelete in class SelectiondeletedItem - the deleted Selectionprotected void refreshAfterFrontalInsert(Selection insertedItem)
SelectionSelection after
the inserted item should be refresh, as these Selections
index have been changed.
refreshAfterFrontalInsert in class SelectioninsertedItem - the inserted Selection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||