Package adams.gui.event
Class UndoEvent
- java.lang.Object
-
- java.util.EventObject
-
- adams.gui.event.UndoEvent
-
- All Implemented Interfaces:
Serializable
public class UndoEvent extends EventObject
An event that gets sent in case of an Undo event (add, undo).- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UndoEvent.UndoType
The enum of event types.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Success
whether the action was successful.protected UndoEvent.UndoType
m_Type
the type of event.protected Undo.UndoPoint
m_UndoPoint
the undo point that got added, removed, etc.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description UndoEvent(Object source, Undo.UndoPoint undoPoint, UndoEvent.UndoType type, boolean success)
Initializes the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getSuccess()
Returns whether the action was successful.UndoEvent.UndoType
getType()
Returns the type of event.Undo
getUndo()
Returns the undo manager responsible for this event.Undo.UndoPoint
getUndoPoint()
Returns the undo point that was added to, removed from, etc.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Field Detail
-
m_Type
protected UndoEvent.UndoType m_Type
the type of event.
-
m_UndoPoint
protected Undo.UndoPoint m_UndoPoint
the undo point that got added, removed, etc.
-
m_Success
protected boolean m_Success
whether the action was successful.
-
-
Constructor Detail
-
UndoEvent
public UndoEvent(Object source, Undo.UndoPoint undoPoint, UndoEvent.UndoType type, boolean success)
Initializes the event.- Parameters:
source
- the Undo manager that sent the eventundoPoint
- the undo point that got added or removed from the Undo listtype
- the type of event: add, remove, etc.success
- whether the action was successful
-
-
Method Detail
-
getUndo
public Undo getUndo()
Returns the undo manager responsible for this event.- Returns:
- the undo manager
-
getUndoPoint
public Undo.UndoPoint getUndoPoint()
Returns the undo point that was added to, removed from, etc. the undo list. Can be null in case of a CLEAR event.- Returns:
- the object
-
getType
public UndoEvent.UndoType getType()
Returns the type of event.- Returns:
- the type
-
getSuccess
public boolean getSuccess()
Returns whether the action was successful.- Returns:
- true if the action was successful
-
-