Package com.luciad.gui
Class TLcdUndoSupport
java.lang.Object
com.luciad.gui.TLcdUndoSupport
- All Implemented Interfaces:
ILcdUndoableSource
Utility class to maintain a list of
ILcdUndoableListener
s.-
Constructor Summary
ConstructorDescriptionTLcdUndoSupport
(Object aSource) Constructs a newTLcdUndoSupport
with the specified source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addUndoableListener
(ILcdUndoableListener aListener) AddsaListener
to the list.final ILcdUndoableListener
Returns an undoable listener that forwards all received events to the registered listeners.void
fireUndoableHappened
(ILcdUndoable aUndoable) Notify all listeners in the list thataUndoable
has happened.void
removeUndoableListener
(ILcdUndoableListener aListener) RemovesaListener
from the list.
-
Constructor Details
-
TLcdUndoSupport
Constructs a newTLcdUndoSupport
with the specified source.- Parameters:
aSource
- The source that will be used as the source of the generatedTLcdUndoableEvent
objects.
-
-
Method Details
-
addUndoableListener
AddsaListener
to the list.- Specified by:
addUndoableListener
in interfaceILcdUndoableSource
- Parameters:
aListener
- The listener to add to the list.
-
removeUndoableListener
RemovesaListener
from the list.- Specified by:
removeUndoableListener
in interfaceILcdUndoableSource
- Parameters:
aListener
- The listener to remove from the list.
-
fireUndoableHappened
Notify all listeners in the list thataUndoable
has happened.- Parameters:
aUndoable
- The undoable of which the listeners should be notified.
-
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
-