Uses of Interface
VASSAL.counters.GamePiece
Package
Description
Provides classes for building Java instances automatically from XML
files.
Contains classes that may be added to a
GameModule
.Contains classes that may be added to a
Map
.Contains classes that can be added to a
Widget
.Provides classes that implement the "Command" design pattern.
Provides classes for building "Edit Property" dialogs, and for editing
GameModule
's and ModuleExtension
's.Provides classes that define game pieces.
-
Uses of GamePiece in VASSAL.build
Modifier and TypeMethodDescriptionGameModule.createPiece
(String type) Central location to create any type of GamePiece from within VASSALGameModule.createPiece
(String type, GamePiece inner) Central location to create any type of GamePiece Trait (Decorator) from within VASSALGpIdChecker.createUpdatedPiece
(GamePiece oldPiece) Locate the SlotElement that matches oldPiece and return a new GamePiece created from that Slot.Modifier and TypeMethodDescriptionprotected void
GpIdChecker.checkTrait
(GamePiece gp) Check for PlaceMarker traits in a GamePiece and add them to the cross-referenceprotected void
GpIdChecker.checkTrait
(GamePiece gp, PrototypeDefinition prototype, GamePiece definition) protected void
Copy as much state information as possible from the old piece to the new pieceGameModule.createPiece
(String type, GamePiece inner) Central location to create any type of GamePiece Trait (Decorator) from within VASSALGpIdChecker.createUpdatedPiece
(GamePiece oldPiece) Locate the SlotElement that matches oldPiece and return a new GamePiece created from that Slot.protected String
GpIdChecker.findState
(GamePiece oldPiece, GamePiece pNew, Decorator decoratorNewPc, Class<? extends GamePiece> classToFind) Locate a Decorator in the old piece that has the exact same type as the new Decorator and return it's state -
Uses of GamePiece in VASSAL.build.module
Modifier and TypeFieldDescriptionprotected GamePiece
Inventory.Counter.piece
protected GamePiece
Inventory.Counter.source
Modifier and TypeMethodDescriptionprotected GamePiece
BasicCommandEncoder.createBasic
(String type) Create aGamePiece
instance that is not a Decorator ("Trait").BasicCommandEncoder.BasicPieceFactory.createBasicPiece
(String type) BasicCommandEncoder.createPiece
(String type) Creates a GamePiece instance from the given type information.Map.findAnyPiece
(Point pt, PieceFinder finder) Use the providedPieceFinder
instance to locate any piece at the given location, regardless of whether it is visible or not.Map.findPiece
(Point pt, PieceFinder finder) Use the providedPieceFinder
instance to locate a visible piece at the given locationMap.getAllPieces()
Inventory.Counter.getPiece()
PrototypeDefinition.getPiece()
protected GamePiece
PrototypeDefinition.getPiece
(PropertySource props) For the case when the piece definition is a Message Format, expand the definition using the given propertiesGameState.getPieceForId
(String id) Map.getPieces()
Inventory.getSelectedCounter()
Modifier and TypeMethodDescriptionGameState.getAllPieces()
GameState.getPieces()
Deprecated, for removal: This API element is subject to removal in a future version.Refresher.getRefreshedPieces()
Modifier and TypeMethodDescriptionboolean
void
A piece has been added to the game. 1.void
Add aGamePiece
to the current game.void
Adds a GamePiece to this map's list of pieces.Map.boundingBoxOf
(GamePiece p) BasicCommandEncoder.createDecorator
(String type, GamePiece inner) BasicCommandEncoder.DecoratorFactory.createDecorator
(String type, GamePiece inner) protected int
Inventory.getTotalValue
(GamePiece p) void
GameRefresher.indexAttachment
(GamePiece piece) Index any attachments in this piece, storing a list of the attachments' contents, each under a hash made by taking the outermost piece's Unique ID and adding the notionally unique Attachment Nameint
Returns the index of a piece.void
AttachmentManager.pieceAdded
(GamePiece piece) void
AttachmentManager.pieceRemoved
(GamePiece piece) Place a piece at the destination point.Map.placeOrMerge
(GamePiece p, Point pt) Move a piece to the destination point.Map.positionOf
(GamePiece p) void
GameRefresher.refreshAttachment
(GamePiece piece, Command command) For each *new* outermost piece that has Attachments, we look up the *old* outermost piece, and use its Unique ID plus each Attachment trait's name as a lookup hash to find the old list of contents.void
Plugin.registerGamePiece
(GamePiece p) Utility routine to register a GamePiece with the PieceDefiner so that it appears as an option in the list of traitsAttachmentManager.removeAttachments
(GamePiece piece) A piece is being removed by a Delete or Replace Command.void
AttachmentManager.removePiece
(GamePiece piece) A piece has been removed from a Map.void
GameState.removePiece
(GamePiece piece) void
Map.removePiece
(GamePiece p) Removes a piece from the mapMap.selectionBoundsOf
(GamePiece p) void
void
void
Map.Merger.visitDefault
(GamePiece piece) -
Uses of GamePiece in VASSAL.build.module.index
Modifier and TypeMethodDescriptionReturn a list of pieces at a specific point on a specific mapReturn a list of pieces within a given range of a specified pointReturn a list of pieces on a Map with a specified value for the specified propertyReturn a list of pieces within a given range of another pieceReturn the set of pieces that have the specified value for the property we are indexingReturn a list of pieces in range of a given point.Return a list of pieces in range of a given point.Return a list of pieces in range of a given pieceVassalMapQuadTree.getPiecesInRange
(Point pos, int range) Return a list of all pieces within range of a given Point NOTE: This is just a pre-selection, we are seacrchign a box, not a circle so extra pieces will be returned that are not in range.Modifier and TypeMethodDescriptionvoid
PiecePropertyIndex.addOrUpdatePiece
(GamePiece piece) Add a new piece to the index, or check and update the value for an existing piecevoid
VassalMapPieceIndex.addOrUpdatePiece
(GamePiece piece) A piece has been added to our map.void
VassalMapQuadTree.addOrUpdatePiece
(GamePiece p) Add a piece to the Qtree, or change it's locationReturn a list of pieces within a given range of another pieceReturn a list of pieces in range of a given piecevoid
IndexManager.pieceMoved
(GamePiece piece, Map map) A piece has just moved or been placed on the board, update any location based indexes and create any property based indexes if we have not seen this piece beforevoid
IndexManager.pieceRemoved
(GamePiece piece, Map map) A piece has been removed from a Mapvoid
PiecePropertyIndex.removePiece
(GamePiece piece) Remove a piece from the indexvoid
VassalMapPieceIndex.removePiece
(GamePiece piece) A piece has been removed from our mapvoid
VassalMapQuadTree.removePiece
(GamePiece p) Remove a piece from the Qtree and the cross-reference -
Uses of GamePiece in VASSAL.build.module.map
Modifier and TypeClassDescriptionclass
PieceMover handles the "Drag and Drop" of pieces and stacks, onto or within a Map window.Modifier and TypeFieldDescriptionprotected GamePiece
KeyBufferer.bandSelectPiece
protected GamePiece
PieceMover.dragging
protected GamePiece
HighlightLastMoved.lastMoved
protected GamePiece
SetupStack.StackConfigurer.myPiece
protected GamePiece
SetupStack.View.myPiece
Modifier and TypeFieldDescriptionCounterDetailViewer.displayablePieces
CounterDetailViewer.Visitor.pieces
MovementReporter.MoveSummary.pieces
protected Comparator
<GamePiece> PieceMover.pieceSorter
Modifier and TypeMethodDescriptionCompoundPieceCollection.getAllPieces()
PieceCollection.getAllPieces()
Return all pieces in the collection, regardless of visibilitySimplePieceCollection.getAllPieces()
CompoundPieceCollection.getPieces()
protected GamePiece[]
CompoundPieceCollection.getPieces
(boolean includeDisabled) PieceCollection.getPieces()
Return all currently-visible pieces in the collection as a read-only arraySimplePieceCollection.getPieces()
Modifier and TypeMethodDescriptionCounterDetailViewer.getDisplayablePieces()
Build an ArrayList of pieces to be displayed in order from bottom up, based on selection criteria setup in config.GlobalMap.CounterViewer.getDisplayablePieces()
CounterDetailViewer.Visitor.getPieces()
Modifier and TypeMethodDescriptionboolean
boolean
protected boolean
void
Adds a piece to the overall collection, by adding it to the simple collection for the layer it belongs in.void
Adds a piecevoid
DrawPile.addToContents
(GamePiece p) DrawPile.addToContents
(GamePiece p, boolean checkAccessibility) protected void
SelectionHighlighter.boundingBox
(GamePiece p) boolean
Used when moving a piece on top of another piece to determine whether they can be merged together (e.g. can this Piece be added to that Stack, can this Stack be added to that Deck, can these two Stacks be combined together into one).boolean
Return true if the two pieces can be merged into a single stackboolean
protected boolean
CompoundPieceCollection.canPiecesMerge
(GamePiece p1, GamePiece p2) Two pieces can merge in the default case as long as neither is presently invisible and neither has a Does Not Stack (Hideable
) trait.protected boolean
LayeredPieceCollection.Collection.canPiecesMerge
(GamePiece p1, GamePiece p2) protected boolean
CompoundPieceCollection.canStackAndPieceMerge
(Stack s, GamePiece p) A piece can be merged into a stack if it is merge-compatible with the first piece in the stack.boolean
CounterDetailViewer.Filter.checkFilter
(GamePiece piece) protected void
MapShader.checkPiece
(Area area, GamePiece piece) PieceMover.checkTrueMoved
(GamePiece p) For a piece, mark it moved IF it changed locations or matsint
Implement Comparator to sort the contents of the drag buffer before completing the drag.static JPopupMenu
MenuDisplayer.createPopup
(GamePiece target) static JPopupMenu
MenuDisplayer.createPopup
(GamePiece target, boolean global) StackMetrics.createStack
(GamePiece p) StackMetrics.createStack
(GamePiece p, boolean force) void
protected void
StackMetrics.drawUnexpanded
(GamePiece p, Graphics g, int x, int y, Component obs, double zoom) protected Rectangle
protected PieceCollection
CompoundPieceCollection.getCollectionForPiece
(GamePiece p) Given a game piece, returns the simple piece collection for the layer that it belongs inprotected PieceFinder
PieceMover.getDropTargetSelector
(GamePiece piece, MatCargo cargo, Mat mat) Return a DropTargetSelector suitable for the type of piece being moved When the user *completes* a drag-and-drop operation, the pieces being dragged will either be:
(1) combined in a stack with an existing piece (or stack, or deck) on the map
(2) placed alone in a brand new stack
(3) or, in the case of non-stacking pieces, placed on the map without stack.int
CompoundPieceCollection.getLayerForPiece
(GamePiece p) Default implementation is "degenerate", having only a single layer -- when extending this class, this method takes a piece and determines which of several layers it belongs in, returning an index.int
DefaultPieceCollection.getLayerForPiece
(GamePiece p) int
LayeredPieceCollection.Collection.getLayerForPiece
(GamePiece p) Gets the appropriate layer for the given piece (or Stack or Deck).CompoundPieceCollection.getLayerNameForPiece
(GamePiece p) Default implementation is "degenerate", having only a single layer -- when extending this class, this method takes a piece and determines which of several layers it belongs in, returning the layer name.LayeredPieceCollection.Collection.getLayerNameForPiece
(GamePiece p) int
int
Returns the index of a piece.int
Returns the index of a piece.protected boolean
MovementReporter.HiddenMoveSummary.isInvisible
(GamePiece piece) Handles marking pieces as "moved" or "not moved", based on Global Options settings.Place a GamePiece on top of another GamePiece Create/remove stacks as necessary, even if stacking is disabled for this instanceprotected Command
PieceMover.movedPiece
(GamePiece p, Point loc) Invoked just BEFORE a piece is moved.void
CompoundPieceCollection.moveToBack
(GamePiece p) void
PieceCollection.moveToBack
(GamePiece p) Reposition a piece to the back of all others in the same visual layervoid
SimplePieceCollection.moveToBack
(GamePiece p) void
CompoundPieceCollection.moveToFront
(GamePiece p) void
PieceCollection.moveToFront
(GamePiece p) Reposition a piece to the front of all others in the same visual layervoid
SimplePieceCollection.moveToFront
(GamePiece p) StackMetrics.placeOrMerge
(GamePiece fixed, GamePiece moving) Merge the two pieces if stacking is enabled.StackMetrics.relativePosition
(Stack parent, GamePiece c) void
void
Removes the piecevoid
void
SimplePieceCollection.reposition
(GamePiece p, int pos) static void
HighlightLastMoved.setLastMoved
(GamePiece p) void
HighlightLastMoved.setLastMovedPiece
(GamePiece p) protected Command
PieceMover.setOldLocations
(GamePiece p) Populates the "OldLocations" properties (e.g.CounterDetailViewer.Visitor.visitDefault
(GamePiece p) KeyBufferer.KBDeckVisitor.visitDefault
(GamePiece p) Handles non-stacked units, including Does Not Stack units.LayeredPieceCollection.Collection.visitDefault
(GamePiece p) Ordinary pieces are queried for their value of the designated layer property, and this value is then checked against the list of layer names.PieceRecenterer.visitDefault
(GamePiece p) ImplementsDeckVisitor
.Modifier and TypeMethodDescriptionprotected Command
PieceMover.applyKeyAfterMove
(List<GamePiece> pieces, KeyStroke key) Applies a key command to each of a list of pieces.protected Command
PieceMover.doTrueMovedSupport
(List<GamePiece> pieces) For a list of pieces, mark them moved IF they changed locations or matsprotected void
CounterDetailViewer.drawGraphics
(Graphics g, Point pt, JComponent comp, List<GamePiece> pieces) protected void
Label with the location If the counter viewer is being displayed, then place the location name just above the left hand end of the counters.protected void
protected void
Set the bounds field large enough to accommodate the given set of pieces -
Uses of GamePiece in VASSAL.build.module.map.deck
Modifier and TypeClassDescriptionclass
Compare 2 GamePieces based on a List of SortParameters -
Uses of GamePiece in VASSAL.build.module.properties
-
Uses of GamePiece in VASSAL.build.widget
Modifier and TypeFieldDescriptionprotected GamePiece
PieceSlot.c
protected GamePiece
PieceSlot.expanded
Modifier and TypeMethodDescriptionprotected GamePiece
PieceSlot.getExpandedPiece()
Return defined GamePiece with prototypes fully expanded.PieceSlot.getPiece()
Return defined GamePiece with prototypes unexpanded.Modifier and TypeMethodDescriptionvoid
void
PieceSlot.updateGpId
(GamePiece piece) Allocate new gpids in the given GamePiece -
Uses of GamePiece in VASSAL.command
Modifier and TypeMethodDescriptionprotected PieceVisitorDispatcher
MovePiece.createMergeFinder
(Map map, GamePiece p, Point pt) Creates a newPieceVisitorDispatcher
that will create aCommand
object to merge the target piece with any applicable pieces at the target location -
Uses of GamePiece in VASSAL.configure
Modifier and TypeMethodDescriptionboolean
PropertyExpression.accept
(PropertySource source, GamePiece piece) boolean
PropertyExpression.accept
(PropertySource source, GamePiece piece, Auditable owner, AuditTrail trail) boolean
boolean
boolean
PropertyExpression.accept
(GamePiece source, GamePiece piece, Auditable owner, AuditTrail trail) boolean
boolean
PropertyExpression.accept
(GamePiece piece, Auditable owner, AuditTrail audit) protected void
FormattedExpressionConfigurer.storePiece
(GamePiece p) ModifierConstructorDescriptionBeanShellExpressionConfigurer
(String key, String name, String val, GamePiece piece) Create a labeled BeanShellConfigurer with an initial value and target pieceBeanShellExpressionConfigurer
(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option) BeanShellExpressionConfigurer
(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option, boolean displayOnly) BeanShellExpressionConfigurer
(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option, FunctionBuilder builder) BeanShellExpressionConfigurer
(String val, GamePiece piece) Create an unlabeled BeanShellConfigurer with an initial value and target pieceFormattedExpressionConfigurer
(String key, String name, String s, GamePiece p) FormattedStringArrayConfigurer
(String key, String name, GamePiece target) GlobalCommandTargetConfigurer
(GlobalCommandTarget target, GamePiece sourcePiece) PlayerIdFormattedExpressionConfigurer
(String[] options, String initialValue, GamePiece piece) PropertyExpressionConfigurer
(String key, String name, String val, GamePiece piece) PropertyExpressionConfigurer
(String key, String name, PropertyExpression val, GamePiece piece) PropertyExpressionConfigurer
(PropertyExpression val, GamePiece piece) PropertyNameExpressionConfigurer
(String key, String name, String val, GamePiece piece) PropertyNameExpressionConfigurer
(String key, String name, PropertyExpression val, GamePiece piece) -
Uses of GamePiece in VASSAL.counters
Modifier and TypeInterfaceDescriptioninterface
If class implementing GamePiece also implements the EditablePiece interface, then it can be manipulated from the Editor's Configuration Tree via thePieceDefiner
dialog.Modifier and TypeClassDescriptionclass
A Trait (akaDecorator
that acts like a button on a GamePiece, such that clicking on a particular area of the piece invokes a key commandclass
class
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)class
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.class
Basic class for representing a physical component of the game.class
Trait to draw a colored border around a piececlass
Conditional Marker A marker with a variable value depending on conditions.class
This trait adds a command that creates a duplicate of the selected Gamepiececlass
A trait that exists in a Piece Definition, but is not included when the piece is created in a real game.class
Trait that sends a Key Command to other pieces, selected with various filters.class
A collection of pieces that behaves like a deck, i.e.: Doesn't move.class
The abstract class describing a generic 'Trait' of a full GamePiece.class
This trait adds a command that creates a duplicate of the selected Gamepiececlass
Implements a trait to allow a piece to be deselected from the KeyBuffer in response to a Key Command.class
Trait that contains a property accessible via getProperty() and updatable dynamically via key commandsclass
d/b/a "Layer" The "Layer" trait.class
Embellishment has been extensively re-written for Vassal 3.2 changing both the behavior and the visual look of the configurer.class
Displays a movement trail indicating where a piece has been movedclass
d/b/a "Can Rotate" A Decorator that rotates a GamePiece to an arbitrary angleclass
Adds a menu entry that fires a specified key event to the module window.class
class
d/b/a "Does Not Stack" Decorator that filters events to prevent a GamePiece from being selected and/or moved.class
d/b/a "Text Label" Displays a text label, with content specified by the user at runtime.class
A generic Decorator that retains in its state the value of a property.class
Designates the piece as a "Mat" on which other pieces ("Cargo") can be placed.class
Designates the piece as "Cargo", which can be placed on a "Mat" to move along with itclass
This trait puts a menu separator bar in the context menu for the piececlass
d/b/a "Mark When Moved" A GamePiece with this trait will automatically be marked whenever it is moved.class
Allows a single trait to generate multiple context menu commands, using a set of filtered map locations.class
A trait for assigning an arbitrary shape to aGamePiece
class
d/b/a "Mask" Trait that lets some traits of a piece be hidden "from some players, some of the time".class
d/b/a "Can Pivot" Provides commands to pivot a Game Piece around a given pointclass
This Decorator defines a key command to places another counter on top of this one.class
A trait that plays a sound clipclass
A Decorator class that endows a GamePiece with a dialog.class
GamePiece trait that replaces a GamePiece with another oneclass
d/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)class
RestrictCommands Restrict the availability of Key Commands, depending on a Property Match Stringclass
d/b/a "Restricted Access" A GamePiece with the Restricted trait can only be manipulated by the player playing a specific sideclass
GamePiece trait that returns a piece to aDrawPile
class
This trait adds a command that sends a piece to another location.class
class
class
A Stack is a collection of pieces in the same location that can often be moved with a single drag-and-drop.class
A trait that groups menu items of other traits into a sub-menuclass
d/b/a "Spreadsheet" A Decorator class that endows a GamePiece with an editable spreadsheet (i.e.class
A trait to expose a translated string as a readable/displayable property.class
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.class
Macro Execute a series of Keystrokes against this same piece - Triggered by own KeyCommand or list of keystrokes - Match against an optional Property Filterclass
d/b/a "Prototype" This trait is a placeholder for a pre-defined series of traits specified in aPrototypeDefinition
object.Modifier and TypeClassDescriptionclass
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 StackModifier and TypeFieldDescriptionprotected GamePiece[]
Stack.contents
protected GamePiece
MatCargo.mat
protected GamePiece
Obscurable.obscuredToMeView
protected GamePiece
Obscurable.obscuredToOthersView
protected GamePiece
TriggerAction.outer
protected GamePiece
Decorator.piece
Modifier and TypeFieldDescriptionPieceDefiner.availableList
protected static DefaultListModel
<GamePiece> PieceDefiner.availableModel
protected ListCellRenderer
<? super GamePiece> PieceDefiner.availableRenderer
Attachment.contents
Mat.contents
protected DefaultListModel
<GamePiece> PieceDefiner.inUseModel
Deck.nextDraw
protected ListCellRenderer
<? super GamePiece> PieceDefiner.r
PieceIterator.VISIBLE
Modifier and TypeMethodDescriptionstatic <T extends GamePiece>
PieceIteratorPieceIterator.visible
(Enumeration<T> e) Deprecated, for removal: This API element is subject to removal in a future version.static <T extends GamePiece>
PieceIteratorModifier and TypeMethodDescriptionStack.bottomPiece()
Stack.bottomPiece
(String playerId) PieceCloner.clonePiece
(GamePiece piece) Create a new instance that is a clone of the given piece.PieceCloner.clonePiece
(GamePiece piece, boolean expandPiece) PieceCloner.clonePieceUnexpanded
(GamePiece piece) Create a new instance that is a clone of the given piece.PlaceMarker.createBaseMarker()
The marker, with prototypes unexpandedPlaceMarker.createMarker()
The marker, with prototypes fully expandedReplace.createMarker()
protected GamePiece
Translate.findTarget
(KeyStroke stroke) Attachment.getAttachedPieceAt
(int index) GlobalCommandTarget.getCurPiece()
static GamePiece
Decorator.getDecorator
(GamePiece p, Class<?> type) UsePrototype.getExpandedInner()
Build a new GamePiece instance based on the traits in the referencedPrototypeDefinition
.Decorator.getInner()
static GamePiece
Decorator.getInnermost
(GamePiece p) MatCargo.getMat()
MatHolder.getMatPiece()
ReportState.OldAndNewPieceProperties.getNewPiece()
static GamePiece
Decorator.getOutermost
(GamePiece p) PieceDefiner.getPiece()
Stack.getPieceAbove
(GamePiece p) Finds the piece "above" the one providedStack.getPieceAt
(int index) Stack.getPieceBeneath
(GamePiece p) Finds the piece "underneath" the one providedAttachment.getPropertyPiece()
KeyCommand.getTarget()
MatCargo.locateNewMat
(Map map, Point pt) Non Command generating part of findNewMat().PieceIterator.nextPiece()
protected GamePiece
PieceDefiner.removeDecorator
(int index) Remove the Decorator at a given position in the listReturn the argument GamePiece (or one of its children if a Stack) found at the given point on the given MapStack.topPiece()
CAUTION: returns the top VISIBLE piece in the stack, or null if none is visible.Modifier and TypeMethodDescriptionDragBuffer.asList()
KeyBuffer.asList()
Returns a list of all selected pieces.Stack.asList()
A list of the pieces in the stack.Attachment.getAttachList()
Attachment.getAttachList
(GamePiece piece, String attachmentName) Return the named attachment list on the supplied GamePieceMatHolder.getCargo()
Attachment.getContents()
Mat.getContents()
Decorator.getDecorators
(GamePiece p, Class<?> type) Deck.getOrderedPieces()
Return a list if pieces in the Deck in Dealable order.KeyBuffer.getPieces()
Deprecated, for removal: This API element is subject to removal in a future version.UseKeyBuffer.getPiecesIterator()
instead.Stack.getPieces()
Deprecated, for removal: This API element is subject to removal in a future version.useStack.asList()
Stack.getPiecesInVisibleOrderIterator()
Returns pieces in the order in which they are visible to the player -- topmost first In other words, selected pieces first, then unselected pieces from the top to the bottom.KeyBuffer.getPiecesIterator()
Returns an iterator for all selected pieces.Stack.getPiecesIterator()
Stack.getPiecesReverseIterator()
PieceDefiner.getTraitList()
Export a List of all the allowable traitsActionButton.matchingTraits
(GamePiece p, Point point) Finds all the ActionButton traits within a game piece which mouse a particular mouse strokeModifier and TypeMethodDescriptionboolean
Deprecated.boolean
boolean
BooleanAndPieceFilter.accept
(GamePiece piece, Auditable owner, AuditTrail audit) boolean
Deprecated.boolean
boolean
BooleanOrPieceFilter.accept
(GamePiece piece, Auditable owner, AuditTrail audit) void
GlobalCommand.IndexedFastmatchDeckPolicyManager.accept
(GamePiece piece, DeckVisitorDispatcher dispatcher, GlobalCommandVisitor visitor) If a piece resides in a Deck, check if the Deck acceptance limit has been reached for that particular Deck before running the piece through the dispatcher.boolean
Test if a piece matches the filter.default boolean
Test if a piece matches the filter and provide Expression auditing facilitiesdefault boolean
PieceFilter.accept
(GamePiece piece, Auditable owner, AuditTrail audit) Test if a piece matches the filter and provide Expression auditing facilitiesboolean
void
void
Adding a piece to theKeyBuffer
"selects the piece" (and lets it know about in its SELECTED property)void
Adds a piece to the stack.void
void
Adds a piece of cargo to this matstatic void
PieceDefiner.addDefinition
(GamePiece definition) Plugins can add additional GamePiece definitionsprotected static void
PieceDefiner.addElement
(GamePiece piece) void
KeyBuffer.addFromPalette
(GamePiece p, PieceSlot slot) void
Translate.MoveExecuter.addKeyEventTarget
(GamePiece piece) void
protected void
protected void
protected void
protected void
protected void
ColoredBorder.boundingBox
(GamePiece p) Highlighter.boundingBox
(GamePiece p) PieceCloner.clonePiece
(GamePiece piece) Create a new instance that is a clone of the given piece.PieceCloner.clonePiece
(GamePiece piece, boolean expandPiece) PieceCloner.clonePieceUnexpanded
(GamePiece piece) Create a new instance that is a clone of the given piece.int
boolean
boolean
Tells if a particular piece is selected (i.e. present in the KeyBuffer)void
Handle a mouse click on the given GamePiece at the given location (where 0,0 is the center of the piece).void
void
boolean
static Command
MatCargo.findNewMat
(Command c, GamePiece gp) Checks if GamePiece gp is a MatCargo, and if so finds it a new mat if needed (or clears it if it has moved off its former mat)Attachment.getAttachList
(GamePiece piece, String attachmentName) Return the named attachment list on the supplied GamePiecestatic GamePiece
Decorator.getDecorator
(GamePiece p, Class<?> type) Decorator.getDecorators
(GamePiece p, Class<?> type) static GamePiece
Decorator.getInnermost
(GamePiece p) static Embellishment
Embellishment.getLayerWithMatchingActivateCommand
(GamePiece piece, KeyStroke stroke, boolean active) If the argument GamePiece contains a Layer whose "activate" command matches the given keystroke, and whose active status matches the boolean argument, return that Layerstatic Embellishment
Embellishment.getLayerWithMatchingActivateCommand
(GamePiece piece, NamedKeyStroke stroke, boolean active) static Embellishment
Embellishment0.getLayerWithMatchingActivateCommand
(GamePiece piece, KeyStroke stroke, boolean active) If the argument GamePiece contains a Layer whose "activate" command matches the given keystroke, and whose active status matches the boolean argument, return that Layerstatic GamePiece
Decorator.getOutermost
(GamePiece p) Stack.getPieceAbove
(GamePiece p) Finds the piece "above" the one providedStack.getPieceBeneath
(GamePiece p) Finds the piece "underneath" the one providedKeyBuffer.getSlotForPiece
(GamePiece piece) Translate.MoveExecuter.getUpdatedPosition
(GamePiece target) Return the updated position of a piece that has a move calculation recordedboolean
boolean
protected void
ColoredBorder.highlightSelectionBounds
(GamePiece p, Graphics g, int x, int y, Component obs, double zoom) int
Finds the index of a piece in the stackvoid
Inserts a child GamePiece at a given index.void
Stack.insertChild
(GamePiece child, int index) Adds a GamePiece to this Stack.protected void
PieceDefiner.insertDecorator
(int index, GamePiece piece) Insert a Decorator into the list at a given positionprotected void
Deck.insertPieceAt
(GamePiece p, int index) Inserts a piece into a specific position into the Deck (counting down from the top)protected void
Deck.insertPieceAt
(GamePiece p, int index, boolean suppressDeckCounts) Inserts a piece into a specific position into the Deck (counting down from the top)protected void
Stack.insertPieceAt
(GamePiece p, int index) Insert a piece at a particular point in the stackprotected void
Stack.insertPieceAt
(GamePiece p, int index, boolean suppressDeckCounts) Insert a piece at a particular point in the stackMat.makeAddCargoCommand
(GamePiece p) Adds a piece of cargo and returns a command to duplicate the operation on another clientAttachment.makeAddTargetCommand
(GamePiece p) Adds a target and returns a command to duplicate the operation on another clientMat.makeRemoveCargoCommand
(GamePiece p) Removes a MatCargo piece from our list of cargo, and returns a Command to duplicate the changes on another clientAttachment.makeRemoveTargetCommand
(GamePiece p) Removes a piece from our list of targets, and returns a Command to duplicate the changes on another clientMatCargo.makeSetMatCommand
(GamePiece newMat) Places us "on" the designated Mat and returns a Command to duplicate the changes on other clientsSetPieceProperty.makeSetTargetCommand
(GamePiece p) Our filter has found a matching piece.ActionButton.matchingTraits
(GamePiece p, Point point) Finds all the ActionButton traits within a game piece which mouse a particular mouse strokeprotected void
Replace.matchTraits
(GamePiece base, GamePiece marker) Match trait states from the supplied base Decorator to the marker - Markers are never matched - Dynamic Properties are matched on Name only - All other traits matched on full Typeboolean
Deck.mayContain
(GamePiece piece) Does the specified GamePiece meet the rules to be contained in this Deck.protected Command
protected Command
protected Command
protected Command
Translate.moveTarget
(GamePiece target) protected Point
SendToLocation.offsetDestination
(int x, int y, GamePiece outer) Deck.pieceAdded
(GamePiece p) Stack.pieceAdded
(GamePiece p) Perform some action on a GamePiece that has just been added to this StackDeck.pieceRemoved
(GamePiece p) Stack.pieceRemoved
(GamePiece p) Perform some action on a GamePiece that has just been removed this Stackstatic Command
Decorator.putOldProperties
(GamePiece p) * Set the Oldxxxx properties related to movement (e.g.void
Deprecated, for removal: This API element is subject to removal in a future version.void
void
Deselect the specified piece -- removes it from theKeyBuffer
void
void
Mat.removeCargo
(GamePiece p) Removes a MatCargo piece from our list of cargo.void
KeyBuffer.removeFromPalette
(GamePiece p, PieceSlot slot) Deselects a palette piece, repainting its palette slotvoid
Attachment.removeTarget
(GamePiece p) Removes a piece from our list of targetsReturn the argument GamePiece (or one of its children if a Stack) found at the given point on the given Mapprotected void
PlaceMarker.selectMarker
(GamePiece marker) protected void
Replace.selectMarker
(GamePiece marker) void
Stack.selectNext
(GamePiece c) Finds and selects (in the UI) the next piece in the stack after this onevoid
GlobalCommandTarget.setCurPiece
(GamePiece curPiece) static Command
Decorator.setDynamicProperties
(List<Parameter> parameters, GamePiece piece, PropertySource source, Auditable owner) Find and set a series of Dynamic Properties in the supplied GamePiece named propertyName and generate a Command to set it to the specified values in other clientsstatic Command
Decorator.setDynamicProperties
(List<Parameter> parameters, GamePiece piece, PropertySource source, Auditable owner, AuditTrail auditSoFar) static Command
Decorator.setDynamicProperty
(String propertyName, String value, GamePiece piece, PropertySource source, Auditable owner, AuditTrail audit) Find a Dynamic Property in the supplied GamePiece named propertyName and generate a Command to set it to the specified valuevoid
void
void
void
Mark us as being on a specific Mat piecevoid
GlobalCommand.Visitor.visitDefault
(GamePiece p) GlobalCommandVisitor.visitDefault
(GamePiece p) PieceFinder.MatOnly.visitDefault
(GamePiece piece) PieceFinder.Movable.visitDefault
(GamePiece piece) PieceFinder.StackOnly.visitDefault
(GamePiece piece) PieceVisitor.visitDefault
(GamePiece p) GamePieces that are not handled by one of the type-specific methods (e.g.Modifier and TypeMethodDescriptionprotected void
GlobalCommand.checkForMatchingAttachments
(Attachment attach, String attachmentName, String attachmentId, Set<GamePiece> pieces) void
Remove any cargo on this mat from the supplied allCargo list and add to the MatHolders cargo listvoid
void
Attachment.setContents
(List<GamePiece> newContents) Deck.setContents
(Collection<GamePiece> c) Set the contents of this Deck to a Collection of GamePiecesvoid
DragBuffer.sort
(Comparator<GamePiece> comp) void
KeyBuffer.sort
(Comparator<GamePiece> comp) Sorts the selected pieces based on a particular ComparatorModifierConstructorDescriptionActionButton
(String type, GamePiece inner) AreaOfEffect
(String type, GamePiece inner) Attachment
(String type, GamePiece inner) BorderOutline
(String type, GamePiece p) CalculatedProperty
(String type, GamePiece inner) ComponentMouseListener
(GamePiece piece, int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.CounterGlobalKeyCommand
(String type, GamePiece inner) DynamicKeyCommand
(String name, NamedKeyStroke key, GamePiece target, TranslatablePiece i18nPiece, PropertyChanger propChanger) DynamicProperty
(String type, GamePiece p) Embellishment
(String type, GamePiece d) Embellishment0
(String type, GamePiece d) FreeRotator
(String type, GamePiece inner) GlobalHotKey
(String type, GamePiece inner) Immobilized
(String type, GamePiece p) Immobilized
(GamePiece p, String type) Deprecated, for removal: This API element is subject to removal in a future version.UseImmobilized(String, GamePiece)
instead.KeyCommand
(String name, KeyStroke key, GamePiece target) KeyCommand
(String name, KeyStroke key, GamePiece target, boolean enabled) KeyCommand
(String name, KeyStroke key, GamePiece target, TranslatablePiece i18nPiece) KeyCommand
(String name, KeyStroke key, GamePiece target, TranslatablePiece i18nPiece, boolean enabled) KeyCommand
(String name, NamedKeyStroke key, GamePiece target) KeyCommand
(String name, NamedKeyStroke key, GamePiece target, boolean enabled) KeyCommand
(String name, NamedKeyStroke key, GamePiece target, TranslatablePiece i18nPiece) KeyCommand
(String name, NamedKeyStroke key, GamePiece target, TranslatablePiece i18nPiece, boolean enabled) KeyCommandSubMenu
(String name, GamePiece target, TranslatablePiece i18nPiece) MenuSeparator
(String type, GamePiece inner) MovementMarkable
(String type, GamePiece p) MultiLocationCommand
(String type, GamePiece inner) MultiLocationKeyCommand
(String name, NamedKeyStroke key, GamePiece target, TranslatablePiece i18nPiece, String locationName, String zoneName, String boardName, String mapName) NonRectangular
(String type, GamePiece inner) Obscurable
(String type, GamePiece d) OldAndNewPieceProperties
(Map<String, Object> oldPiece, GamePiece newPiece) PieceImage
(GamePiece piece) Deprecated, for removal: This API element is subject to removal in a future version.PlaceMarker
(String type, GamePiece inner) PropertySheet
(String type, GamePiece p) ReportState
(String type, GamePiece inner) RestrictCommands
(String type, GamePiece inner) Restricted
(String type, GamePiece p) ReturnToDeck
(String type, GamePiece inner) SendToLocation
(String type, GamePiece inner) SetGlobalProperty
(String type, GamePiece p) SetPieceProperty
(String type, GamePiece p) Creates a Stack to contain a specific stackable piece.TranslatableMessage
(String type, GamePiece p) TriggerAction
(String type, GamePiece inner) UsePrototype
(String type, GamePiece inner) ModifierConstructorDescriptionPieceIterator
(Iterator<? extends GamePiece> i) PieceIterator
(Iterator<? extends GamePiece> i, PieceFilter f) -
Uses of GamePiece in VASSAL.i18n
Modifier and TypeInterfaceDescriptioninterface
Decorators that contain localizable elements must implement this interfaceModifier and TypeFieldDescriptionprotected GamePiece
TranslatableMarker.markerDefinition
protected GamePiece
PieceI18nData.piece
ModifierConstructorDescriptionComponentI18nData
(Configurable c, GamePiece piece) Special build for PrototypeDefinition and PieceSlotPieceI18nData
(GamePiece piece) -
Uses of GamePiece in VASSAL.script
Modifier and TypeMethodDescriptionBshCommandEncoder.createDecorator
(String type, GamePiece inner) -
Uses of GamePiece in VASSAL.script.expression
Modifier and TypeMethodDescriptionboolean
Deprecated.boolean
boolean
BeanShellExpression.BshFilter.accept
(GamePiece piece, Auditable owner, AuditTrail audit) -
Uses of GamePiece in VASSAL.script.proxy
-
Uses of GamePiece in VASSAL.tools.imageop
Modifier and TypeMethodDescriptionGamePieceOp.getPiece()
GamePieceOpImpl.getPiece()
Returns the sourceGamePiece
.ModifierConstructorDescriptionConstructs anImageOp
which will produce an image from the givenGamePiece
. -
Uses of GamePiece in VASSAL.tools.imports.adc2
Modifier and TypeMethodDescriptionprotected GamePiece
ADC2Module.Piece.getBasicPiece()
protected GamePiece
ADC2Module.Piece.getGamePiece()
GameState.getAllPieces()
instead.