Package VASSAL.build.module
Class StartupGlobalKeyCommand
java.lang.Object
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.map.MassKeyCommand
VASSAL.build.module.GlobalKeyCommand
VASSAL.build.module.StartupGlobalKeyCommand
- All Implemented Interfaces:
AutoConfigurable,Buildable,Configurable,GameComponent,PropertyNameSource,ValidityChecker,Translatable,RecursionLimiter.Loopable
public class StartupGlobalKeyCommand extends GlobalKeyCommand implements GameComponent
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, 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 Constructor Description StartupGlobalKeyCommand() -
Method Summary
Modifier and Type Method Description voidaddTo(Buildable parent)Adds this component to its parent.VisibilityConditiongetAttributeVisibility(String key)By default, all attributes are visiblestatic StringgetConfigureTypeName()HelpFilegetHelpFile()CommandgetRestoreCommand()When 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
applyMethods inherited from class VASSAL.build.module.map.MassKeyCommand
getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getComponentName, getComponentTypeName, getFilter, getLaunchButton, removeFrom, setAttribute, setLaunchButton, setPropertySourceMethods 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
build, getAllDescendantComponents, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getPropertyNames, validateMethods 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 interface:BuildableAdds this component to its parent. In order to make Buildable objects extensible, the child is reponsible for adding itself to the parent. That way, Buildable subcomponents can be defined in an extension package without needing to modify the containing class.- Specified by:
addToin interfaceBuildable- Overrides:
addToin classMassKeyCommand
-
getConfigureTypeName
-
getHelpFile
- Specified by:
getHelpFilein interfaceConfigurable- Overrides:
getHelpFilein classMassKeyCommand- Returns:
- a HelpFilte 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
-