Class TLcyInterruptTaskAction

java.lang.Object
com.luciad.gui.ALcdAction
com.luciad.lucy.gui.status.TLcyInterruptTaskAction
All Implemented Interfaces:
ILcdAction, ILcyCustomizableRepresentationAction, ILcdPropertyChangeSource, ILcdStatusListener, ActionListener, Serializable, EventListener

public class TLcyInterruptTaskAction extends ALcdAction implements ILcdStatusListener, ILcyCustomizableRepresentationAction

Action to interrupt the current task using Thread#interrupt. It is up to the user of this class to attach this ILcdStatusListener to a source of status events, so it can monitor the current tasks.

This action sets its ILcdAction.VISIBLE property to false when it is not applicable. This means no task is ongoing, or the task is blocking. Blocking tasks block user input (e.g. by using TLcyUserInteractionBlocker), and therefore the user cannot click the button anyway.

See Also:
  • Constructor Details

    • TLcyInterruptTaskAction

      public TLcyInterruptTaskAction(ILcyLucyEnv aLucyEnv)
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • statusChanged

      public void statusChanged(TLcdStatusEvent event)
      Description copied from interface: ILcdStatusListener
      This method will be called when the status of an Object to which this ILcdStatusListener has been registered has changed.
      Specified by:
      statusChanged in interface ILcdStatusListener
      Parameters:
      event - a TLcdStatusEvent detailing the status changes.
    • customizeRepresentation

      public Component customizeRepresentation(Component aDefaultComponent, ILcdAction aWrapperAction, ILcyActionBar aActionBar)
      Description copied from interface: ILcyCustomizableRepresentationAction

      Allows to customize or replace the default component that is used to represent this ILcdAction (typically a JButton).

      Specified by:
      customizeRepresentation in interface ILcyCustomizableRepresentationAction
      Parameters:
      aDefaultComponent - The component that normally represents this action.
      aWrapperAction - In case this action is wrapped (for example when using (TLcyActionBarUtil), this parameter is the wrapper action, if not, it is this action. This is useful to retrieve properties such as the name or the icon of the action which can be different for different wrapper instances. E.g., a tool bar might use a different icon as a menu bar. And if the action is customized for the tool bar, it might be required to retrieve the tool bar icon.
      aActionBar - The action bar in which this action is going to be inserted, provided as contextual information.
      Returns:
      A customized or new component to represent this action. The simplest (but not useful) implementation of this method would be return aDefaultComponent;.
      See Also: