Class ZoneProperty
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.properties.GlobalProperty
VASSAL.build.module.properties.ZoneProperty
- All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable, GameComponent, MutableProperty, PropertyNameSource, PropertySource, CommandEncoder, ValidityChecker, Translatable, Auditable, ImageSearchTarget, SearchTarget, ToolBarComponent
- Author:
- Brent Easton A class implementing a cut-down Global property at the Zone level. Zone Properties do not have Toolbar butttons, but are controlled by SetGlobalProperty traits in counters.
-
Nested Class Summary
Nested classes/interfaces inherited from class GlobalProperty
GlobalProperty.SetGlobalPropertyModifier and TypeClassDescriptionstatic classCommand to pass a new Global property value to other players or into the logfile.Nested classes/interfaces inherited from interface AutoConfigurable
AutoConfigurable.UtilNested classes/interfaces inherited from interface MutableProperty
MutableProperty.Impl, MutableProperty.UtilModifier and TypeInterfaceDescriptionstatic classSimple implementation ofMutablePropertySupport dynamic changing of the property name, provided that theMutableProperty.Impl.addTo(MutablePropertiesContainer)method is used to register this property with a properties container.static class -
Field Summary
FieldsFields inherited from class GlobalProperty
COMMAND_PREFIX, description, DESCRIPTION, format, INITIAL_VALUE, initialValue, MAX_VALUE, maxValue, MIN_VALUE, minValue, NAME, numeric, NUMERIC, numericVisibility, parentContainer, property, propertySource, tempToolbar, wrap, WRAPModifier and TypeFieldDescriptionprotected static final Stringprotected Stringstatic final Stringprotected FormattedStringstatic final Stringprotected Stringstatic final Stringprotected Stringstatic final Stringprotected Stringstatic final Stringprotected booleanstatic final Stringprotected VisibilityConditionprotected MutablePropertiesContainerprotected MutableProperty.Implprotected PropertySourceprotected TemporaryToolBarprotected booleanstatic final StringFields inherited from class AbstractConfigurable
changeSupport, config, localizedName, myI18nData, nameModifier and TypeFieldDescriptionprotected PropertyChangeSupportprotected Configurerprotected Stringprotected ComponentI18nDataprotected StringFields inherited from class AbstractBuildable
buildComponents, validatorFields inherited from interface Configurable
NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class GlobalProperty
addMutablePropertyChangeListener, decode, encode, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getAttributeVisibility, getContainerId, getDescription, getExpressionList, getHelpFile, getLocalizedProperty, getMaxValue, getMenuTextList, getMinValue, getParent, getProperty, getPropertyList, getPropertyValue, getRestoreCommand, getToolBar, isNumeric, isWrap, removeFrom, removeMutablePropertyChangeListener, setAttribute, setPropertyName, setPropertyValue, setupModifier and TypeMethodDescriptionvoidTranslate a String into aCommandTranslate aCommandinto a StringString[]Return an array of Strings describing the attributes of this object.String[]Lists all the buildFile (XML) attribute names for this component.Class<?>[]Return the Class for the attributes of this object.Called by theBuildable.getBuildElement(Document)method to write the attributes into an XML elementgetAttributeVisibility(String name) By default, all attributes are visibleprotected StringReturns a localized translation of the specified property value, if available.intintgetProperty(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.When saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullbooleanbooleanisWrap()voidremoveFrom(Buildable parent) Remove this component from its parentvoidvoidsetAttribute(String key, Object value) Sets a buildFile (XML) attribute value for this component.voidsetPropertyName(String name) setPropertyValue(String newValue) voidsetup(boolean gameStarting) Notify the GameComponent that a game has started/endedMethods inherited from class AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getFormattedStringList, getI18nData, getI18nPrefix, getLocalizedConfigureName, getNamedKeyStrokeList, getTypeName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameModifier and TypeMethodDescriptionvoidSet the owning translatable of this componentvoidAdd a PropertyChangeListener.ConfigureName is used, in particular, by the Editor to track the names of components, and is preferred byUniqueIdManager.protected StringReturns the name of the configurable type for display purposes.voidRemove a Buildable object from this objectvoidprotected voidSets all attributes untranslatable.protected voidsetAttributeTranslatable(String attr, boolean b) Over-ride the default attribute translatability.voidSets the name and fires a PropertyChangeEventMethods inherited from class AbstractBuildable
addImageNamesRecursively, build, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, getPropertyNames, setAncestor, validateModifier and TypeMethodDescriptionvoidAdds all images used by this component AND any subcomponents to the collectionvoidBuild this component by getting all XML attributes of the XML element and callingAbstractBuildable.setAttribute(String, Object)with the String value of the attribute<T> List<T> getAllDescendantComponentsOf(Class<T> target) Recursively descend the build tree and return aListof all components that are instances of the given classDeprecated, for removal: This API element is subject to removal in a future version.getBuildElement(Document doc) <T> Enumeration<T> getComponents(Class<T> target) Deprecated, for removal: This API element is subject to removal in a future version.UseAbstractBuildable.getComponentsOf(Class)instead.<T> List<T> getComponentsOf(Class<T> target) Override this method to provide a list of properties to be exposed for use by expressions in the module.voidsetAncestor(Buildable ancestor) voidvalidate(Buildable target, ValidationReport report) Methods inherited from class AbstractImageFinder
addLocalImageNames, getAllImageNames, getLocalImageNamesModifier and TypeMethodDescriptionvoidClasses extending AbstractImageFinder should override this method in order to add the names of any image files they use to the collection.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Auditable
getComponentName, getComponentTypeNameMethods inherited from interface Buildable
isMandatory, isMovable, isUniqueModifier and TypeMethodDescriptiondefault booleanIs this component a reqired component within its parent?default booleanIs this component allowed to be moved around the Configure Tree?default booleanisUnique()Does this component need to be unique within it's parent?Methods inherited from interface ToolBarComponent
updateToolbarButtonsModifier and TypeMethodDescriptiondefault voidUpdate the text labels in the toolbar's component buttons (for mutable button label support)
-
Field Details
-
parentZone
-
-
Constructor Details
-
ZoneProperty
public ZoneProperty() -
ZoneProperty
-
-
Method Details
-
getConfigureTypeName
-
getAllowableConfigureComponents
- Specified by:
getAllowableConfigureComponentsin interfaceConfigurable- Overrides:
getAllowableConfigureComponentsin classGlobalProperty- Returns:
- a list of valid sub-component Classes. If a Class
appears in this list, then instances of that class may be added
to this component from the Editor's
ConfigureTreewindow by right-clicking on the component and selecting the appropriate "Add" option.
-
getPropertyId
Description copied from class:GlobalPropertyA String that identifies this property in an encoded Command- Overrides:
getPropertyIdin classGlobalProperty- Returns:
- propertyId
-
addTo
Description copied from interface:BuildableAdds this component to its parent. In order to make Buildable objects extensible, the child is responsible for adding itself to the parent. That way, Buildable subcomponents can be defined in an extension package without needing to modify the containing class.- Specified by:
addToin interfaceBuildable- Overrides:
addToin classGlobalProperty- Parameters:
parent- parent Buildable to add this component to as a subcomponent.
-
AbstractBuildable.getBuildables()instead.