Class CloseAction

All Implemented Interfaces:
SharingDropDownItemAction, SharingStandardDockAction, ButtonDockAction, DockAction, DropDownItemAction, ListeningDockAction, StandardDockAction, StandardDropDownItemAction
Direct Known Subclasses:
CCloseAction.Action

public class CloseAction extends SimpleButtonAction implements ListeningDockAction
This action shows an icon for "close". When the action is trigged, the close-method is invoked with the Dockable to close. This method will then remove the Dockable from it's parent.
Author:
Benjamin Sigg
  • Constructor Details

    • CloseAction

      public CloseAction(DockController controller)
      Sets the icon and the text of this action.
      Parameters:
      controller - The controller from which this action should read properties, might be null and can be changed by the method setController
  • Method Details

    • getCloseIcon

      public DockActionIcon getCloseIcon()
      Gets the DockActionIcon which is responsible for automatically setting the close icon.
      Returns:
      the object that sets the icon
    • getCloseIconHover

      public DockActionIcon getCloseIconHover()
      Gets the DockActionIcon which is responsible for automatically setting the close icon when the mouse is hovering over the button.
      Returns:
      the object that sets the icon
    • getCloseIconPressed

      public DockActionIcon getCloseIconPressed()
      Gets the DockActionIcon which is responsible for automatically setting the close icon if the mouse is pressed.
      Returns:
      the object that sets the icon
    • setController

      public void setController(DockController controller)
      Specified by:
      setController in interface ListeningDockAction
    • action

      public void action(Dockable dockable)
      Specified by:
      action in interface ButtonDockAction
      Overrides:
      action in class SimpleButtonAction
    • close

      protected void close(Dockable dockable)
      Invoked when the dockable has to be closed. The default-behaviour of this method is to remove the Dockable from it's parent, if there is a parent.
      Parameters:
      dockable - The Dockable to close