Class Commands
- java.lang.Object
-
- ca.cgjennings.apps.arkham.commands.Commands
-
public class Commands extends java.lang.Object
Standard command actions supported by Strange Eons.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Field Summary
Fields Modifier and Type Field Description static AbstractCommand
ABOUT
Displays the About dialog.static DelegatedCommand
ALIGN_BOTTOM
Aligns the selected objects to the bottom edge of the most recently selected object.static DelegatedCommand
ALIGN_CENTER
Aligns the selected objects to the horizontal centre of the most recently selected object.static DelegatedCommand
ALIGN_LEFT
Aligns the selected objects to the left edge of the most recently selected object.static DelegatedCommand
ALIGN_MIDDLE
Aligns the selected objects to the vertical middle of the most recently selected object.static DelegatedCommand
ALIGN_RIGHT
Aligns the selected objects to the right edge of the most recently selected object.static DelegatedCommand
ALIGN_TOP
Aligns the selected objects to the top edge of the most recently selected object.static DelegatedCommand
CENTER_CONTENT
Centers all content on a deck page.static DelegatedCommand
CLEAR
Clears all content from editors that support this command.static AbstractCommand
CLOSE
Closes the active editor.static AbstractCommand
CLOSE_ALL
Closes all open editors.static AbstractCommand
CLOSE_PROJECT
Closes the open project, if any.static AbstractCommand
CODE_ABBREVIATIONS
Displays the source code abbreviation table editor.static DelegatedCommand
COMMENT_OUT
Comments out the selected lines in a code editor.static DelegatedCommand
COMPLETE_CODE
Opens the code completion popup in the current code editor, if available.static AbstractCommand
CONFIGURE_UPDATES
Opens a dialog box that allows the user to configure update notifications.static DelegatedCommand
COPY
ADelegatedCommand
for the clipboard copy operation.static DelegatedCommand
COPY_STYLE
Copy the style information for the current selection into the global style clipboard.static DelegatedCommand
CUT
ADelegatedCommand
for the clipboard cut operation.static DelegatedCommand
DEBUG_FILE
Debugs the script in the active code editor.static DelegatedCommand
DISTRIBUTE_HORZ
Distributes the selected objects evenly across the horizontal axis.static DelegatedCommand
DISTRIBUTE_VERT
Distributes the selected objects evenly across the vertical axis.static DelegatedCommand
EDIT_PAGE_ITEM
Edits the selected an item in a deck; if the selection has more than one object in it, only the last-selected item is considered.static DelegatedCommand
EDIT_STYLE
Opens the style editor for the selected page items in a deck.static AbstractCommand
EXIT
Exits the application after giving the user a chance to save open files with unsaved changes.static DelegatedCommand
EXPANSION_CHOOSE
Opens anExpansionSelectionDialog
for the active game component editor.static DelegatedCommand
EXPANSION_COPY
Copies the expansion symbol on the current component.static DelegatedCommand
EXPANSION_NEW
Creates a new expansion symbol.static DelegatedCommand
EXPANSION_PASTE
Pastes the last-copies expansion symbol onto the current component.static DelegatedCommand
EXPORT
Exports content from editors that support this command.static AbstractCommand
FILE_BUG_REPORT
Files a bug report with no specific message or exception information.static DelegatedCommand
FIND
Activates a search tool in an editor that supports this command.static AbstractCommand
FIND_IN_PROJECT
Activates the find in project field, making it visible if necessary.static DelegatedCommand
FLIP_HORZ
Mirrors the deck selection horizontally.static DelegatedCommand
FLIP_VERT
Mirrors the deck selection vertically.static DelegatedCommand
FORMAT_CODE
Formats (pretty prints) the current editor content, if a suitable formatter is available.static DelegatedCommand
GROUP
Groups together the selected objects.static DelegatedCommand
HELP
Command that displays context-sensitive help.static java.lang.String
HELP_CONTEXT_PROPERTY
A client property that names a Web page that shows help for that part of the interface.static AbstractCommand
HELP_DEV_JAVA_API
Opens the Java API documentation for browsing.static AbstractCommand
HELP_DEV_JS_API
Opens the JS API documentation for browsing.static AbstractCommand
HELP_DEV_MANUAL
Opens the Developer Manual for browsing.static AbstractCommand
HELP_TRANSLATOR_MANUAL
Opens the Translation Manual for browsing.static AbstractCommand
HELP_USER_MANUAL
Opens the User Manual for browsing.static DelegatedCommand
LOCK
Locks the selected deck items.static AbstractCommand
MAKE_BUNDLE
Makes the bundle associated with the open editor file (or project view selection).static AbstractCommand
MARKUP_ABBREVIATIONS
Displays the markup abbreviation table editor.static DelegatedCommand
MARKUP_ALIGNMENT
Opens a dialog that allows the user to modify the paragraph attributes of a block of markup text.static DelegatedCommand
MARKUP_BOLD
Inserts or removes bold tags around the selected text.static DelegatedCommand
MARKUP_HEADING
Inserts or removes heading tags around the selected text.static DelegatedCommand
MARKUP_INSERT_CHARACTERS
Opens a dialog that allows the user to select an symbol or character to be inserted into the markup target.static DelegatedCommand
MARKUP_INSERT_COLOUR
Opens a dialog that allows the user to modify the paragraph attributes of a block of markup text.static DelegatedCommand
MARKUP_INSERT_FONT
Opens a dialog that allows the user to modify the font attributes of a block of markup text.static DelegatedCommand
MARKUP_INSERT_IMAGE
Opens a dialog that allows the user to select an image, a tag for which will be inserted into the markup target.static DelegatedCommand
MARKUP_ITALIC
Inserts or removes italic tags around the selected text.static DelegatedCommand
MARKUP_STRIKETHROUGH
Inserts or removes strikethrough tags around the selected text.static DelegatedCommand
MARKUP_SUBHEADING
Inserts or removes subheading tags around the selected text.static DelegatedCommand
MARKUP_SUBSCRIPT
Inserts or removes subscript tags around the selected text.static DelegatedCommand
MARKUP_SUPERSCRIPT
Inserts or removes superscript tags around the selected text.static DelegatedCommand
MARKUP_UNDERLINE
Inserts or removes underline tags around the selected text.static DelegatedCommand
MOVE_LINES_DOWN
Moves the selected lines down in a code editor.static DelegatedCommand
MOVE_LINES_UP
Moves the selected lines up in a code editor.static AbstractCommand
NEW_GAME_COMPONENT
Displays a dialog that allows the user to create a new game component.static AbstractCommand
NEW_PROJECT
Displays a dialog that allows the user to create a new project.static AbstractCommand
OPEN
Displays a dialog that allows the user to open game components.static AbstractCommand
OPEN_PROJECT
Displays a dialog that allows the user to open a project.static DelegatedCommand
PASTE
ADelegatedCommand
for the clipboard paste operation.static DelegatedCommand
PASTE_STYLE
Apply the current global style clipboard style settings to the deck selection.static AbstractCommand
PLUGIN_CATALOG
Opens the plug-in catalog.static AbstractCommand
PLUGIN_MANAGER
Opens the plug-in manager.static AbstractCommand
PREFERENCES
Shows the Preferences dialog using the default location and category.static DelegatedCommand
PRINT
Prints content from editors that support this command.static DelegatedCommand
REMOVE_TRAILING_SPACES
Removes trailing spaces from the ends of source lines.static DelegatedCommand
RUN_FILE
Runs the script in the active code editor.static DelegatedCommand
SAVE
Saves the current document in editors that support this command.static AbstractCommand
SAVE_ALL
Saves every open editor that supports theSAVE
command and has unsaved changes.static DelegatedCommand
SAVE_AS
Saves the current document under a new name in editors that support this command.static DelegatedCommand
SELECT_ALL
ADelegatedCommand
for selecting all content in a component that supports selection.static DelegatedCommand
SELECT_INVERSE
Inverts the current selection.static DelegatedCommand
SELECT_RESTORE
Restores the previous selection in a deck.static DelegatedCommand
SORT
Sorts selected lines in a code editor.static DelegatedCommand
SPIN_OFF
Adds a clone of the current document to the application.static AbstractCommand
TEST_BUNDLE
Tests the bundle associated with the open editor file (or project view selection).static DelegatedCommand
TO_BACK
Moves the selected objects behind other objects in a deck.static DelegatedCommand
TO_FRONT
Moves the selected objects in front of other objects in a deck.static DelegatedCommand
TURN_180
Turns the deck selection 180 degrees.static DelegatedCommand
TURN_LEFT
Turns the deck selection left.static DelegatedCommand
TURN_RIGHT
Turns the deck selection right.static DelegatedCommand
UNGROUP
Breaks up the selected group into separate objects.static DelegatedCommand
UNLOCK
Locks the selected deck items.static DelegatedCommand
UNLOCK_ALL
Unlocks all locked deck items.static AbstractToggleCommand
VIEW_CONTEXT_BAR
Toggles visibility of the context bar.static AbstractToggleCommand
VIEW_DECK_GRID
Toggles visibility of snapping grid in decks.static AbstractToggleCommand
VIEW_DECK_HANDLES
Toggles visibility of drag handles in decks.static AbstractToggleCommand
VIEW_DECK_MARGIN
Toggles visibility of page margins in decks.static AbstractToggleCommand
VIEW_EDGE_BOXES
Toggles visibility of card outline on game component previews, which helps when debugging component layouts.static AbstractToggleCommand
VIEW_INK_SAVER
Enables and disables Ink Saver mode.static AbstractToggleCommand
VIEW_PORTRAIT_BOXES
Toggles visibility of region boxes on game component previews, which helps when debugging component layouts.static AbstractToggleCommand
VIEW_REGION_BOXES
Toggles visibility of region boxes on game component previews, which helps when debugging component layouts.static AbstractToggleCommand
VIEW_SOURCE_NAVIGATOR
Toggles visibility of the source code navigator.static AbstractToggleCommand
VIEW_UNSAFE_BOXES
Toggles visibility of bleed margin box on game component previews, which helps when debugging component layouts.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.swing.JMenuItem
findCommand(javax.swing.JMenuBar menu, AbstractCommand command)
Returns the item in a menu bar that will execute the specified command, ornull
if the menu does not contain such an item.static javax.swing.JMenuItem
findCommand(javax.swing.JMenu menu, AbstractCommand command)
Returns the item in a menu that will execute the specified command, ornull
if the menu does not contain such an item.static javax.swing.JMenuItem
findCommand(javax.swing.JPopupMenu menu, AbstractCommand command)
Returns the item in a popup menu that will execute the specified command, ornull
if the menu does not contain such an item.static Commandable
findCommandable(AbstractCommand command)
Returns a command handler that is currently able to handle this command by following a default search strategy.static void
registerCommandable(Commandable commandable)
Registers a new command handler to be consulted when trying to execute aDelegatedCommand
.static void
unregisterCommandable(Commandable commandable)
Unregisters a previously registered command handler.
-
-
-
Field Detail
-
NEW_GAME_COMPONENT
public static final AbstractCommand NEW_GAME_COMPONENT
Displays a dialog that allows the user to create a new game component.
-
NEW_PROJECT
public static final AbstractCommand NEW_PROJECT
Displays a dialog that allows the user to create a new project.
-
OPEN
public static final AbstractCommand OPEN
Displays a dialog that allows the user to open game components.
-
OPEN_PROJECT
public static final AbstractCommand OPEN_PROJECT
Displays a dialog that allows the user to open a project.
-
CLOSE
public static final AbstractCommand CLOSE
Closes the active editor. If the editor has unsaved changes, the user will be given the option to save the file or cancel the command.
-
CLOSE_ALL
public static final AbstractCommand CLOSE_ALL
Closes all open editors. If any editor has unsaved changes, the user will be given the option to save the file or cancel the command.
-
CLOSE_PROJECT
public static final AbstractCommand CLOSE_PROJECT
Closes the open project, if any.
-
SAVE
public static final DelegatedCommand SAVE
Saves the current document in editors that support this command.
-
SAVE_AS
public static final DelegatedCommand SAVE_AS
Saves the current document under a new name in editors that support this command.
-
SAVE_ALL
public static final AbstractCommand SAVE_ALL
Saves every open editor that supports theSAVE
command and has unsaved changes.
-
EXPORT
public static final DelegatedCommand EXPORT
Exports content from editors that support this command.
-
PRINT
public static final DelegatedCommand PRINT
Prints content from editors that support this command.
-
EXIT
public static final AbstractCommand EXIT
Exits the application after giving the user a chance to save open files with unsaved changes.
-
SPIN_OFF
public static final DelegatedCommand SPIN_OFF
Adds a clone of the current document to the application.
-
CLEAR
public static final DelegatedCommand CLEAR
Clears all content from editors that support this command.
-
CUT
public static final DelegatedCommand CUT
ADelegatedCommand
for the clipboard cut operation. The default action will attempt to perform a cut in the active component, or your editor can handle the command itself.
-
COPY
public static final DelegatedCommand COPY
ADelegatedCommand
for the clipboard copy operation. The default action will attempt to perform a copy in the active component, or your editor can handle the command itself.
-
PASTE
public static final DelegatedCommand PASTE
ADelegatedCommand
for the clipboard paste operation. The default action will attempt to perform a paste in the active component, or your editor can handle the command itself.
-
SELECT_ALL
public static final DelegatedCommand SELECT_ALL
ADelegatedCommand
for selecting all content in a component that supports selection. The default action will attempt to perform a select all in the active component, (such as a text field or a list that supports multiple selection) or your editor can handle the command itself.
-
FIND
public static final DelegatedCommand FIND
Activates a search tool in an editor that supports this command.
-
FIND_IN_PROJECT
public static final AbstractCommand FIND_IN_PROJECT
Activates the find in project field, making it visible if necessary.
-
PREFERENCES
public static final AbstractCommand PREFERENCES
Shows the Preferences dialog using the default location and category.
-
VIEW_INK_SAVER
public static final AbstractToggleCommand VIEW_INK_SAVER
Enables and disables Ink Saver mode.
-
VIEW_CONTEXT_BAR
public static final AbstractToggleCommand VIEW_CONTEXT_BAR
Toggles visibility of the context bar.
-
VIEW_DECK_HANDLES
public static final AbstractToggleCommand VIEW_DECK_HANDLES
Toggles visibility of drag handles in decks.
-
VIEW_DECK_GRID
public static final AbstractToggleCommand VIEW_DECK_GRID
Toggles visibility of snapping grid in decks.
-
VIEW_DECK_MARGIN
public static final AbstractToggleCommand VIEW_DECK_MARGIN
Toggles visibility of page margins in decks.
-
VIEW_SOURCE_NAVIGATOR
public static final AbstractToggleCommand VIEW_SOURCE_NAVIGATOR
Toggles visibility of the source code navigator.
-
VIEW_REGION_BOXES
public static final AbstractToggleCommand VIEW_REGION_BOXES
Toggles visibility of region boxes on game component previews, which helps when debugging component layouts.
-
VIEW_PORTRAIT_BOXES
public static final AbstractToggleCommand VIEW_PORTRAIT_BOXES
Toggles visibility of region boxes on game component previews, which helps when debugging component layouts.
-
VIEW_UNSAFE_BOXES
public static final AbstractToggleCommand VIEW_UNSAFE_BOXES
Toggles visibility of bleed margin box on game component previews, which helps when debugging component layouts.
-
VIEW_EDGE_BOXES
public static final AbstractToggleCommand VIEW_EDGE_BOXES
Toggles visibility of card outline on game component previews, which helps when debugging component layouts.
-
EXPANSION_NEW
public static final DelegatedCommand EXPANSION_NEW
Creates a new expansion symbol.
-
EXPANSION_COPY
public static final DelegatedCommand EXPANSION_COPY
Copies the expansion symbol on the current component.
-
EXPANSION_PASTE
public static final DelegatedCommand EXPANSION_PASTE
Pastes the last-copies expansion symbol onto the current component.
-
EXPANSION_CHOOSE
public static final DelegatedCommand EXPANSION_CHOOSE
Opens anExpansionSelectionDialog
for the active game component editor.
-
MARKUP_ALIGNMENT
public static final DelegatedCommand MARKUP_ALIGNMENT
Opens a dialog that allows the user to modify the paragraph attributes of a block of markup text.
-
MARKUP_INSERT_COLOUR
public static final DelegatedCommand MARKUP_INSERT_COLOUR
Opens a dialog that allows the user to modify the paragraph attributes of a block of markup text.
-
MARKUP_INSERT_FONT
public static final DelegatedCommand MARKUP_INSERT_FONT
Opens a dialog that allows the user to modify the font attributes of a block of markup text.
-
MARKUP_BOLD
public static final DelegatedCommand MARKUP_BOLD
Inserts or removes bold tags around the selected text.
-
MARKUP_ITALIC
public static final DelegatedCommand MARKUP_ITALIC
Inserts or removes italic tags around the selected text.
-
MARKUP_UNDERLINE
public static final DelegatedCommand MARKUP_UNDERLINE
Inserts or removes underline tags around the selected text.
-
MARKUP_STRIKETHROUGH
public static final DelegatedCommand MARKUP_STRIKETHROUGH
Inserts or removes strikethrough tags around the selected text.
-
MARKUP_SUPERSCRIPT
public static final DelegatedCommand MARKUP_SUPERSCRIPT
Inserts or removes superscript tags around the selected text.
-
MARKUP_SUBSCRIPT
public static final DelegatedCommand MARKUP_SUBSCRIPT
Inserts or removes subscript tags around the selected text.
-
MARKUP_HEADING
public static final DelegatedCommand MARKUP_HEADING
Inserts or removes heading tags around the selected text.
-
MARKUP_SUBHEADING
public static final DelegatedCommand MARKUP_SUBHEADING
Inserts or removes subheading tags around the selected text.
-
MARKUP_INSERT_IMAGE
public static final DelegatedCommand MARKUP_INSERT_IMAGE
Opens a dialog that allows the user to select an image, a tag for which will be inserted into the markup target.
-
MARKUP_INSERT_CHARACTERS
public static final DelegatedCommand MARKUP_INSERT_CHARACTERS
Opens a dialog that allows the user to select an symbol or character to be inserted into the markup target.
-
MARKUP_ABBREVIATIONS
public static final AbstractCommand MARKUP_ABBREVIATIONS
Displays the markup abbreviation table editor.
-
TO_FRONT
public static final DelegatedCommand TO_FRONT
Moves the selected objects in front of other objects in a deck.
-
TO_BACK
public static final DelegatedCommand TO_BACK
Moves the selected objects behind other objects in a deck.
-
GROUP
public static final DelegatedCommand GROUP
Groups together the selected objects.
-
UNGROUP
public static final DelegatedCommand UNGROUP
Breaks up the selected group into separate objects.
-
ALIGN_LEFT
public static final DelegatedCommand ALIGN_LEFT
Aligns the selected objects to the left edge of the most recently selected object.
-
ALIGN_CENTER
public static final DelegatedCommand ALIGN_CENTER
Aligns the selected objects to the horizontal centre of the most recently selected object.
-
ALIGN_RIGHT
public static final DelegatedCommand ALIGN_RIGHT
Aligns the selected objects to the right edge of the most recently selected object.
-
ALIGN_TOP
public static final DelegatedCommand ALIGN_TOP
Aligns the selected objects to the top edge of the most recently selected object.
-
ALIGN_MIDDLE
public static final DelegatedCommand ALIGN_MIDDLE
Aligns the selected objects to the vertical middle of the most recently selected object.
-
ALIGN_BOTTOM
public static final DelegatedCommand ALIGN_BOTTOM
Aligns the selected objects to the bottom edge of the most recently selected object.
-
DISTRIBUTE_HORZ
public static final DelegatedCommand DISTRIBUTE_HORZ
Distributes the selected objects evenly across the horizontal axis.
-
DISTRIBUTE_VERT
public static final DelegatedCommand DISTRIBUTE_VERT
Distributes the selected objects evenly across the vertical axis.
-
TURN_LEFT
public static final DelegatedCommand TURN_LEFT
Turns the deck selection left.
-
TURN_RIGHT
public static final DelegatedCommand TURN_RIGHT
Turns the deck selection right.
-
TURN_180
public static final DelegatedCommand TURN_180
Turns the deck selection 180 degrees.
-
FLIP_HORZ
public static final DelegatedCommand FLIP_HORZ
Mirrors the deck selection horizontally.
-
FLIP_VERT
public static final DelegatedCommand FLIP_VERT
Mirrors the deck selection vertically.
-
CENTER_CONTENT
public static final DelegatedCommand CENTER_CONTENT
Centers all content on a deck page.
-
LOCK
public static final DelegatedCommand LOCK
Locks the selected deck items.
-
UNLOCK
public static final DelegatedCommand UNLOCK
Locks the selected deck items.
-
UNLOCK_ALL
public static final DelegatedCommand UNLOCK_ALL
Unlocks all locked deck items.
-
EDIT_PAGE_ITEM
public static final DelegatedCommand EDIT_PAGE_ITEM
Edits the selected an item in a deck; if the selection has more than one object in it, only the last-selected item is considered.
-
EDIT_STYLE
public static final DelegatedCommand EDIT_STYLE
Opens the style editor for the selected page items in a deck.
-
COPY_STYLE
public static final DelegatedCommand COPY_STYLE
Copy the style information for the current selection into the global style clipboard.
-
PASTE_STYLE
public static final DelegatedCommand PASTE_STYLE
Apply the current global style clipboard style settings to the deck selection.
-
SELECT_INVERSE
public static final DelegatedCommand SELECT_INVERSE
Inverts the current selection.
-
SELECT_RESTORE
public static final DelegatedCommand SELECT_RESTORE
Restores the previous selection in a deck.
-
RUN_FILE
public static final DelegatedCommand RUN_FILE
Runs the script in the active code editor.
-
DEBUG_FILE
public static final DelegatedCommand DEBUG_FILE
Debugs the script in the active code editor.
-
TEST_BUNDLE
public static final AbstractCommand TEST_BUNDLE
Tests the bundle associated with the open editor file (or project view selection).
-
MAKE_BUNDLE
public static final AbstractCommand MAKE_BUNDLE
Makes the bundle associated with the open editor file (or project view selection).
-
MOVE_LINES_UP
public static final DelegatedCommand MOVE_LINES_UP
Moves the selected lines up in a code editor.
-
MOVE_LINES_DOWN
public static final DelegatedCommand MOVE_LINES_DOWN
Moves the selected lines down in a code editor.
-
COMMENT_OUT
public static final DelegatedCommand COMMENT_OUT
Comments out the selected lines in a code editor.
-
REMOVE_TRAILING_SPACES
public static final DelegatedCommand REMOVE_TRAILING_SPACES
Removes trailing spaces from the ends of source lines.
-
SORT
public static final DelegatedCommand SORT
Sorts selected lines in a code editor.
-
COMPLETE_CODE
public static final DelegatedCommand COMPLETE_CODE
Opens the code completion popup in the current code editor, if available.
-
FORMAT_CODE
public static final DelegatedCommand FORMAT_CODE
Formats (pretty prints) the current editor content, if a suitable formatter is available.
-
CODE_ABBREVIATIONS
public static final AbstractCommand CODE_ABBREVIATIONS
Displays the source code abbreviation table editor.
-
CONFIGURE_UPDATES
public static final AbstractCommand CONFIGURE_UPDATES
Opens a dialog box that allows the user to configure update notifications.
-
PLUGIN_CATALOG
public static final AbstractCommand PLUGIN_CATALOG
Opens the plug-in catalog.
-
PLUGIN_MANAGER
public static final AbstractCommand PLUGIN_MANAGER
Opens the plug-in manager.
-
HELP
public static final DelegatedCommand HELP
Command that displays context-sensitive help. The command searches the component tree of the control with focus. It looks for either a component of typeJHelpButton
or else a component with the client propertyHELP_CONTEXT_PROPERTY
set. If either of these is found, the help page that they describe is displayed. If no suitable page is found, then the User Manual will be displayed instead.The action command of the action event used to fire the command can be the name of a help page to open, either the title of a Wiki article or a URL. In this case, that page is opened directly instead of searching the component tree.
-
HELP_CONTEXT_PROPERTY
public static final java.lang.String HELP_CONTEXT_PROPERTY
A client property that names a Web page that shows help for that part of the interface. The property value should be aString
. The value can either be the name of a page in the Wiki or else the URL of a Web page.- See Also:
HELP
, Constant Field Values
-
HELP_USER_MANUAL
public static final AbstractCommand HELP_USER_MANUAL
Opens the User Manual for browsing.
-
HELP_DEV_MANUAL
public static final AbstractCommand HELP_DEV_MANUAL
Opens the Developer Manual for browsing.
-
HELP_TRANSLATOR_MANUAL
public static final AbstractCommand HELP_TRANSLATOR_MANUAL
Opens the Translation Manual for browsing.
-
HELP_DEV_JS_API
public static final AbstractCommand HELP_DEV_JS_API
Opens the JS API documentation for browsing.
-
HELP_DEV_JAVA_API
public static final AbstractCommand HELP_DEV_JAVA_API
Opens the Java API documentation for browsing.
-
FILE_BUG_REPORT
public static final AbstractCommand FILE_BUG_REPORT
Files a bug report with no specific message or exception information.
-
ABOUT
public static final AbstractCommand ABOUT
Displays the About dialog.- See Also:
StrangeEonsAppWindow.showAboutDialog()
-
-
Method Detail
-
findCommandable
public static Commandable findCommandable(AbstractCommand command)
Returns a command handler that is currently able to handle this command by following a default search strategy. The exact strategy used to find a relevantCommandable
may change in future versions, but it is guaranteed that:- any registered handlers will be consulted first (in order of registration)
- the active editor (if any) will be consulted after any registered handlers
- the main application window will be consulted last
null
is returned instead.Note that if you wish to create a command that is delegated to a
Commandable
that can be discovered through this method, it is sufficient to subclassDelegatedCommand
.- Parameters:
command
- the command to find a handler for; typically this is an instance ofDelegatedCommand
- Returns:
- a command handler that can currently handle the command, or
null
if none can be found - Throws:
java.lang.NullPointerException
- if the command isnull
-
registerCommandable
public static void registerCommandable(Commandable commandable)
Registers a new command handler to be consulted when trying to execute aDelegatedCommand
.- Parameters:
commandable
- the command handler to consult- Throws:
java.lang.NullPointerException
- if the commandable isnull
- See Also:
findCommandable(ca.cgjennings.apps.arkham.commands.AbstractCommand)
,unregisterCommandable(ca.cgjennings.apps.arkham.commands.Commandable)
-
unregisterCommandable
public static void unregisterCommandable(Commandable commandable)
Unregisters a previously registered command handler.- Parameters:
commandable
- the commandable to unregister- See Also:
registerCommandable(ca.cgjennings.apps.arkham.commands.Commandable)
-
findCommand
public static javax.swing.JMenuItem findCommand(javax.swing.JPopupMenu menu, AbstractCommand command)
Returns the item in a popup menu that will execute the specified command, ornull
if the menu does not contain such an item.- Parameters:
menu
- the menu to searchcommand
- the command to search for- Returns:
- the item within the menu tree that contains the command
-
findCommand
public static javax.swing.JMenuItem findCommand(javax.swing.JMenu menu, AbstractCommand command)
Returns the item in a menu that will execute the specified command, ornull
if the menu does not contain such an item.- Parameters:
menu
- the menu to searchcommand
- the command to search for- Returns:
- the item within the menu tree that contains the command
-
findCommand
public static javax.swing.JMenuItem findCommand(javax.swing.JMenuBar menu, AbstractCommand command)
Returns the item in a menu bar that will execute the specified command, ornull
if the menu does not contain such an item.- Parameters:
menu
- the menu bar whose menus should be searched, ornull
to use the main application windowcommand
- the command to search for- Returns:
- the item within the menu tree that contains the command
-
-