Class StringScenarioProperty
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.properties.GlobalProperty
VASSAL.build.module.properties.AbstractScenarioProperty
VASSAL.build.module.properties.StringScenarioProperty
- All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable, GameComponent, MutableProperty, PropertyNameSource, PropertySource, CommandEncoder, ValidityChecker, Translatable, Auditable, ImageSearchTarget, SearchTarget, ToolBarComponent
-
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
Fields inherited from class AbstractScenarioProperty
hotkey, HOTKEY, SWITCH, switchPosition, tabModifier and TypeFieldDescriptionprotected NamedKeyStrokestatic final Stringstatic final Stringprotected booleanprotected ScenarioPropertiesOptionTabThe Tab to which this Scenario Property belongsFields 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
Modifier and TypeMethodDescriptionstatic StringClass<?> voidsetAttribute(String key, Object value) Sets a buildFile (XML) attribute value for this component.Methods inherited from class AbstractScenarioProperty
addTo, getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getExpressionList, getHelpFile, getHotkey, isSwitchPosition, processOptionChange, setHotkeyModifier and TypeMethodDescriptionvoidAdds this component to its parent.Class<?>[]String[]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 elementbooleanvoidprocessOptionChange(Object newValue) voidsetHotkey(NamedKeyStroke hotkey) Methods inherited from class GlobalProperty
addMutablePropertyChangeListener, decode, encode, getAttributeVisibility, getContainerId, getDescription, getLocalizedProperty, getMaxValue, getMenuTextList, getMinValue, getParent, getProperty, getPropertyId, getPropertyList, getPropertyValue, getRestoreCommand, getToolBar, isNumeric, isWrap, removeFrom, removeMutablePropertyChangeListener, setPropertyName, setPropertyValue, setupModifier and TypeMethodDescriptionvoidTranslate a String into aCommandTranslate aCommandinto a StringgetAttributeVisibility(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.protected StringA String that identifies this property in an encoded CommandWhen 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 parentvoidvoidsetPropertyName(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)
-
Constructor Details
-
StringScenarioProperty
public StringScenarioProperty()
-
-
Method Details
-
getConfigureTypeName
-
setAttribute
Description copied from class:AbstractBuildableSets a buildFile (XML) attribute value for this component. Thekeyparameter will be one of those listed inAbstractBuildable.getAttributeNames(). If thevalueparameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(String)for the samekey. If the implementing class extendsAbstractConfigurable, thenvaluewill be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()- Specified by:
setAttributein interfaceAutoConfigurable- Specified by:
setAttributein interfaceTranslatable- Overrides:
setAttributein classAbstractScenarioProperty- Parameters:
key- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()value- If thevalueparameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(String)for the samekey. If the implementing class extendsAbstractConfigurable, thenvaluecan also be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
-
getInitialValueClass
- Specified by:
getInitialValueClassin classAbstractScenarioProperty
-
getOptionConfigurer
- Specified by:
getOptionConfigurerin classAbstractScenarioProperty
-
AbstractBuildable.getBuildables()instead.