Package VASSAL.build.module.properties
Interface PropertySource
- All Known Subinterfaces:
EditablePiece,GamePiece,IncrementProperty.Constraints,PropertyChangerConfigurer.Constraints,PropertyExporter,TranslatablePiece
- All Known Implementing Classes:
ActionButton,AreaOfEffect,BasicModule,BasicPiece,CalculatedProperty,ChangePropertyButton,Clone,CounterGlobalKeyCommand,Deck,Decorator,Delete,Deselect,DrawPile,DynamicProperty,Embellishment,Embellishment0,Footprint,FreeRotator,GameModule,GlobalHotKey,GlobalProperties,GlobalProperty,GlobalTranslatableMessage,GlobalTranslatableMessages,Hideable,Immobilized,Inventory.Counter,Labeler,Map,Marker,MenuSeparator,MovementMarkable,NonRectangular,Obscurable,Pivot,PlaceMarker,PlayerHand,PlaySound,PrivateMap,PropertySheet,Replace,ReportState,RestrictCommands,Restricted,ReturnToDeck,SendToLocation,SetGlobalProperty,Stack,SubMenu,SumProperties,TableInfo,TranslatableMessage,Translate,TriggerAction,UsePrototype,WidgetMap,Zone,ZoneProperty
public interface PropertySource
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 TypeMethodDescriptiongetLocalizedProperty(Object key)Returns 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.
-
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
-