|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpalmed.edit.selection.AbstractAction
public abstract class AbstractAction
This class factorizes behaviours common to all actions.
| Constructor Summary | |
|---|---|
protected |
AbstractAction(ISelection selection)
Create an abstract action. |
| Method Summary | |
|---|---|
protected void |
backupData()
Backup the selected text. |
protected abstract void |
onPerform()
Perform the action. |
protected abstract boolean |
onRedo()
Redo the action. |
protected abstract boolean |
onUndo()
Undo the action. |
protected void |
overwriteFinalState(AbstractAction action)
Overwrite the current final state with the one of another action. |
void |
perform()
Perform the operation. |
protected void |
prependData(AbstractAction action)
Prepend the current backup data with the data from another action. |
void |
redo()
Redo the operation. |
protected void |
restoreData()
Remove the selected text and restore backup. |
void |
undo()
Undo the operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface palmed.edit.selection.IAction |
|---|
merge |
| Constructor Detail |
|---|
protected AbstractAction(ISelection selection)
selection - the selection| Method Detail |
|---|
public final void perform()
perform in interface IActionpublic final void undo()
undo in interface IActionpublic final void redo()
redo in interface IActionprotected abstract void onPerform()
protected abstract boolean onUndo()
protected abstract boolean onRedo()
protected final void overwriteFinalState(AbstractAction action)
action - the actionprotected final void prependData(AbstractAction action)
action - the actionprotected final void backupData()
protected final void restoreData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||