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 class
GlobalCommand.Visitor
-
Field Summary
Fields Modifier and Type Field Description protected KeyStroke
keyStroke
protected RecursionLimiter.Loopable
owner
protected FormattedString
reportFormat
protected boolean
reportSingle
protected int
selectFromDeck
protected PropertySource
source
-
Constructor Summary
Constructors Constructor Description GlobalCommand(RecursionLimiter.Loopable l)
GlobalCommand(RecursionLimiter.Loopable l, PropertySource p)
-
Method Summary
Modifier and Type Method Description Command
apply(Map[] m, PieceFilter filter)
Apply the key command to all pieces that pass the given filter on all the given mapsCommand
apply(Map m, PieceFilter filter)
boolean
equals(Object obj)
KeyStroke
getKeyStroke()
String
getReportFormat()
int
getSelectFromDeck()
int
hashCode()
boolean
isReportSingle()
void
setKeyStroke(KeyStroke keyStroke)
void
setKeyStroke(NamedKeyStroke keyStroke)
void
setPropertySource(PropertySource ps)
void
setReportFormat(String format)
void
setReportSingle(boolean reportSingle)
void
setSelectFromDeck(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
-