Package org.basex.gui
Class GUIPopupCmd
java.lang.Object
org.basex.gui.GUIPopupCmd
- All Implemented Interfaces:
GUICommand
This class provides a default implementation for GUI popup commands.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
Fields inherited from interface org.basex.gui.GUICommand
SEPARATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGUIPopupCmd(String label, BaseXKeys... shortcut) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the command is currently enabled.abstract voidexecute()Executes the popup command.final voidExecutes the command.final Stringlabel()Returns the command label.booleanChecks if the command is currently selected.final StringshortCut()Returns a shortcut.final BaseXKeys[]Returns the command shortcuts.booleantoggle()Indicates if this is a command that can be turned on and off.toString()
-
Constructor Details
-
GUIPopupCmd
Constructor.- Parameters:
label- labelshortcut- shortcut
-
-
Method Details
-
execute
public abstract void execute()Executes the popup command. -
execute
Description copied from interface:GUICommandExecutes the command.- Specified by:
executein interfaceGUICommand- Parameters:
main- reference to the main window
-
toggle
public boolean toggle()Description copied from interface:GUICommandIndicates if this is a command that can be turned on and off.- Specified by:
togglein interfaceGUICommand- Returns:
- result of check
-
label
Description copied from interface:GUICommandReturns the command label.- Specified by:
labelin interfaceGUICommand- Returns:
- command label
-
shortCut
Description copied from interface:GUICommandReturns a shortcut.- Specified by:
shortCutin interfaceGUICommand- Returns:
- shortcut
-
shortcuts
Description copied from interface:GUICommandReturns the command shortcuts.- Specified by:
shortcutsin interfaceGUICommand- Returns:
- command shortcut
-
enabled
Description copied from interface:GUICommandChecks if the command is currently enabled.- Specified by:
enabledin interfaceGUICommand- Parameters:
main- reference to the main window- Returns:
- result of check
-
selected
Description copied from interface:GUICommandChecks if the command is currently selected.- Specified by:
selectedin interfaceGUICommand- Parameters:
main- reference to the main window- Returns:
- result of check
-
toString
-