Package org.basex.gui

Class GUIPopupCmd

java.lang.Object
org.basex.gui.GUIPopupCmd
All Implemented Interfaces:
GUICommand

public abstract class GUIPopupCmd extends Object implements GUICommand
This class provides a default implementation for GUI popup commands.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • GUIPopupCmd

      protected GUIPopupCmd(String label, BaseXKeys... shortcut)
      Constructor.
      Parameters:
      label - label
      shortcut - shortcut
  • Method Details

    • execute

      public abstract void execute()
      Executes the popup command.
    • execute

      public final void execute(GUI main)
      Description copied from interface: GUICommand
      Executes the command.
      Specified by:
      execute in interface GUICommand
      Parameters:
      main - reference to the main window
    • toggle

      public boolean toggle()
      Description copied from interface: GUICommand
      Indicates if this is a command that can be turned on and off.
      Specified by:
      toggle in interface GUICommand
      Returns:
      result of check
    • label

      public final String label()
      Description copied from interface: GUICommand
      Returns the command label.
      Specified by:
      label in interface GUICommand
      Returns:
      command label
    • shortCut

      public final String shortCut()
      Description copied from interface: GUICommand
      Returns a shortcut.
      Specified by:
      shortCut in interface GUICommand
      Returns:
      shortcut
    • shortcuts

      public final BaseXKeys[] shortcuts()
      Description copied from interface: GUICommand
      Returns the command shortcuts.
      Specified by:
      shortcuts in interface GUICommand
      Returns:
      command shortcut
    • enabled

      public boolean enabled(GUI main)
      Description copied from interface: GUICommand
      Checks if the command is currently enabled.
      Specified by:
      enabled in interface GUICommand
      Parameters:
      main - reference to the main window
      Returns:
      result of check
    • selected

      public boolean selected(GUI main)
      Description copied from interface: GUICommand
      Checks if the command is currently selected.
      Specified by:
      selected in interface GUICommand
      Parameters:
      main - reference to the main window
      Returns:
      result of check
    • toString

      public String toString()
      Overrides:
      toString in class Object