Class 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
    • Field Detail

      • 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 event
        undoPoint - the undo point that got added or removed from the Undo list
        type - 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