Class TLcdUndoSupport

java.lang.Object
com.luciad.gui.TLcdUndoSupport
All Implemented Interfaces:
ILcdUndoableSource

public class TLcdUndoSupport extends Object implements ILcdUndoableSource
Utility class to maintain a list of ILcdUndoableListeners.
  • Constructor Details

    • TLcdUndoSupport

      public TLcdUndoSupport(Object aSource)
      Constructs a new TLcdUndoSupport with the specified source.
      Parameters:
      aSource - The source that will be used as the source of the generated TLcdUndoableEvent objects.
  • Method Details

    • addUndoableListener

      public void addUndoableListener(ILcdUndoableListener aListener)
      Adds aListener to the list.
      Specified by:
      addUndoableListener in interface ILcdUndoableSource
      Parameters:
      aListener - The listener to add to the list.
    • removeUndoableListener

      public void removeUndoableListener(ILcdUndoableListener aListener)
      Removes aListener from the list.
      Specified by:
      removeUndoableListener in interface ILcdUndoableSource
      Parameters:
      aListener - The listener to remove from the list.
    • fireUndoableHappened

      public void fireUndoableHappened(ILcdUndoable aUndoable)
      Notify all listeners in the list that aUndoable has happened.
      Parameters:
      aUndoable - The undoable of which the listeners should be notified.
    • asListener

      public final ILcdUndoableListener asListener()
      Returns an undoable listener that forwards all received events to the registered listeners. Calling this method multiple times will always return the same instance.
      Returns:
      a forwarding undoable listener.
      Since:
      2017.0