public final class CommandDescriptions extends Object
Command (action name and context name) to its
CommandDescriptions.DescriptionAndTriggers (textual description and default triggers of
the command).
New entries are added using add(String, String[], String). This
specifies only the action name of the Command. The context of the
Command is the current context of this
CommandDescriptions. The current context is changed by
setKeyconfigContext(String), and then used for subsequently added
entries.
| Modifier and Type | Class and Description |
|---|---|
static class |
CommandDescriptions.DescriptionAndTriggers |
| Constructor and Description |
|---|
CommandDescriptions() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
String[] defaultTriggers,
String description)
Adds a new entry, linking a
Command to textual description and
default triggers. |
void |
augmentInputTriggerConfig(InputTriggerConfig config)
For commands that are not yet defined in
config, add them with
their default triggers. |
Map<Command,String> |
createCommandDescriptionsMap()
Builds a map from
Command to textual description. |
InputTriggerConfig |
createDefaultKeyconfig()
Builds a
InputTriggerConfig with all commands and their default
triggers. |
void |
setKeyconfigContext(String context)
Sets the current context.
|
public void add(String name, String[] defaultTriggers, String description)
Command to textual description and
default triggers.name - name of the Action or Behaviour. Together with
the current context name (see
setKeyconfigContext(String)) this specifies a
Command.defaultTriggers - default InputTriggers for the command.description - textual description of the command (for displaying in UI).public void setKeyconfigContext(String context)
added commands.context - the context name.public Map<Command,String> createCommandDescriptionsMap()
Command to textual description. This is for
making a keyconfig VisualEditorPanel.public InputTriggerConfig createDefaultKeyconfig()
InputTriggerConfig with all commands and their default
triggers. Commands that have no specified default triggers will have
trigger "not mapped".InputTriggerConfig.public void augmentInputTriggerConfig(InputTriggerConfig config)
config, add them with
their default triggers. Commands that have no specified default triggers
will have trigger "not mapped".config - the input trigger config to add commands to.Copyright © 2015–2023 SciJava. All rights reserved.