Package VASSAL.counters
Class SendToLocation
java.lang.Object
VASSAL.counters.Decorator
VASSAL.counters.SendToLocation
- All Implemented Interfaces:
PropertyNameSource,PropertySource,EditablePiece,GamePiece,PropertyExporter,StateMergeable,TranslatablePiece,PersistentPropertyContainer
public class SendToLocation extends Decorator implements TranslatablePiece
This trait adds a command that sends a piece to another location. Options for the
target location are:
Specified x,y co-ords on a named map/board
The centre of a named Zone on a named map
A named Region on a named map
The location of another counter selected by a Property Match String
A specified grid-location on a given board & map
Once the target location is identified, it can be further offset in the X and Y directions by a set of multipliers. All Input Fields may use $...$ variable names
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSendToLocation.Ed -
Field Summary
Fields inherited from interface VASSAL.counters.PropertyExporter
LOCALIZED_NAMEFields inherited from interface VASSAL.i18n.TranslatablePiece
PREFIX -
Constructor Summary
Constructors Constructor Description SendToLocation()SendToLocation(String type, GamePiece inner) -
Method Summary
Modifier and Type Method Description RectangleboundingBox()The area which this GamePiece occupies when drawn at the point (0,0)voiddraw(Graphics g, int x, int y, Component obs, double zoom)Draw this GamePieceStringgetDescription()A plain-English description of this type of piecePieceEditorgetEditor()Get the configurer for this traitHelpFilegetHelpFile()PieceI18nDatagetI18nData()Return I18n data for this pieceStringgetName()The plain English name for this pieceShapegetShape()The shape of the piece from the user's viewpoint.protected KeyCommand[]myGetKeyCommands()StringmyGetState()StringmyGetType()CommandmyKeyEvent(KeyStroke stroke)The response of this trait alone to the given KeyStrokevoidmySetState(String newState)Set just the state of this traitvoidmySetType(String type)Set the type information for this piece.protected PointoffsetDestination(int x, int y, GamePiece outer)Methods inherited from class VASSAL.counters.Decorator
getCommandDescription, getDecorator, getI18nData, getI18nData, getId, getInner, getInnermost, getKeyCommands, getLocalizedName, getLocalizedProperty, getMap, getOuter, getOutermost, getParent, getPersistentProperty, getPosition, getProperties, getProperty, getPropertyNames, getState, getTranslation, getType, isSelected, keyEvent, mergeState, putOldProperties, repack, reportDataError, reportDataError, reportDataError, setId, setInner, setMap, setOldProperties, setOldProperties, setParent, setPersistentProperty, setPosition, setProperty, setSelected, setState, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface VASSAL.counters.GamePiece
getId, getLocalizedName, getMap, getParent, getPosition, getProperty, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setProperty, setStateMethods inherited from interface VASSAL.counters.PropertyExporter
getPropertiesMethods inherited from interface VASSAL.build.module.properties.PropertySource
getLocalizedProperty
-
Field Details
-
ID
- See Also:
- Constant Field Values
-
BACK_MAP
- See Also:
- Constant Field Values
-
BACK_POINT
- See Also:
- Constant Field Values
-
DEST_GRIDLOCATION
- See Also:
- Constant Field Values
-
DEST_LOCATION
- See Also:
- Constant Field Values
-
DEST_ZONE
- See Also:
- Constant Field Values
-
DEST_REGION
- See Also:
- Constant Field Values
-
DEST_COUNTER
- See Also:
- Constant Field Values
-
DEST_OPTIONS
-
command
-
commandName
-
backCommandName
-
key
-
backKey
-
mapId
-
boardName
-
x
-
xIndex
-
xOffset
-
y
-
yIndex
-
yOffset
-
gridLocation
-
sendCommand
-
backCommand
-
description
-
destination
-
zone
-
region
-
propertyFilter
-
-
Constructor Details
-
SendToLocation
public SendToLocation() -
SendToLocation
-
-
Method Details
-
mySetType
Description copied from interface:EditablePieceSet the type information for this piece. SeeDecorator.myGetType()- Specified by:
mySetTypein interfaceEditablePiece
-
myGetType
- Specified by:
myGetTypein classDecorator- Returns:
- the type of this trait alone
- See Also:
Decorator.getType()
-
myGetKeyCommands
- Specified by:
myGetKeyCommandsin classDecorator- Returns:
- the commands for this trait alone
- See Also:
Decorator.getKeyCommands()
-
myGetState
- Specified by:
myGetStatein classDecorator- Returns:
- the state of this trait alone
- See Also:
Decorator.getState()
-
myKeyEvent
Description copied from class:DecoratorThe response of this trait alone to the given KeyStroke- Specified by:
myKeyEventin classDecorator- Parameters:
stroke- Stroke to apply- Returns:
- Generated Command or null if no effect
- See Also:
Decorator.keyEvent(javax.swing.KeyStroke)
-
offsetDestination
-
mySetState
Description copied from class:DecoratorSet just the state of this trait- Specified by:
mySetStatein classDecorator- See Also:
Decorator.myGetState()
-
boundingBox
Description copied from interface:GamePieceThe area which this GamePiece occupies when drawn at the point (0,0)- Specified by:
boundingBoxin interfaceGamePiece
-
draw
Description copied from interface:GamePieceDraw this GamePiece -
getName
Description copied from interface:GamePieceThe plain English name for this piece -
getShape
Description copied from interface:GamePieceThe shape of the piece from the user's viewpoint. This defines the area in which the user must click to select or move the piece, for example. LikeGamePiece.boundingBox(), it assumes the position is (0,0) and must be translated to the actual location where the piece is being drawn. -
getEditor
Description copied from interface:EditablePieceGet the configurer for this trait- Specified by:
getEditorin interfaceEditablePiece- Overrides:
getEditorin classDecorator
-
getDescription
Description copied from interface:EditablePieceA plain-English description of this type of piece- Specified by:
getDescriptionin interfaceEditablePiece
-
getHelpFile
- Specified by:
getHelpFilein interfaceEditablePiece
-
getI18nData
Description copied from class:DecoratorReturn I18n data for this piece- Specified by:
getI18nDatain interfaceTranslatablePiece- Overrides:
getI18nDatain classDecorator- Returns:
- I18n data
-