public class UndoRedoEditEvent extends EventObject
An event indicating the kind of operation occurred: undo or redo.
Modifier and Type | Field and Description |
---|---|
protected String |
myNewText |
protected String |
myOldText |
protected short |
myType |
static short |
REDO |
static short |
UNDO |
source
Constructor and Description |
---|
UndoRedoEditEvent(Object source,
short type,
String oldText,
String newText)
Constructs an UndoableEditEvent object.
|
Modifier and Type | Method and Description |
---|---|
String |
getNewText()
Returns the new text.
|
String |
getOldText()
Returns the previous text.
|
short |
getType()
Returns the edit operation identifier value.
|
String |
toString()
Returns a
String representation of this UndoRedoEditEvent . |
getSource
public static final short UNDO
public static final short REDO
protected transient short myType
protected transient String myOldText
protected transient String myNewText
public UndoRedoEditEvent(Object source, short type, String oldText, String newText)
source
- the Object that originated the event
(typically this
)type
- type of operation done (undo or redo)oldText
- text before the operationnewText
- text after the operationpublic short getType()
public String getOldText()
public String getNewText()
public String toString()
String
representation of this UndoRedoEditEvent
.toString
in class EventObject
String
representation of this UndoRedoEditEvent