Package VASSAL.counters
Class SetGlobalProperty
java.lang.Object
VASSAL.counters.Decorator
VASSAL.counters.DynamicProperty
VASSAL.counters.SetGlobalProperty
- All Implemented Interfaces:
IncrementProperty.Constraints
,PropertyChangerConfigurer.Constraints
,PropertyNameSource
,PropertyPrompt.Constraints
,PropertyPrompt.DialogParent
,PropertySource
,EditablePiece
,GamePiece
,PropertyExporter
,StateMergeable
,TranslatablePiece
,PersistentPropertyContainer
public class SetGlobalProperty extends DynamicProperty
- Author:
- Brent Easton A trait that allows counters to manipulate the value of Global properties. Uses the Property manipulation functionality of DynamicPropert, but applies them to Global Properties.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SetGlobalProperty.Ed
Nested classes/interfaces inherited from class VASSAL.counters.DynamicProperty
DynamicProperty.DynamicKeyCommand, DynamicProperty.DynamicKeyCommandConfigurer
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_ZONE
protected Decorator
dec
protected String
description
static String
ID
static String
NAMED_MAP
static String
NAMED_ZONE
protected PropertyChangeSupport
propertyChangeSupport
protected String
propertyLevel
protected String
searchName
Fields inherited from class VASSAL.counters.DynamicProperty
format, key, keyCommandListConfig, keyCommands, maxValue, menuCommands, minValue, numeric, value, wrap
Fields inherited from interface VASSAL.counters.PropertyExporter
LOCALIZED_NAME
Fields inherited from interface VASSAL.i18n.TranslatablePiece
PREFIX
-
Constructor Summary
Constructors Constructor Description SetGlobalProperty()
SetGlobalProperty(String type, GamePiece p)
-
Method Summary
Modifier and Type Method Description String
getDescription()
A plain-English description of this type of piecePieceEditor
getEditor()
Get the configurer for this traitHelpFile
getHelpFile()
Object
getLocalizedProperty(Object key)
Object
getProperty(Object key)
String
myGetState()
String
myGetType()
Command
myKeyEvent(KeyStroke stroke)
The response of this trait alone to the given KeyStrokevoid
mySetState(String state)
Set just the state of this traitvoid
mySetType(String s)
Set the type information for this piece.void
setProperty(Object key, Object val)
Other properties, possibly game-specific, can be associated with a piece.Methods inherited from class VASSAL.counters.DynamicProperty
boundingBox, decodeConstraints, draw, encodeConstraints, getComponent, getI18nData, getKey, getMaximumValue, getMinimumValue, getName, getPropertyNames, getPropertySource, getShape, getValue, isNumeric, isWrap, myGetKeyCommands, setValue
Methods inherited from class VASSAL.counters.Decorator
getCommandDescription, getDecorator, getI18nData, getI18nData, getId, getInner, getInnermost, getKeyCommands, getLocalizedName, getMap, getOuter, getOutermost, getParent, getPersistentProperty, getPosition, getProperties, getState, getTranslation, getType, isSelected, keyEvent, mergeState, putOldProperties, repack, reportDataError, reportDataError, reportDataError, setId, setInner, setMap, setOldProperties, setOldProperties, setParent, setPersistentProperty, setPosition, 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, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setState
Methods inherited from interface VASSAL.counters.PropertyExporter
getProperties
-
Field Details
-
propertyChangeSupport
-
ID
- See Also:
- Constant Field Values
-
CURRENT_ZONE
- See Also:
- Constant Field Values
-
NAMED_ZONE
- See Also:
- Constant Field Values
-
NAMED_MAP
- See Also:
- Constant Field Values
-
description
-
propertyLevel
-
searchName
-
dec
-
-
Constructor Details
-
SetGlobalProperty
public SetGlobalProperty() -
SetGlobalProperty
-
-
Method Details
-
getDescription
Description copied from interface:EditablePiece
A plain-English description of this type of piece- Specified by:
getDescription
in interfaceEditablePiece
- Overrides:
getDescription
in classDynamicProperty
-
mySetType
Description copied from interface:EditablePiece
Set the type information for this piece. SeeDecorator.myGetType()
- Specified by:
mySetType
in interfaceEditablePiece
- Overrides:
mySetType
in classDynamicProperty
-
myGetType
- Overrides:
myGetType
in classDynamicProperty
- Returns:
- the type of this trait alone
- See Also:
Decorator.getType()
-
myGetState
- Overrides:
myGetState
in classDynamicProperty
- Returns:
- the state of this trait alone
- See Also:
Decorator.getState()
-
mySetState
Description copied from class:Decorator
Set just the state of this trait- Overrides:
mySetState
in classDynamicProperty
- See Also:
Decorator.myGetState()
-
getProperty
- Specified by:
getProperty
in interfaceGamePiece
- Specified by:
getProperty
in interfacePropertySource
- Overrides:
getProperty
in classDynamicProperty
-
getLocalizedProperty
- Specified by:
getLocalizedProperty
in interfacePropertySource
- Overrides:
getLocalizedProperty
in classDynamicProperty
-
setProperty
Description copied from interface:GamePiece
Other properties, possibly game-specific, can be associated with a piece. The properties may or may not need to be encoded in the piece'sGamePiece.getState()
method.- Specified by:
setProperty
in interfaceGamePiece
- Overrides:
setProperty
in classDynamicProperty
-
getHelpFile
- Specified by:
getHelpFile
in interfaceEditablePiece
- Overrides:
getHelpFile
in classDynamicProperty
-
myKeyEvent
Description copied from class:Decorator
The response of this trait alone to the given KeyStroke- Overrides:
myKeyEvent
in classDynamicProperty
- Parameters:
stroke
- Stroke to apply- Returns:
- Generated Command or null if no effect
- See Also:
Decorator.keyEvent(javax.swing.KeyStroke)
-
getEditor
Description copied from interface:EditablePiece
Get the configurer for this trait- Specified by:
getEditor
in interfaceEditablePiece
- Overrides:
getEditor
in classDynamicProperty
-