Package com.luciad.gui
Class ALcdAction
java.lang.Object
com.luciad.gui.ALcdAction
- All Implemented Interfaces:
ILcdAction,ILcdPropertyChangeSource,ActionListener,Serializable,EventListener
- Direct Known Subclasses:
ALcdKML22ViewFitAction,ALcdObjectSelectionAction,ALcyCreateLayersAction,ALcyObjectSelectionAction,TLcdBeanEditAction,TLcdBeanPropertyEditAction,TLcdExitAction,TLcdFitGXYLayerInViewClipAction,TLcdFitSelectionInViewClipAction,TLcdGXYSetControllerAction,TLcdGXYViewFitAction,TLcdGXYViewPanAction,TLcdGXYViewZoomAction,TLcdMoveLayerAction,TLcdNoopAction,TLcdOpenAction,TLcdPrintComponentAction,TLcdRedoAction,TLcdRemoveLayerAction,TLcdSaveAction,TLcdSaveGXYViewAsGIFAction,TLcdSetProjectionAction,TLcdUndoAction,TLcdUpdateTerrainModelAction,TLcyInterruptTaskAction,TLcyStartNewMapComponentAction,TLspSetControllerAction
An abstract implementation of an
ILcdAction, that provides
set and get methods for properties common to all actions and support for notifying listeners of changes
to those properties.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyChangeSupportSupport for firing property change events and registering property change listeners.Fields inherited from interface com.luciad.gui.ILcdAction
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE -
Constructor Summary
ConstructorsConstructorDescriptionDefines anActionobject with a default description string and default icon.ALcdAction(String aName) Defines anActionobject with the specified description string and a default icon.ALcdAction(String aName, ILcdIcon aIcon) Defines anActionobject with the specified description string and a the specified aIcon. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aListener) Adds aPropertyChangeListenerto the listener list.protected voidfirePropertyChange(String aPropertyName, Object aOldValue, Object aNewValue) Notifies all property change listeners that the value of a property has changed.Deprecated.getIcon()Returns the graphical representation of this action.Returns the long description of this action.getName()Returns the (display) name of this action.Returns the short description of this action.Returns a value associated with a aKey for this actionbooleanbooleanDeprecated.This method has been deprecated.voidAssociates a value with a aKey for this action and fires a property change event.protected voidvoidRemoves aPropertyChangeListenerfrom the listener list.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetDisplayName(String aDisplayName) Deprecated.usesetName(java.lang.String)instead, which is already a display name.voidsetEnabled(boolean aEnabled) Sets/tests the enabled state of theILcdAction.voidSets the graphical representation of this action.voidsetLongDescription(String aLongDescription) Sets the long description of this action.voidSets the (display) name of this action.voidsetShortDescription(String aShortDescription) Sets the short description of this action.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.awt.event.ActionListener
actionPerformed
-
Field Details
-
changeSupport
Support for firing property change events and registering property change listeners.
-
-
Constructor Details
-
ALcdAction
public ALcdAction()Defines anActionobject with a default description string and default icon. -
ALcdAction
Defines anActionobject with the specified description string and a default icon.- Parameters:
aName- a textual representation of this action.
-
ALcdAction
Defines anActionobject with the specified description string and a the specified aIcon.- Parameters:
aName- a textual representation of this action.aIcon- a graphical representation of this action.
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
registerInstance
protected void registerInstance() -
setDisplayName
Deprecated.usesetName(java.lang.String)instead, which is already a display name. Sets a text to be used for a textual display of this action.- Parameters:
aDisplayName- a text to be used for a textual display of this action.- See Also:
-
getDisplayName
Deprecated.usegetName()instead, which is already a display name. Returns the text that should be used as a textual display of this action. Default value is "ALcdAction".- Returns:
- the text that should be used as a textual display of this action.
- See Also:
-
getValue
Returns a value associated with a aKey for this action- Specified by:
getValuein interfaceILcdAction- Parameters:
aKey- the aKey to associate a value with.
-
putValue
Associates a value with a aKey for this action and fires a property change event.- Specified by:
putValuein interfaceILcdAction- Parameters:
aKey- the key to associate a value with.aValue- a value associated with the key.
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceILcdAction
-
setEnabled
public void setEnabled(boolean aEnabled) Description copied from interface:ILcdActionSets/tests the enabled state of theILcdAction. When enabled, any component associated with this object is active and able to fire this object'sactionPerformedmethod.- Specified by:
setEnabledin interfaceILcdAction
-
firePropertyChange
Notifies all property change listeners that the value of a property has changed. This method should be called from every method that sets a property value in which another class may be interested.- Parameters:
aPropertyName- the name of the property that has changedaOldValue- the old value of the property.aNewValue- the new value of the property.
-
addPropertyChangeListener
Adds aPropertyChangeListenerto the listener list. The listener is registered for all properties.A
PropertyChangeEventwill get fired in response to setting a bound property, e.g. setFont, setBackground, or setForeground. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aListener- thePropertyChangeListenerto be added.- See Also:
-
removePropertyChangeListener
Removes aPropertyChangeListenerfrom the listener list. This removes aPropertyChangeListenerthat was registered for all properties.- Specified by:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aListener- thePropertyChangeListenerto be removed.- See Also:
-
getName
Returns the (display) name of this action. It is functionally equivalent togetValue( ILcdAction.NAME ).- Returns:
- The name of this action.
-
setName
Sets the (display) name of this action. It is functionally equivalent toputValue( ILcdAction.NAME, aName ).- Parameters:
aName- The name of this action.
-
getIcon
Returns the graphical representation of this action. It is functionally equivalent togetValue( ILcdAction.SMALL_ICON ).- Returns:
- the graphical representation of this action.
-
setIcon
Sets the graphical representation of this action. It is functionally equivalent toputValue( ILcdAction.SMALL_ICON, aName ).- Parameters:
aIcon- the graphical representation of this action.
-
getShortDescription
Returns the short description of this action. It is functionally equivalent togetValue( ILcdAction.SHORT_DESCRIPTION ).- Returns:
- The short description of this action.
-
setShortDescription
Sets the short description of this action. It is functionally equivalent toputValue( ILcdAction.SHORT_DESCRIPTION, aShortDescription ).- Parameters:
aShortDescription- The short description of this action.
-
setLongDescription
Sets the long description of this action. It is functionally equivalent toputValue( ILcdAction.LONG_DESCRIPTION, aLongDescription ).- Parameters:
aLongDescription- The long description of this action.
-
getLongDescription
Returns the long description of this action. It is functionally equivalent togetValue( ILcdAction.LONG_DESCRIPTION ).- Returns:
- The long description of this action.
-
getName()instead, which is already a display name.