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
,TLcdBeanEditAction
,TLcdBeanPropertyEditAction
,TLcdExitAction
,TLcdFitGXYLayerInViewClipAction
,TLcdFitSelectionInViewClipAction
,TLcdGXYSetControllerAction
,TLcdGXYViewFitAction
,TLcdGXYViewPanAction
,TLcdGXYViewZoomAction
,TLcdMoveLayerAction
,TLcdNoopAction
,TLcdOpenAction
,TLcdPrintComponentAction
,TLcdRedoAction
,TLcdRemoveLayerAction
,TLcdSaveAction
,TLcdSaveGXYViewAsGIFAction
,TLcdSetProjectionAction
,TLcdUndoAction
,TLcdUpdateTerrainModelAction
,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
Modifier and TypeFieldDescriptionprotected PropertyChangeSupport
Support 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
ConstructorDescriptionDefines anAction
object with a default description string and default icon.ALcdAction
(String aName) Defines anAction
object with the specified description string and a default icon.ALcdAction
(String aName, ILcdIcon aIcon) Defines anAction
object with the specified description string and a the specified aIcon. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aListener) Adds aPropertyChangeListener
to the listener list.protected void
firePropertyChange
(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 actionboolean
boolean
Deprecated.This method has been deprecated.void
Associates a value with a aKey for this action and fires a property change event.protected void
void
Removes aPropertyChangeListener
from the listener list.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
setDisplayName
(String aDisplayName) Deprecated.usesetName(java.lang.String)
instead, which is already a display name.void
setEnabled
(boolean aEnabled) Sets/tests the enabled state of theILcdAction
.void
Sets the graphical representation of this action.void
setLongDescription
(String aLongDescription) Sets the long description of this action.void
Sets the (display) name of this action.void
setShortDescription
(String aShortDescription) Sets the short description of this action.void
setTraceOn
(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, wait
Methods 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 anAction
object with a default description string and default icon. -
ALcdAction
Defines anAction
object with the specified description string and a default icon.- Parameters:
aName
- a textual representation of this action.
-
ALcdAction
Defines anAction
object 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 istrue
then 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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then 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.Returnstrue
if 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:
getValue
in 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:
putValue
in interfaceILcdAction
- Parameters:
aKey
- the key to associate a value with.aValue
- a value associated with the key.
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceILcdAction
-
setEnabled
public void setEnabled(boolean aEnabled) Description copied from interface:ILcdAction
Sets/tests the enabled state of theILcdAction
. When enabled, any component associated with this object is active and able to fire this object'sactionPerformed
method.- Specified by:
setEnabled
in 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 aPropertyChangeListener
to the listener list. The listener is registered for all properties.A
PropertyChangeEvent
will 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:
addPropertyChangeListener
in interfaceILcdPropertyChangeSource
- Parameters:
aListener
- thePropertyChangeListener
to be added.- See Also:
-
removePropertyChangeListener
Removes aPropertyChangeListener
from the listener list. This removes aPropertyChangeListener
that was registered for all properties.- Specified by:
removePropertyChangeListener
in interfaceILcdPropertyChangeSource
- Parameters:
aListener
- thePropertyChangeListener
to 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.