|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
ch.randelshofer.undo.UndoableIntEdit
public abstract class UndoableIntEdit
This is an abstract class for undoable int properties.
| Field Summary | |
|---|---|
protected boolean |
isCoalesce
|
protected int |
newValue
|
protected int |
oldValue
|
protected java.lang.String |
propertyName
|
protected java.lang.Object |
source
|
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
UndoableIntEdit(java.lang.Object source,
java.lang.String propertyName,
int oldValue,
int newValue)
Creates new IntPropertyEdit of which consecutive edits are not coalesced. |
|
UndoableIntEdit(java.lang.Object source,
java.lang.String propertyName,
int oldValue,
int newValue,
boolean coalesce)
Creates new IntPropertyEdit |
|
| Method Summary | |
|---|---|
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
This UndoableEdit should absorb anEdit if it can. |
java.lang.String |
getPresentationName()
The name to be displayed in the undo/redo menu. |
void |
redo()
Re-apply the edit, assuming that it has been undone. |
abstract void |
revert(int oldValue,
int newValue)
Revert the property from the oldValue to the newValue. |
void |
undo()
Undo the edit that was made. |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Object source
protected java.lang.String propertyName
protected int oldValue
protected int newValue
protected boolean isCoalesce
| Constructor Detail |
|---|
public UndoableIntEdit(java.lang.Object source,
java.lang.String propertyName,
int oldValue,
int newValue)
source - The Object to which the property belongs.propertyName - The name of the property.oldValue - The old value of the property.newValue - The new value of the property.
public UndoableIntEdit(java.lang.Object source,
java.lang.String propertyName,
int oldValue,
int newValue,
boolean coalesce)
source - The Object to which the property belongs.propertyName - The name of the property.oldValue - The old value of the property.newValue - The new value of the property.coalesce - Set to true, if consecutive edits shall be coalesced.| Method Detail |
|---|
public void redo()
redo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.AbstractUndoableEditpublic void undo()
undo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.AbstractUndoableEditpublic java.lang.String getPresentationName()
getPresentationName in interface javax.swing.undo.UndoableEditgetPresentationName in class javax.swing.undo.AbstractUndoableEditpublic boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
Typically the receiver is already in the queue of a UndoManager (or other UndoableEditListener), and is being given a chance to incorporate anEdit rather than letting it be added to the queue in turn.
If true is returned, from now on anEdit must return false from canUndo() and canRedo(), and must throw the appropriate exception on undo() or redo().
addEdit in interface javax.swing.undo.UndoableEditaddEdit in class javax.swing.undo.AbstractUndoableEdit
public abstract void revert(int oldValue,
int newValue)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||