Uses of Interface
VASSAL.counters.GamePiece
Packages that use 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
Methods in VASSAL.build that return GamePieceModifier 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.Methods in VASSAL.build with parameters of type GamePieceModifier and TypeMethodDescriptionprotected voidGpIdChecker.checkTrait(GamePiece gp) Check for PlaceMarker traits in a GamePiece and add them to the cross-referenceprotected voidGpIdChecker.checkTrait(GamePiece gp, PrototypeDefinition prototype, GamePiece definition) protected voidCopy 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 StringGpIdChecker.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 stateMethod parameters in VASSAL.build with type arguments of type GamePiece -
Uses of GamePiece in VASSAL.build.module
Fields in VASSAL.build.module declared as GamePieceModifier and TypeFieldDescriptionprotected GamePieceInventory.Counter.pieceprotected GamePieceInventory.Counter.sourceFields in VASSAL.build.module with type parameters of type GamePieceMethods in VASSAL.build.module that return GamePieceModifier and TypeMethodDescriptionprotected GamePieceBasicCommandEncoder.createBasic(String type) Create aGamePieceinstance 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 providedPieceFinderinstance to locate any piece at the given location, regardless of whether it is visible or not.Map.findPiece(Point pt, PieceFinder finder) Use the providedPieceFinderinstance to locate a visible piece at the given locationMap.getAllPieces()Inventory.Counter.getPiece()PrototypeDefinition.getPiece()protected GamePiecePrototypeDefinition.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()Methods in VASSAL.build.module that return types with arguments of type GamePieceModifier and TypeMethodDescriptionGameState.getAllPieces()GameState.getPieces()Deprecated, for removal: This API element is subject to removal in a future version.Refresher.getRefreshedPieces()Methods in VASSAL.build.module with parameters of type GamePieceModifier and TypeMethodDescriptionbooleanvoidA piece has been added to the game. 1.voidAdd aGamePieceto the current game.voidAdds 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 intInventory.getTotalValue(GamePiece p) voidGameRefresher.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 NameintReturns the index of a piece.voidAttachmentManager.pieceAdded(GamePiece piece) voidAttachmentManager.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) voidGameRefresher.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.voidPlugin.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.voidAttachmentManager.removePiece(GamePiece piece) A piece has been removed from a Map.voidGameState.removePiece(GamePiece piece) voidMap.removePiece(GamePiece p) Removes a piece from the mapMap.selectionBoundsOf(GamePiece p) voidvoidvoidMap.Merger.visitDefault(GamePiece piece) Constructors in VASSAL.build.module with parameters of type GamePiece -
Uses of GamePiece in VASSAL.build.module.index
Methods in VASSAL.build.module.index that return types with arguments of type GamePieceModifier 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.Methods in VASSAL.build.module.index with parameters of type GamePieceModifier and TypeMethodDescriptionvoidPiecePropertyIndex.addOrUpdatePiece(GamePiece piece) Add a new piece to the index, or check and update the value for an existing piecevoidVassalMapPieceIndex.addOrUpdatePiece(GamePiece piece) A piece has been added to our map.voidVassalMapQuadTree.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 piecevoidIndexManager.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 beforevoidIndexManager.pieceRemoved(GamePiece piece, Map map) A piece has been removed from a MapvoidPiecePropertyIndex.removePiece(GamePiece piece) Remove a piece from the indexvoidVassalMapPieceIndex.removePiece(GamePiece piece) A piece has been removed from our mapvoidVassalMapQuadTree.removePiece(GamePiece p) Remove a piece from the Qtree and the cross-reference -
Uses of GamePiece in VASSAL.build.module.map
Classes in VASSAL.build.module.map that implement interfaces with type arguments of type GamePieceModifier and TypeClassDescriptionclassPieceMover handles the "Drag and Drop" of pieces and stacks, onto or within a Map window.Fields in VASSAL.build.module.map declared as GamePieceModifier and TypeFieldDescriptionprotected GamePieceKeyBufferer.bandSelectPieceprotected GamePiecePieceMover.draggingprotected GamePieceHighlightLastMoved.lastMovedprotected GamePieceSetupStack.StackConfigurer.myPieceprotected GamePieceSetupStack.View.myPieceFields in VASSAL.build.module.map with type parameters of type GamePieceModifier and TypeFieldDescriptionCounterDetailViewer.displayablePiecesCounterDetailViewer.Visitor.piecesMovementReporter.MoveSummary.piecesprotected Comparator<GamePiece> PieceMover.pieceSorterMethods in VASSAL.build.module.map that return GamePieceModifier 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()Methods in VASSAL.build.module.map that return types with arguments of type GamePieceModifier 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()Methods in VASSAL.build.module.map with parameters of type GamePieceModifier and TypeMethodDescriptionbooleanbooleanprotected booleanvoidAdds a piece to the overall collection, by adding it to the simple collection for the layer it belongs in.voidAdds a piecevoidDrawPile.addToContents(GamePiece p) DrawPile.addToContents(GamePiece p, boolean checkAccessibility) protected voidSelectionHighlighter.boundingBox(GamePiece p) booleanUsed 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).booleanReturn true if the two pieces can be merged into a single stackbooleanprotected booleanCompoundPieceCollection.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 booleanLayeredPieceCollection.Collection.canPiecesMerge(GamePiece p1, GamePiece p2) protected booleanCompoundPieceCollection.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.booleanCounterDetailViewer.Filter.checkFilter(GamePiece piece) protected voidMapShader.checkPiece(Area area, GamePiece piece) PieceMover.checkTrueMoved(GamePiece p) For a piece, mark it moved IF it changed locations or matsintImplement Comparator to sort the contents of the drag buffer before completing the drag.static JPopupMenuMenuDisplayer.createPopup(GamePiece target) static JPopupMenuMenuDisplayer.createPopup(GamePiece target, boolean global) StackMetrics.createStack(GamePiece p) StackMetrics.createStack(GamePiece p, boolean force) voidprotected voidStackMetrics.drawUnexpanded(GamePiece p, Graphics g, int x, int y, Component obs, double zoom) protected Rectangleprotected PieceCollectionCompoundPieceCollection.getCollectionForPiece(GamePiece p) Given a game piece, returns the simple piece collection for the layer that it belongs inprotected PieceFinderPieceMover.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.intCompoundPieceCollection.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.intDefaultPieceCollection.getLayerForPiece(GamePiece p) intLayeredPieceCollection.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) intintReturns the index of a piece.intReturns the index of a piece.protected booleanMovementReporter.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 CommandPieceMover.movedPiece(GamePiece p, Point loc) Invoked just BEFORE a piece is moved.voidCompoundPieceCollection.moveToBack(GamePiece p) voidPieceCollection.moveToBack(GamePiece p) Reposition a piece to the back of all others in the same visual layervoidSimplePieceCollection.moveToBack(GamePiece p) voidCompoundPieceCollection.moveToFront(GamePiece p) voidPieceCollection.moveToFront(GamePiece p) Reposition a piece to the front of all others in the same visual layervoidSimplePieceCollection.moveToFront(GamePiece p) StackMetrics.placeOrMerge(GamePiece fixed, GamePiece moving) Merge the two pieces if stacking is enabled.StackMetrics.relativePosition(Stack parent, GamePiece c) voidvoidRemoves the piecevoidvoidSimplePieceCollection.reposition(GamePiece p, int pos) static voidHighlightLastMoved.setLastMoved(GamePiece p) voidHighlightLastMoved.setLastMovedPiece(GamePiece p) protected CommandPieceMover.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.Method parameters in VASSAL.build.module.map with type arguments of type GamePieceModifier and TypeMethodDescriptionprotected CommandPieceMover.applyKeyAfterMove(List<GamePiece> pieces, KeyStroke key) Applies a key command to each of a list of pieces.protected CommandPieceMover.doTrueMovedSupport(List<GamePiece> pieces) For a list of pieces, mark them moved IF they changed locations or matsprotected voidCounterDetailViewer.drawGraphics(Graphics g, Point pt, JComponent comp, List<GamePiece> pieces) protected voidLabel 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 voidprotected voidSet the bounds field large enough to accommodate the given set of piecesConstructors in VASSAL.build.module.map with parameters of type GamePiece -
Uses of GamePiece in VASSAL.build.module.map.deck
Classes in VASSAL.build.module.map.deck that implement interfaces with type arguments of type GamePieceModifier and TypeClassDescriptionclassCompare 2 GamePieces based on a List of SortParametersMethods in VASSAL.build.module.map.deck with parameters of type GamePiece -
Uses of GamePiece in VASSAL.build.module.properties
Fields in VASSAL.build.module.properties with type parameters of type GamePieceConstructor parameters in VASSAL.build.module.properties with type arguments of type GamePiece -
Uses of GamePiece in VASSAL.build.widget
Fields in VASSAL.build.widget declared as GamePieceModifier and TypeFieldDescriptionprotected GamePiecePieceSlot.cprotected GamePiecePieceSlot.expandedMethods in VASSAL.build.widget that return GamePieceModifier and TypeMethodDescriptionprotected GamePiecePieceSlot.getExpandedPiece()Return defined GamePiece with prototypes fully expanded.PieceSlot.getPiece()Return defined GamePiece with prototypes unexpanded.Methods in VASSAL.build.widget with parameters of type GamePieceModifier and TypeMethodDescriptionvoidvoidPieceSlot.updateGpId(GamePiece piece) Allocate new gpids in the given GamePieceConstructors in VASSAL.build.widget with parameters of type GamePiece -
Uses of GamePiece in VASSAL.command
Methods in VASSAL.command that return GamePieceMethods in VASSAL.command with parameters of type GamePieceModifier and TypeMethodDescriptionprotected PieceVisitorDispatcherMovePiece.createMergeFinder(Map map, GamePiece p, Point pt) Creates a newPieceVisitorDispatcherthat will create aCommandobject to merge the target piece with any applicable pieces at the target locationConstructors in VASSAL.command with parameters of type GamePiece -
Uses of GamePiece in VASSAL.configure
Fields in VASSAL.configure declared as GamePieceMethods in VASSAL.configure with parameters of type GamePieceModifier and TypeMethodDescriptionbooleanPropertyExpression.accept(PropertySource source, GamePiece piece) booleanPropertyExpression.accept(PropertySource source, GamePiece piece, Auditable owner, AuditTrail trail) booleanbooleanbooleanPropertyExpression.accept(GamePiece source, GamePiece piece, Auditable owner, AuditTrail trail) booleanbooleanPropertyExpression.accept(GamePiece piece, Auditable owner, AuditTrail audit) protected voidFormattedExpressionConfigurer.storePiece(GamePiece p) Constructors in VASSAL.configure with parameters of type GamePieceModifierConstructorDescriptionBeanShellExpressionConfigurer(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
Subinterfaces of GamePiece in VASSAL.countersModifier and TypeInterfaceDescriptioninterfaceIf class implementing GamePiece also implements the EditablePiece interface, then it can be manipulated from the Editor's Configuration Tree via thePieceDefinerdialog.Classes in VASSAL.counters that implement GamePieceModifier and TypeClassDescriptionclassA Trait (akaDecoratorthat acts like a button on a GamePiece, such that clicking on a particular area of the piece invokes a key commandclassclassTrait 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)classThis 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.classBasic class for representing a physical component of the game.classTrait to draw a colored border around a piececlassConditional Marker A marker with a variable value depending on conditions.classThis trait adds a command that creates a duplicate of the selected GamepiececlassA trait that exists in a Piece Definition, but is not included when the piece is created in a real game.classTrait that sends a Key Command to other pieces, selected with various filters.classA collection of pieces that behaves like a deck, i.e.: Doesn't move.classThe abstract class describing a generic 'Trait' of a full GamePiece.classThis trait adds a command that creates a duplicate of the selected GamepiececlassImplements a trait to allow a piece to be deselected from the KeyBuffer in response to a Key Command.classTrait that contains a property accessible via getProperty() and updatable dynamically via key commandsclassd/b/a "Layer" The "Layer" trait.classEmbellishment has been extensively re-written for Vassal 3.2 changing both the behavior and the visual look of the configurer.classDisplays a movement trail indicating where a piece has been movedclassd/b/a "Can Rotate" A Decorator that rotates a GamePiece to an arbitrary angleclassAdds a menu entry that fires a specified key event to the module window.classclassd/b/a "Does Not Stack" Decorator that filters events to prevent a GamePiece from being selected and/or moved.classd/b/a "Text Label" Displays a text label, with content specified by the user at runtime.classA generic Decorator that retains in its state the value of a property.classDesignates the piece as a "Mat" on which other pieces ("Cargo") can be placed.classDesignates the piece as "Cargo", which can be placed on a "Mat" to move along with itclassThis trait puts a menu separator bar in the context menu for the piececlassd/b/a "Mark When Moved" A GamePiece with this trait will automatically be marked whenever it is moved.classAllows a single trait to generate multiple context menu commands, using a set of filtered map locations.classA trait for assigning an arbitrary shape to aGamePiececlassd/b/a "Mask" Trait that lets some traits of a piece be hidden "from some players, some of the time".classd/b/a "Can Pivot" Provides commands to pivot a Game Piece around a given pointclassThis Decorator defines a key command to places another counter on the same map as this one, normally on top but stack adjustment and offsets may be specified too.classA trait that plays a sound clipclassA Decorator class that endows a GamePiece with a dialog.classGamePiece trait that replaces a GamePiece with another oneclassd/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)classRestrictCommands Restrict the availability of Key Commands, depending on a Property Match Stringclassd/b/a "Restricted Access" A GamePiece with the Restricted trait can only be manipulated by the player playing a specific sideclassGamePiece trait that returns a piece to aDrawPileclassThis trait adds a command that sends a piece to another location.classclassclassA Stack is a collection of pieces in the same location that can often be moved with a single drag-and-drop.classA trait that groups menu items of other traits into a sub-menuclassd/b/a "Spreadsheet" A Decorator class that endows a GamePiece with an editable spreadsheet (i.e.classA trait to expose a translated string as a readable/displayable property.classd/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.classMacro Execute a series of Keystrokes against this same piece - Triggered by own KeyCommand or list of keystrokes - Match against an optional Property Filterclassd/b/a "Prototype" This trait is a placeholder for a pre-defined series of traits specified in aPrototypeDefinitionobject.Classes in VASSAL.counters that implement interfaces with type arguments of type GamePieceModifier and TypeClassDescriptionclassSorts 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 StackFields in VASSAL.counters declared as GamePieceModifier and TypeFieldDescriptionprotected GamePiece[]Stack.contentsprotected GamePieceMatCargo.matprotected GamePieceObscurable.obscuredToMeViewprotected GamePieceObscurable.obscuredToOthersViewprotected GamePieceTriggerAction.outerprotected GamePieceDecorator.pieceFields in VASSAL.counters with type parameters of type GamePieceModifier and TypeFieldDescriptionPieceDefiner.availableListprotected static DefaultListModel<GamePiece> PieceDefiner.availableModelprotected ListCellRenderer<? super GamePiece> PieceDefiner.availableRendererAttachment.contentsMat.contentsprotected DefaultListModel<GamePiece> PieceDefiner.inUseModelDeck.nextDrawprotected ListCellRenderer<? super GamePiece> PieceDefiner.rPieceIterator.VISIBLEMethods in VASSAL.counters with type parameters of type GamePieceModifier 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>
PieceIteratorMethods in VASSAL.counters that return GamePieceModifier 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 GamePieceTranslate.findTarget(KeyStroke stroke) Attachment.getAttachedPieceAt(int index) GlobalCommandTarget.getCurPiece()static GamePieceDecorator.getDecorator(GamePiece p, Class<?> type) UsePrototype.getExpandedInner()Build a new GamePiece instance based on the traits in the referencedPrototypeDefinition.Decorator.getInner()static GamePieceDecorator.getInnermost(GamePiece p) MatCargo.getMat()MatHolder.getMatPiece()ReportState.OldAndNewPieceProperties.getNewPiece()static GamePieceDecorator.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 GamePiecePieceDefiner.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.Methods in VASSAL.counters that return types with arguments of type GamePieceModifier 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 strokeMethods in VASSAL.counters with parameters of type GamePieceModifier and TypeMethodDescriptionbooleanDeprecated.booleanbooleanBooleanAndPieceFilter.accept(GamePiece piece, Auditable owner, AuditTrail audit) booleanDeprecated.booleanbooleanBooleanOrPieceFilter.accept(GamePiece piece, Auditable owner, AuditTrail audit) voidGlobalCommand.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.booleanTest if a piece matches the filter.default booleanTest if a piece matches the filter and provide Expression auditing facilitiesdefault booleanPieceFilter.accept(GamePiece piece, Auditable owner, AuditTrail audit) Test if a piece matches the filter and provide Expression auditing facilitiesbooleanvoidvoidAdding a piece to theKeyBuffer"selects the piece" (and lets it know about in its SELECTED property)voidAdds a piece to the stack.voidvoidAdds a piece of cargo to this matstatic voidPieceDefiner.addDefinition(GamePiece definition) Plugins can add additional GamePiece definitionsprotected static voidPieceDefiner.addElement(GamePiece piece) voidKeyBuffer.addFromPalette(GamePiece p, PieceSlot slot) voidTranslate.MoveExecuter.addKeyEventTarget(GamePiece piece) voidprotected voidprotected voidprotected voidprotected voidprotected voidColoredBorder.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.intbooleanbooleanTells if a particular piece is selected (i.e. present in the KeyBuffer)voidHandle a mouse click on the given GamePiece at the given location (where 0,0 is the center of the piece).voidvoidbooleanstatic CommandMatCargo.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 GamePieceDecorator.getDecorator(GamePiece p, Class<?> type) Decorator.getDecorators(GamePiece p, Class<?> type) static GamePieceDecorator.getInnermost(GamePiece p) static EmbellishmentEmbellishment.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 EmbellishmentEmbellishment.getLayerWithMatchingActivateCommand(GamePiece piece, NamedKeyStroke stroke, boolean active) static EmbellishmentEmbellishment0.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 GamePieceDecorator.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 recordedbooleanbooleanprotected voidColoredBorder.highlightSelectionBounds(GamePiece p, Graphics g, int x, int y, Component obs, double zoom) intFinds the index of a piece in the stackvoidInserts a child GamePiece at a given index.voidStack.insertChild(GamePiece child, int index) Adds a GamePiece to this Stack.protected voidPieceDefiner.insertDecorator(int index, GamePiece piece) Insert a Decorator into the list at a given positionprotected voidDeck.insertPieceAt(GamePiece p, int index) Inserts a piece into a specific position into the Deck (counting down from the top)protected voidDeck.insertPieceAt(GamePiece p, int index, boolean suppressDeckCounts) Inserts a piece into a specific position into the Deck (counting down from the top)protected voidStack.insertPieceAt(GamePiece p, int index) Insert a piece at a particular point in the stackprotected voidStack.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 voidReplace.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 TypebooleanDeck.mayContain(GamePiece piece) Does the specified GamePiece meet the rules to be contained in this Deck.protected Commandprotected Commandprotected Commandprotected CommandTranslate.moveTarget(GamePiece target) protected PointSendToLocation.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 CommandDecorator.putOldProperties(GamePiece p) * Set the Oldxxxx properties related to movement (e.g.voidDeprecated, for removal: This API element is subject to removal in a future version.voidvoidDeselect the specified piece -- removes it from theKeyBuffervoidvoidMat.removeCargo(GamePiece p) Removes a MatCargo piece from our list of cargo.voidKeyBuffer.removeFromPalette(GamePiece p, PieceSlot slot) Deselects a palette piece, repainting its palette slotvoidAttachment.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 voidPlaceMarker.selectMarker(GamePiece marker) protected voidReplace.selectMarker(GamePiece marker) voidStack.selectNext(GamePiece c) Finds and selects (in the UI) the next piece in the stack after this onevoidGlobalCommandTarget.setCurPiece(GamePiece curPiece) static CommandDecorator.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 CommandDecorator.setDynamicProperties(List<Parameter> parameters, GamePiece piece, PropertySource source, Auditable owner, AuditTrail auditSoFar) static CommandDecorator.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 valuevoidvoidvoidvoidMark us as being on a specific Mat piecevoidGlobalCommand.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.Method parameters in VASSAL.counters with type arguments of type GamePieceModifier and TypeMethodDescriptionprotected voidGlobalCommand.checkForMatchingAttachments(Attachment attach, String attachmentName, String attachmentId, Set<GamePiece> pieces) voidRemove any cargo on this mat from the supplied allCargo list and add to the MatHolders cargo listvoidvoidAttachment.setContents(List<GamePiece> newContents) Deck.setContents(Collection<GamePiece> c) Set the contents of this Deck to a Collection of GamePiecesvoidDragBuffer.sort(Comparator<GamePiece> comp) voidKeyBuffer.sort(Comparator<GamePiece> comp) Sorts the selected pieces based on a particular ComparatorConstructors in VASSAL.counters with parameters of type GamePieceModifierConstructorDescriptionActionButton(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) Constructor parameters in VASSAL.counters with type arguments of type GamePieceModifierConstructorDescriptionPieceIterator(Iterator<? extends GamePiece> i) PieceIterator(Iterator<? extends GamePiece> i, PieceFilter f) -
Uses of GamePiece in VASSAL.i18n
Subinterfaces of GamePiece in VASSAL.i18nModifier and TypeInterfaceDescriptioninterfaceDecorators that contain localizable elements must implement this interfaceFields in VASSAL.i18n declared as GamePieceModifier and TypeFieldDescriptionprotected GamePieceTranslatableMarker.markerDefinitionprotected GamePiecePieceI18nData.pieceConstructors in VASSAL.i18n with parameters of type GamePieceModifierConstructorDescriptionComponentI18nData(Configurable c, GamePiece piece) Special build for PrototypeDefinition and PieceSlotPieceI18nData(GamePiece piece) -
Uses of GamePiece in VASSAL.script
Methods in VASSAL.script with parameters of type GamePieceModifier and TypeMethodDescriptionBshCommandEncoder.createDecorator(String type, GamePiece inner) -
Uses of GamePiece in VASSAL.script.expression
Methods in VASSAL.script.expression with parameters of type GamePieceModifier and TypeMethodDescriptionbooleanDeprecated.booleanbooleanBeanShellExpression.BshFilter.accept(GamePiece piece, Auditable owner, AuditTrail audit) -
Uses of GamePiece in VASSAL.script.proxy
Methods in VASSAL.script.proxy with parameters of type GamePieceConstructors in VASSAL.script.proxy with parameters of type GamePiece -
Uses of GamePiece in VASSAL.tools.imageop
Methods in VASSAL.tools.imageop that return GamePieceModifier and TypeMethodDescriptionGamePieceOp.getPiece()GamePieceOpImpl.getPiece()Returns the sourceGamePiece.Methods in VASSAL.tools.imageop with parameters of type GamePieceConstructors in VASSAL.tools.imageop with parameters of type GamePieceModifierConstructorDescriptionConstructs anImageOpwhich will produce an image from the givenGamePiece. -
Uses of GamePiece in VASSAL.tools.imports.adc2
Methods in VASSAL.tools.imports.adc2 that return GamePieceModifier and TypeMethodDescriptionprotected GamePieceADC2Module.Piece.getBasicPiece()protected GamePieceADC2Module.Piece.getGamePiece()
GameState.getAllPieces()instead.