Class DeckGlobalKeyCommand
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.AbstractToolbarItem
VASSAL.build.module.map.MassKeyCommand
VASSAL.build.module.map.DeckGlobalKeyCommand
- All Implemented Interfaces:
PropertyChangeListener,EventListener,AutoConfigurable,Buildable,Configurable,GameComponent,PropertyNameSource,ValidityChecker,Translatable,Auditable,ImageSearchTarget,SearchTarget,RecursionLimiter.Loopable
This version of
MassKeyCommand is added to a DrawPile (which holds a Deck)
and applies to pieces/cards currently in the deck.
The "Global Key Command" functionality, as the term is used in Vassal Modules, is spread out over several classes internally:
GlobalCommand - primary functionality for sending commands to multiple pieces based on matching parameters
GlobalKeyCommand - Global Key Commands from a Module window
StartupGlobalKeyCommand - Global Key Commands from a Module "At Startup"
MassKeyCommand - Global Key Commands from a specific Map window
DeckGlobalKeyCommand - Global Key Commands from a Deck
CounterGlobalKeyCommand - Global Key Commands from a Game Piece
Other important classes:
GlobalCommandTarget - "Fast Match" parameters
GlobalCommandTargetConfigurer - configurer for "Fast Match" parameters
NOTE: There is no need to support AuditTrails in a DeckGlobalKeyCommand since there is no matching properties expression.
Individual counters processing the GKC will generate their own internal audit trails.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class VASSAL.build.module.map.MassKeyCommand
MassKeyCommand.DeckPolicyConfig, MassKeyCommand.IconConfig, MassKeyCommand.ParameterListConfig, MassKeyCommand.Prompt, MassKeyCommand.ReportFormatConfigNested classes/interfaces inherited from class VASSAL.build.AbstractToolbarItem
AbstractToolbarItem.FormattedStringConfigNested 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, parameters, PARAMETERS, PROPERTIES_FILTER, propertiesFilter, propertySource, REPORT_FORMAT, REPORT_SINGLE, reportFormat, SINGLE_MAP, singleMap, stroke, SUPPRESS_SOUNDS, target, TARGET, TOOLTIPFields inherited from class VASSAL.build.AbstractToolbarItem
CAN_DISABLE, canDisable, DISABLED_ICON, disabledIconConfig, HIDE_WHEN_DISABLED, hideWhenDisabled, property, PROPERTY_GATE, propertyGate, showDisabledOptionsFields 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
ConstructorsConstructorDescriptionDeckGlobalKeyCommand(String code) DeckGlobalKeyCommand(String code, PropertySource source) -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault behavior adds the button to the parent componentvoidvoidencode()String[]This getAttributeDescriptions() will return the items specific to the Toolbar Button - classes extending this should add their own items as well.String[]This getAttributeNames() will return the items specific to the Toolbar Button - classes extending this should add their own items as well.Class<?>[]This getAttributeTypes() will return the items specific to the Toolbar Button - classes extending this should add their own items as well.By default, all attributes are visiblestatic StringSince we also limit application of a Deck Global Key command to a specified number of pieces in the Deck, a null match expression should match all pieces, not reject them all.getKeyCommand(Deck deck) voidremoveFrom(Buildable parent) Remove from our parentMethods inherited from class VASSAL.build.module.map.MassKeyCommand
apply, getAllowableConfigureComponents, getAttributeValueString, getComponentName, getComponentTypeName, getFilter, getHelpFile, getPropertyList, getTarget, setAttribute, setPropertySourceMethods inherited from class VASSAL.build.AbstractToolbarItem
addLocalImageNames, addPropertyGateListener, addPropertyGateListener, checkDisabled, disableIfTrue, getComponent, getLaunchButton, getMenuTextList, getNameKey, getRestoreCommand, isShowDisabledOptions, makeLaunchButton, propertyChange, removePropertyGateListener, setButtonTextKey, setHotKeyKey, setIconKey, setLaunchButton, setNameKey, setNamePrompt, setShowDisabledOptions, setTooltipKey, setupMethods inherited from class VASSAL.build.AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getI18nData, getI18nPrefix, getLocalizedConfigureName, getTypeName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameMethods inherited from class VASSAL.build.AbstractBuildable
addImageNamesRecursively, build, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, getPropertyNames, setAncestor, 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.script.expression.Auditable
getComponentName, getComponentTypeNameMethods inherited from interface VASSAL.build.Buildable
build, getBuildElement, isMandatory, isMovable, isUnique
-
Constructor Details
-
DeckGlobalKeyCommand
public DeckGlobalKeyCommand() -
DeckGlobalKeyCommand
-
DeckGlobalKeyCommand
-
DeckGlobalKeyCommand
-
-
Method Details
-
getConfigureTypeName
-
getGKCtype
- Overrides:
getGKCtypein classMassKeyCommand- Returns:
- Our type of Global Key Command (overrides the one from Mass Key Command). Affects what configurer options are shown. In particular no "Fast Match" parameters are shown for Deck GKCs.
-
addTo
Description copied from class:AbstractToolbarItemDefault behavior adds the button to the parent component- Specified by:
addToin interfaceBuildable- Overrides:
addToin classMassKeyCommand- Parameters:
parent- parent Buildable to add this component to as a subcomponent.
-
removeFrom
Description copied from class:AbstractToolbarItemRemove from our parent- Specified by:
removeFromin interfaceConfigurable- Overrides:
removeFromin classMassKeyCommand- Parameters:
parent- parent
-
getKeyCommand
-
getFilter
Since we also limit application of a Deck Global Key command to a specified number of pieces in the Deck, a null match expression should match all pieces, not reject them all.- Overrides:
getFilterin classMassKeyCommand
-
apply
-
encode
-
decode
-
getAttributeDescriptions
Description copied from class:AbstractToolbarItemThis getAttributeDescriptions() will return the items specific to the Toolbar Button - classes extending this should add their own items as well. If the "nameKey" is blank, then no "name" configure entry will be generated. Extending classes can use ArrayUtils.addAll(super.getAttributeDescriptions(), key1, ..., keyN), or supply their own order from scratch.- Specified by:
getAttributeDescriptionsin interfaceAutoConfigurable- Overrides:
getAttributeDescriptionsin classMassKeyCommand- Returns:
- an array of Strings describing the buildFile (XML) attributes of this component. These strings are used as prompts in the
Properties window for this object, when the component is configured in the Editor. The order of descriptions should
be the same as the order of names in
AbstractBuildable.getAttributeNames()
-
getAttributeNames
Description copied from class:AbstractToolbarItemThis getAttributeNames() will return the items specific to the Toolbar Button - classes extending this should add their own items as well. If the "nameKey" is blank, then no "name" configure entry will be generated. Extending classes can use ArrayUtils.addAll(super.getAttributeNames(), key1, ..., keyN), or supply their own order from scratch.Lists all the buildFile (XML) attribute names for this component. If this component is ALSO an
AbstractConfigurable, then this list of attributes determines the appropriate attribute order forAbstractConfigurable.getAttributeDescriptions()andAbstractConfigurable.getAttributeTypes().- Specified by:
getAttributeNamesin interfaceAutoConfigurable- Overrides:
getAttributeNamesin classMassKeyCommand- Returns:
- an array of all buildFile (XML) attribute names for this component
-
getAttributeTypes
Description copied from class:AbstractToolbarItemThis getAttributeTypes() will return the items specific to the Toolbar Button - classes extending this should add their own items as well. If the "nameKey" is blank, then no "name" configure entry will be generated. Extending classes can use ArrayUtils.addAll(super.getAttributeTypes(), key1, ..., keyN), or supply their own order from scratch.- Specified by:
getAttributeTypesin interfaceAutoConfigurable- Overrides:
getAttributeTypesin classMassKeyCommand- Returns:
- the Class for the buildFile (XML) attributes of this component. Valid classes include: String, Integer, Double, Boolean, Image,
Color, and KeyStroke, along with any class for which a Configurer exists in VASSAL.configure. The class determines, among other things,
which type of
AutoConfigurerwill be used to configure the attribute when the object is configured in the Editor.The order of classes should be the same as the order of names in
AbstractBuildable.getAttributeNames()
-
getAttributeVisibility
Description copied from class:AbstractConfigurableBy default, all attributes are visible- Specified by:
getAttributeVisibilityin interfaceAutoConfigurable- Overrides:
getAttributeVisibilityin classMassKeyCommand- Parameters:
key- Name (key) of one of this component's attributes- Returns:
- a
VisibilityConditionfor this attribute, or null if attribute should always be visible.
-
getExpressionList
- Specified by:
getExpressionListin interfaceSearchTarget- Overrides:
getExpressionListin classMassKeyCommand- Returns:
- a list of the Configurables string/expression fields if any (for search)
-
getFormattedStringList
- Specified by:
getFormattedStringListin interfaceSearchTarget- Overrides:
getFormattedStringListin classMassKeyCommand- Returns:
- a list of any Message Format strings referenced in the Configurable, if any (for search)
-
getNamedKeyStrokeList
- Specified by:
getNamedKeyStrokeListin interfaceSearchTarget- Overrides:
getNamedKeyStrokeListin classMassKeyCommand- Returns:
- a list of any Named KeyStrokes referenced in the Configurable, if any (for search)
-