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.ReportFormatConfigNested 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, TOOLTIPFields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, localizedName, myI18nData, nameFields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validatorFields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault behavior adds the button to the module toolbar.getAttributeVisibility(String key)By default, all attributes are visiblestatic StringWhen saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullvoidsetup(boolean gameStarting)Notify the GameComponent that a game has started/endedMethods inherited from class VASSAL.build.module.GlobalKeyCommand
apply, getGKCtypeMethods inherited from class VASSAL.build.module.map.MassKeyCommand
getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getComponentName, getComponentTypeName, getExpressionList, getFilter, getFormattedStringList, getNamedKeyStrokeList, getPropertyList, getTarget, removeFrom, setAttribute, setPropertySourceMethods inherited from class VASSAL.build.AbstractToolbarItem
addLocalImageNames, getComponent, getLaunchButton, getMenuTextList, makeLaunchButton, setButtonTextKey, setHotKeyKey, setIconKey, setLaunchButton, setNameKey, setTooltipKeyMethods inherited from class VASSAL.build.AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getI18nData, getI18nPrefix, getLocalizedConfigureName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameMethods inherited from class VASSAL.build.AbstractBuildable
addImageNamesRecursively, build, getAllDescendantComponents, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getPropertyNames, validateMethods inherited from class VASSAL.search.AbstractImageFinder
getAllImageNames, getLocalImageNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VASSAL.build.Buildable
build, getBuildElement
-
Constructor Details
-
StartupGlobalKeyCommand
public StartupGlobalKeyCommand()
-
-
Method Details
-
addTo
Description copied from class:AbstractToolbarItemDefault behavior adds the button to the module toolbar.- Specified by:
addToin interfaceBuildable- Overrides:
addToin classMassKeyCommand- Parameters:
parent- parent Buildable to add this component to as a subcomponent.
-
getConfigureTypeName
-
getHelpFile
- Specified by:
getHelpFilein interfaceConfigurable- Overrides:
getHelpFilein classMassKeyCommand- Returns:
- a HelpFile describing how to use and configure * this component
-
getAttributeVisibility
Description copied from class:AbstractConfigurableBy default, all attributes are visible- Specified by:
getAttributeVisibilityin interfaceAutoConfigurable- Overrides:
getAttributeVisibilityin classGlobalKeyCommand- Parameters:
key- Name (key) of one of this component's attributes- Returns:
- a
VisibilityConditionfor this attribute, or null if attribute should always be visible.
-
setup
public void setup(boolean gameStarting)Description copied from interface:GameComponentNotify the GameComponent that a game has started/ended- Specified by:
setupin interfaceGameComponent- Parameters:
gameStarting- if true, a game is starting. If false, then a game is ending
-
getRestoreCommand
Description copied from interface:GameComponentWhen saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommandin interfaceGameComponent
-