Package VASSAL.counters
package VASSAL.counters
Provides classes that define game pieces.
- See Also:
-
ClassDescriptionA Trait (aka
Decorator
that acts like a button on a GamePiece, such that clicking on a particular area of the piece invokes a key commandRegisters mouse listeners with Maps and other components.Trait allowing creation of an "attachment" to one or more other pieces, which can then be sent GKCs very swiftly and whose properties can be easily read (and if a Dynamic Property can also be set with a Set Global Property trait)This trait overrides the $BasicName$ property provided by the "Basic Piece", allowing a module designer decking to define pieces entirely by prototype to safely ignore and leave empty the Basic Piece.Basic class for representing a physical component of the game.Boolean and of two PieceFiltersBoolean Or of two PieceFiltersTrait to draw a colored border around a pieceComparison Modes for property matchRecords the bounding boxes of GamePieces.Conditional Marker A marker with a variable value depending on conditions.Trait Editor implementationThis trait adds a command that creates a duplicate of the selected GamepieceA trait that exists in a Piece Definition, but is not included when the piece is created in a real game.Trait that sends a Key Command to other pieces, selected with various filters.A collection of pieces that behaves like a deck, i.e.: Doesn't move.An object that parses expression strings from the config windowCommand to set the contents of this deck from a saved file.For Visitors that are aware ofDeck
typesFor handling Visitors that are aware ofDeck
typesThe abstract class describing a generic 'Trait' of a full GamePiece.This trait adds a command that creates a duplicate of the selected GamepieceImplements a trait to allow a piece to be deselected from the KeyBuffer in response to a Key Command.Trait that contains a property accessible via getProperty() and updatable dynamically via key commandsDynamicKeyCommand A class that represents an action to be performed on a Dynamic propertyDeprecated, for removal: This API element is subject to removal in a future version.If class implementing GamePiece also implements the EditablePiece interface, then it can be manipulated from the Editor's Configuration Tree via thePieceDefiner
dialog.d/b/a "Layer" The "Layer" trait.Return Property names exposed by this traitEmbellishment has been extensively re-written for Vassal 3.2 changing both the behavior and the visual look of the configurer.Gives information about what kinds of events aGamePiece
will respond toDisplays a movement trail indicating where a piece has been movedKey Command Global Visibility Circle Radius Fill Color Line Color Selected Transparency Unselected Transparency Edge Buffer Display Limit Edge Buffer Point Limitd/b/a "Can Rotate" A Decorator that rotates a GamePiece to an arbitrary angleInterface to deal with the behaviors of a physical component of the game, or a Trait of one.Variant on GlobalCommand for use with Attachment -- instead of sending a key, finds pieces and attaches themThe heart of all the different forms of Global Key Command, GlobalCommand handles sending a key command to multiple pieces, potentially on multiple maps, as long as they match its filtering condition.GlobalCommandTarget configures and stores the "Fast Match" parameters of Global Key Commands, allowing certain simple filters to be "pre-matched" without having to initiate the (relatively slower) BeanShell filters.Comparison Modes for property matchSpecifies the type of GKC being configured (affects which Target options are allowed)Specifies the kind of target matchingWhen processing a GlobalCommand (either a Global Key Command or an Attachment command), this applies the "additional properties filter"Variant on GlobalCommand for use with Attachment -- instead of sending a key, finds pieces and *detaches* themAdds a menu entry that fires a specified key event to the module window.Variant on GlobalCommand for use with SetPieceProperty -- instead of sending a key, finds pieces and sets their propertiesAn interface that defines how to draw GamePieces that are selectedd/b/a "Does Not Stack" Decorator that filters events to prevent a GamePiece from being selected and/or moved.The KeyBuffer is the list of "currently selected pieces" in the VASSAL UI (map windows).Represents a sub-menu in a GamePiece's right-click drop-down menud/b/a "Text Label" Displays a text label, with content specified by the user at runtime.A generic Decorator that retains in its state the value of a property.Edits an entire set of GamePieces at onceClass to load a directory full of images and create countersDesignates the piece as a "Mat" on which other pieces ("Cargo") can be placed.Designates the piece as "Cargo", which can be placed on a "Mat" to move along with itA utility class for holding and manipulating Mats and their CargoThis trait puts a menu separator bar in the context menu for the pieced/b/a "Mark When Moved" A GamePiece with this trait will automatically be marked whenever it is moved.Allows a single trait to generate multiple context menu commands, using a set of filtered map locations.Lets our special key commands carry a bit of extra baggage around "for our later reference"A trait for assigning an arbitrary shape to aGamePiece
d/b/a "Mask" Trait that lets some traits of a piece be hidden "from some players, some of the time".Defines ability of a player to access a GamePieceGlobal utility class to temporarily restrict access to all pieceUtility class for cloningGamePiece
sThis is the GamePiece designer dialog.A Dialog for editing an EditablePiece's propertiesContents of the Copy/Paste buffer for traits in the editorA filter for GamePieces Sample implementations include:PropertyExpression
- used for "matching expressions" in Global Key Commands and the likeRangeFilter
- filters for pieces within range of a pointBooleanOrPieceFilter
- "OR"s two Filters together to make one Amazing Disjunctive FilterBooleanAndPieceFilter
- "AND"s two Filters together and you'd better satisfy bothCounterDetailViewer.Filter
- Filter created from Mouseover Stack Viewer settingsInventory.Selector
- Layered filter for Piece Inventory windowThis interface defines selection criteria for finding a GamePiece in a MapReturns a Mat that overlaps this pieceDeprecated, for removal: This API element is subject to removal in a future version.UseGamePieceOp
instead.An iterator for GamePieces.Sorts GamePieces according to their position: If on different Maps, order by Map id If in different Stacks order by Stack position on the Map If in the same Stack, order by position within the StackFor implementing a somewhat modified Visitor pattern forGamePiece
s.For implementing a modified Visitor pattern onGamePiece
s.d/b/a "Can Pivot" Provides commands to pivot a Game Piece around a given pointThis Decorator defines a key command to places another counter on top of this one.Access is granted ifGameModule.getUserId()
matchesA trait that plays a sound clipDefines the properties expected to be defined in each GamePieceAccepts pieces based on whether the piece has properties that match a given set of conditionsInterface for classes that can export the names and values of the properties they maintainA Decorator class that endows a GamePiece with a dialog.Accepts all pieces within a specified range of a given point on a mapGamePiece trait that replaces a GamePiece with another oned/b/a "Report Action" A GamePiece with this trait will echo the piece's current name when any of a given key commands are pressed (and after they take effect)Looks in both the new and old piece for property values.RestrictCommands Restrict the availability of Key Commands, depending on a Property Match Stringd/b/a "Restricted Access" A GamePiece with the Restricted trait can only be manipulated by the player playing a specific sideGamePiece trait that returns a piece to aDrawPile
This trait adds a command that sends a piece to another location.Access is granted ifPlayerRoster.getMySide()
matchesAccess is granted ifPlayerRoster.getMySide()
is in a specified listA Stack is a collection of pieces in the same location that can often be moved with a single drag-and-drop.GamePiece
s may implement this interface to implement "merge" functionality of their state.A trait that groups menu items of other traits into a sub-menud/b/a "Spreadsheet" A Decorator class that endows a GamePiece with an editable spreadsheet (i.e.A standardised Panel for use by Trait configurersA standardised MigLayout for use by Trait configurersA trait to expose a translated string as a readable/displayable property.d/b/a "Move Fixed Distance" Give a piece a command that moves it a fixed amount in a particular direction, optionally tracking the current rotation of the piece.Batches up all the movement commands resulting from a single KeyEvent and executes them at once.Macro Execute a series of Keystrokes against this same piece - Triggered by own KeyCommand or list of keystrokes - Match against an optional Property Filterd/b/a "Prototype" This trait is a placeholder for a pre-defined series of traits specified in aPrototypeDefinition
object.
DynamicKeyCommandConfigurer