Package VASSAL.build.module
Class StartupGlobalKeyCommand
- All Implemented Interfaces:
AutoConfigurable
,Buildable
,Configurable
,GameComponent
,PropertyNameSource
,ValidityChecker
,Translatable
,ImageSearchTarget
,SearchTarget
,RecursionLimiter.Loopable
A Global Key Command that is automatically invoked on game start-up,
once the various Key Listeners have been started.
If multiple start-up commands need to be run, they should be combined in a MultiAction Button and then launched from a single instance of StartupGlobalKeyCommand, as the sequence in which multiple instances of StartupGlobalKeyCommand are fired is undetermined.
- Author:
- Pieter Geerkens
-
Nested Class Summary
Nested classes/interfaces inherited from class VASSAL.build.module.map.MassKeyCommand
MassKeyCommand.DeckPolicyConfig, MassKeyCommand.IconConfig, MassKeyCommand.Prompt, MassKeyCommand.ReportFormatConfig
Nested classes/interfaces inherited from interface VASSAL.build.AutoConfigurable
AutoConfigurable.Util
-
Field Summary
Fields inherited from class VASSAL.build.module.map.MassKeyCommand
AFFECTED_PIECE_NAMES, BUTTON_TEXT, CHECK_PROPERTY, CHECK_VALUE, checkProperty, checkValue, condition, CONDITION, DECK_COUNT, DEPRECATED_NAME, filter, globalCommand, HOTKEY, ICON, KEY_COMMAND, launch, map, NAME, names, PROPERTIES_FILTER, propertiesFilter, propertySource, REPORT_FORMAT, REPORT_SINGLE, reportFormat, SINGLE_MAP, singleMap, stroke, target, TARGET, TOOLTIP
Fields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, localizedName, myI18nData, name
Fields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validator
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Default behavior adds the button to the module toolbar.getAttributeVisibility(String key)
By default, all attributes are visiblestatic String
When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullvoid
setup(boolean gameStarting)
Notify the GameComponent that a game has started/endedMethods inherited from class VASSAL.build.module.GlobalKeyCommand
apply, getGKCtype
Methods inherited from class VASSAL.build.module.map.MassKeyCommand
getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getComponentName, getComponentTypeName, getExpressionList, getFilter, getFormattedStringList, getNamedKeyStrokeList, getPropertyList, getTarget, removeFrom, setAttribute, setPropertySource
Methods inherited from class VASSAL.build.AbstractToolbarItem
addLocalImageNames, getComponent, getLaunchButton, getMenuTextList, makeLaunchButton, setButtonTextKey, setHotKeyKey, setIconKey, setLaunchButton, setNameKey, setTooltipKey
Methods inherited from class VASSAL.build.AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getI18nData, getI18nPrefix, getLocalizedConfigureName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureName
Methods inherited from class VASSAL.build.AbstractBuildable
addImageNamesRecursively, build, getAllDescendantComponents, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getPropertyNames, validate
Methods inherited from class VASSAL.search.AbstractImageFinder
getAllImageNames, getLocalImageNames
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface VASSAL.build.Buildable
build, getBuildElement
-
Constructor Details
-
StartupGlobalKeyCommand
public StartupGlobalKeyCommand()
-
-
Method Details
-
addTo
Description copied from class:AbstractToolbarItem
Default behavior adds the button to the module toolbar.- Specified by:
addTo
in interfaceBuildable
- Overrides:
addTo
in classMassKeyCommand
- Parameters:
parent
- parent Buildable to add this component to as a subcomponent.
-
getConfigureTypeName
-
getHelpFile
- Specified by:
getHelpFile
in interfaceConfigurable
- Overrides:
getHelpFile
in classMassKeyCommand
- Returns:
- a HelpFile describing how to use and configure * this component
-
getAttributeVisibility
Description copied from class:AbstractConfigurable
By default, all attributes are visible- Specified by:
getAttributeVisibility
in interfaceAutoConfigurable
- Overrides:
getAttributeVisibility
in classGlobalKeyCommand
- Parameters:
key
- Name (key) of one of this component's attributes- Returns:
- a
VisibilityCondition
for this attribute, or null if attribute should always be visible.
-
setup
public void setup(boolean gameStarting)Description copied from interface:GameComponent
Notify the GameComponent that a game has started/ended- Specified by:
setup
in interfaceGameComponent
- Parameters:
gameStarting
- if true, a game is starting. If false, then a game is ending
-
getRestoreCommand
Description copied from interface:GameComponent
When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommand
in interfaceGameComponent
-