Package com.luciad.gui
Class TLcdUndoSupport
java.lang.Object
com.luciad.gui.TLcdUndoSupport
- All Implemented Interfaces:
ILcdUndoableSource
Utility class to maintain a list of
ILcdUndoableListeners.-
Constructor Summary
ConstructorsConstructorDescriptionTLcdUndoSupport(Object aSource) Constructs a newTLcdUndoSupportwith the specified source. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUndoableListener(ILcdUndoableListener aListener) AddsaListenerto the list.final ILcdUndoableListenerReturns an undoable listener that forwards all received events to the registered listeners.voidfireUndoableHappened(ILcdUndoable aUndoable) Notify all listeners in the list thataUndoablehas happened.voidremoveUndoableListener(ILcdUndoableListener aListener) RemovesaListenerfrom the list.
-
Constructor Details
-
TLcdUndoSupport
Constructs a newTLcdUndoSupportwith the specified source.- Parameters:
aSource- The source that will be used as the source of the generatedTLcdUndoableEventobjects.
-
-
Method Details
-
addUndoableListener
AddsaListenerto the list.- Specified by:
addUndoableListenerin interfaceILcdUndoableSource- Parameters:
aListener- The listener to add to the list.
-
removeUndoableListener
RemovesaListenerfrom the list.- Specified by:
removeUndoableListenerin interfaceILcdUndoableSource- Parameters:
aListener- The listener to remove from the list.
-
fireUndoableHappened
Notify all listeners in the list thataUndoablehas 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
-