Package VASSAL.counters
Class GlobalCommand
java.lang.Object
VASSAL.counters.GlobalCommand
- Direct Known Subclasses:
DeckGlobalKeyCommand.DeckGlobalCommand
public class GlobalCommand extends Object
Applies a given keyboard command to all counters on a map
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classGlobalCommand.Visitor -
Field Summary
Fields Modifier and Type Field Description protected KeyStrokekeyStrokeprotected RecursionLimiter.Loopableownerprotected FormattedStringreportFormatprotected booleanreportSingleprotected intselectFromDeckprotected PropertySourcesource -
Constructor Summary
Constructors Constructor Description GlobalCommand(RecursionLimiter.Loopable l)GlobalCommand(RecursionLimiter.Loopable l, PropertySource p) -
Method Summary
Modifier and Type Method Description Commandapply(Map[] m, PieceFilter filter)Apply the key command to all pieces that pass the given filter on all the given mapsCommandapply(Map m, PieceFilter filter)booleanequals(Object obj)KeyStrokegetKeyStroke()StringgetReportFormat()intgetSelectFromDeck()inthashCode()booleanisReportSingle()voidsetKeyStroke(KeyStroke keyStroke)voidsetKeyStroke(NamedKeyStroke keyStroke)voidsetPropertySource(PropertySource ps)voidsetReportFormat(String format)voidsetReportSingle(boolean reportSingle)voidsetSelectFromDeck(int selectFromDeck)Set the number of pieces to select from a deck that the command will apply to.
-
Field Details
-
keyStroke
-
reportSingle
protected boolean reportSingle -
selectFromDeck
protected int selectFromDeck -
reportFormat
-
owner
-
source
-
-
Constructor Details
-
GlobalCommand
-
GlobalCommand
-
-
Method Details
-
setPropertySource
-
setKeyStroke
-
setKeyStroke
-
setReportFormat
-
getKeyStroke
-
getReportFormat
-
isReportSingle
public boolean isReportSingle() -
setReportSingle
public void setReportSingle(boolean reportSingle) -
apply
-
apply
Apply the key command to all pieces that pass the given filter on all the given maps- Parameters:
m-filter-- Returns:
- a the corresponding
Command
-
getSelectFromDeck
public int getSelectFromDeck() -
setSelectFromDeck
public void setSelectFromDeck(int selectFromDeck)Set the number of pieces to select from a deck that the command will apply to. A value <0 means to apply to all pieces in the deck- Parameters:
selectFromDeck-
-
hashCode
public int hashCode() -
equals
-