Class LocationModeAction

All Implemented Interfaces:
SharingDropDownItemAction, SharingStandardDockAction, ButtonDockAction, DockAction, DropDownItemAction, StandardDockAction, StandardDropDownItemAction
Direct Known Subclasses:
ExternalizedModeAction, MaximizedModeAction, MinimizedModeAction, NormalModeAction

public class LocationModeAction extends SimpleButtonAction
Action for changing the LocationMode of a Dockable.
Author:
Benjamin Sigg
  • Constructor Details

    • LocationModeAction

      public LocationModeAction(DockController controller, LocationMode mode, String iconKey, String textKey, String tooltipKey, PropertyKey<KeyStroke> gotoStroke)
      Creates a new action.
      Parameters:
      controller - the controller in whose realm this action works
      mode - the mode that is applied to any Dockable for which this button is pressed
      iconKey - the key of an icon to be used on this action
      textKey - the key for the text of this action when searching the TextManager
      tooltipKey - the key for the tooltip of this action when searching the TextManager
      gotoStroke - the key for an accelerator which triggers this action
  • Method Details

    • action

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

      protected void setController(DockController controller)
      Exchanges all the properties such that they are read from controller
      Parameters:
      controller - the controller from which to read properties, or null
    • getController

      protected DockController getController()
      Gets the controller from which this action currently reads its content.
      Returns:
      the controller or null
    • checkTrigger

      protected boolean checkTrigger(KeyEvent event)
      Checks whether this action is able to trigger this action.
      Parameters:
      event - an event that matches the accelerator of this action
      Returns:
      true if this action really is triggered
    • bound

      protected void bound(Dockable dockable)
      Overrides:
      bound in class SimpleDockAction
    • unbound

      protected void unbound(Dockable dockable)
      Overrides:
      unbound in class SimpleDockAction