Package VASSAL.counters
Class Replace
java.lang.Object
VASSAL.counters.Decorator
VASSAL.counters.PlaceMarker
VASSAL.counters.Replace
- All Implemented Interfaces:
PropertyNameSource
,PropertySource
,EditablePiece
,GamePiece
,PropertyExporter
,StateMergeable
,TranslatablePiece
,PersistentPropertyContainer
public class Replace extends PlaceMarker
GamePiece trait that replaces a GamePiece with another one
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Replace.Ed
-
Field Summary
Fields inherited from class VASSAL.counters.PlaceMarker
above, ABOVE, afterBurnerKey, BELOW, command, commands, description, gpId, gpidSupport, key, markerSpec, markerText, matchRotation, newGpId, placement, STACK_BOTTOM, STACK_TOP, xOffset, yOffset
Fields inherited from interface VASSAL.counters.PropertyExporter
LOCALIZED_NAME
Fields inherited from interface VASSAL.i18n.TranslatablePiece
PREFIX
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description GamePiece
createMarker()
The marker, with prototypes fully expandedString
getDescription()
A plain-English description of this type of piecePieceEditor
getEditor()
Get the configurer for this traitHelpFile
getHelpFile()
PieceI18nData
getI18nData()
Return I18n data for this pieceprotected void
matchTraits(GamePiece base, GamePiece marker)
String
myGetType()
Command
myKeyEvent(KeyStroke stroke)
The response of this trait alone to the given KeyStrokeprotected Command
replacePiece()
protected void
selectMarker(GamePiece marker)
Methods inherited from class VASSAL.counters.PlaceMarker
boundingBox, createBaseMarker, draw, getGpId, getName, getShape, isMarkerStandalone, myGetKeyCommands, myGetState, mySetState, mySetType, placeMarker, setGpId, updateGpId, updateGpId
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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface VASSAL.counters.GamePiece
getId, getLocalizedName, getMap, getParent, getPosition, getProperty, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setProperty, setState
Methods inherited from interface VASSAL.counters.PropertyExporter
getProperties
Methods inherited from interface VASSAL.build.module.properties.PropertySource
getLocalizedProperty
-
Field Details
-
ID
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Replace
public Replace() -
Replace
-
-
Method Details
-
myKeyEvent
Description copied from class:Decorator
The response of this trait alone to the given KeyStroke- Overrides:
myKeyEvent
in classPlaceMarker
- Parameters:
stroke
- Stroke to apply- Returns:
- Generated Command or null if no effect
- See Also:
Decorator.keyEvent(javax.swing.KeyStroke)
-
replacePiece
-
selectMarker
- Overrides:
selectMarker
in classPlaceMarker
-
getDescription
Description copied from interface:EditablePiece
A plain-English description of this type of piece- Specified by:
getDescription
in interfaceEditablePiece
- Overrides:
getDescription
in classPlaceMarker
-
getHelpFile
- Specified by:
getHelpFile
in interfaceEditablePiece
- Overrides:
getHelpFile
in classPlaceMarker
-
myGetType
- Overrides:
myGetType
in classPlaceMarker
- Returns:
- the type of this trait alone
- See Also:
Decorator.getType()
-
getEditor
Description copied from interface:EditablePiece
Get the configurer for this trait- Specified by:
getEditor
in interfaceEditablePiece
- Overrides:
getEditor
in classPlaceMarker
-
createMarker
Description copied from class:PlaceMarker
The marker, with prototypes fully expanded- Overrides:
createMarker
in classPlaceMarker
- Returns:
- new Marker
-
matchTraits
-
getI18nData
Description copied from class:Decorator
Return I18n data for this piece- Specified by:
getI18nData
in interfaceTranslatablePiece
- Overrides:
getI18nData
in classPlaceMarker
- Returns:
- I18n data
-