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

public abstract class ALcdAction extends Object implements ILcdAction
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 Details

    • changeSupport

      protected PropertyChangeSupport changeSupport
      Support for firing property change events and registering property change listeners.
  • Constructor Details

    • ALcdAction

      public ALcdAction()
      Defines an Action object with a default description string and default icon.
    • ALcdAction

      public ALcdAction(String aName)
      Defines an Action object with the specified description string and a default icon.
      Parameters:
      aName - a textual representation of this action.
    • ALcdAction

      public ALcdAction(String aName, ILcdIcon aIcon)
      Defines an Action 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 is true 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 either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false 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.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • registerInstance

      protected void registerInstance()
    • setDisplayName

      public void setDisplayName(String aDisplayName)
      Deprecated.
      use setName(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

      public String getDisplayName()
      Deprecated.
      use getName() 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

      public Object getValue(String aKey)
      Returns a value associated with a aKey for this action
      Specified by:
      getValue in interface ILcdAction
      Parameters:
      aKey - the aKey to associate a value with.
    • putValue

      public void putValue(String aKey, Object aValue)
      Associates a value with a aKey for this action and fires a property change event.
      Specified by:
      putValue in interface ILcdAction
      Parameters:
      aKey - the key to associate a value with.
      aValue - a value associated with the key.
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface ILcdAction
    • setEnabled

      public void setEnabled(boolean aEnabled)
      Description copied from interface: ILcdAction
      Sets/tests the enabled state of the ILcdAction. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method.
      Specified by:
      setEnabled in interface ILcdAction
    • firePropertyChange

      protected void firePropertyChange(String aPropertyName, Object aOldValue, Object aNewValue)
      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 changed
      aOldValue - the old value of the property.
      aNewValue - the new value of the property.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aListener)
      Adds a PropertyChangeListener 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 interface ILcdPropertyChangeSource
      Parameters:
      aListener - the PropertyChangeListener to be added.
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aListener)
      Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
      Specified by:
      removePropertyChangeListener in interface ILcdPropertyChangeSource
      Parameters:
      aListener - the PropertyChangeListener to be removed.
      See Also:
    • getName

      public String getName()
      Returns the (display) name of this action. It is functionally equivalent to getValue( ILcdAction.NAME ).
      Returns:
      The name of this action.
    • setName

      public void setName(String aName)
      Sets the (display) name of this action. It is functionally equivalent to putValue( ILcdAction.NAME, aName ).
      Parameters:
      aName - The name of this action.
    • getIcon

      public ILcdIcon getIcon()
      Returns the graphical representation of this action. It is functionally equivalent to getValue( ILcdAction.SMALL_ICON ).
      Returns:
      the graphical representation of this action.
    • setIcon

      public void setIcon(ILcdIcon aIcon)
      Sets the graphical representation of this action. It is functionally equivalent to putValue( ILcdAction.SMALL_ICON, aName ).
      Parameters:
      aIcon - the graphical representation of this action.
    • getShortDescription

      public String getShortDescription()
      Returns the short description of this action. It is functionally equivalent to getValue( ILcdAction.SHORT_DESCRIPTION ).
      Returns:
      The short description of this action.
    • setShortDescription

      public void setShortDescription(String aShortDescription)
      Sets the short description of this action. It is functionally equivalent to putValue( ILcdAction.SHORT_DESCRIPTION, aShortDescription ).
      Parameters:
      aShortDescription - The short description of this action.
    • setLongDescription

      public void setLongDescription(String aLongDescription)
      Sets the long description of this action. It is functionally equivalent to putValue( ILcdAction.LONG_DESCRIPTION, aLongDescription ).
      Parameters:
      aLongDescription - The long description of this action.
    • getLongDescription

      public String getLongDescription()
      Returns the long description of this action. It is functionally equivalent to getValue( ILcdAction.LONG_DESCRIPTION ).
      Returns:
      The long description of this action.