Interface PropertySource
- All Superinterfaces:
Auditable
- All Known Subinterfaces:
EditablePiece
,GamePiece
,IncrementProperty.Constraints
,PropertyChangerConfigurer.Constraints
,PropertyExporter
,TranslatablePiece
- All Known Implementing Classes:
AbstractScenarioProperty
,ActionButton
,AreaOfEffect
,Attachment
,BasicModule
,BasicName
,BasicPiece
,BooleanScenarioProperty
,BorderOutline
,CalculatedProperty
,ChangePropertyButton
,Clone
,Comment
,CounterGlobalKeyCommand
,Deck
,Decorator
,Delete
,Deselect
,DrawPile
,DynamicProperty
,Embellishment
,Embellishment0
,Footprint
,FreeRotator
,GameModule
,GlobalHotKey
,GlobalProperties
,GlobalProperty
,GlobalTranslatableMessage
,GlobalTranslatableMessages
,Hideable
,Immobilized
,Inventory.Counter
,Labeler
,ListScenarioProperty
,Map
,Marker
,Mat
,MatCargo
,MenuSeparator
,MovementMarkable
,MultiLocationCommand
,NonRectangular
,NumberScenarioProperty
,Obscurable
,Pivot
,PlaceMarker
,PlayerHand
,PlaySound
,PrivateMap
,PropertySheet
,Replace
,ReportState
,ReportState.OldAndNewPieceProperties
,RestrictCommands
,Restricted
,ReturnToDeck
,SendToLocation
,SetGlobalProperty
,SetPieceProperty
,Stack
,StringScenarioProperty
,SubMenu
,SumProperties
,TableInfo
,TranslatableMessage
,Translate
,TriggerAction
,UsePrototype
,WidgetMap
,Zone
,ZoneProperty
A PropertySource provides an interface to read properties (values), usually game- or UI-related, from various
game objects.
GamePiece
is the "OG" of PropertySources, but all of the objects which provide
containers for Global Properties (e.g. Zones, Maps, and GameModule) implement it as well.-
Method Summary
Modifier and TypeMethodDescriptionReturns a localized translation of the specified property value, if available.getProperty
(Object key) When using this interface a piece's own properties are preferred to those of "Global Properties", and those in turn are searched Zone-first then Map, then Module.Methods inherited from interface VASSAL.script.expression.Auditable
getComponentName, getComponentTypeName
-
Method Details
-
getProperty
When using this interface a piece's own properties are preferred to those of "Global Properties", and those in turn are searched Zone-first then Map, then Module.- Parameters:
key
- String key of property to be returned- Returns:
- Object containing value of the specified property
-
getLocalizedProperty
Returns a localized translation of the specified property value, if available. Otherwise returns the non-localized version.- Parameters:
key
- String key of property to be returned- Returns:
- Object containing localized text of the specified property, if available, otherwise non-localized value
-