Class GeneralScript
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.script.AbstractScript
VASSAL.script.GeneralScript
- All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable, PropertyNameSource, ValidityChecker, Translatable, Auditable, ImageSearchTarget, SearchTarget, UniqueIdManager.Identifyable
public class GeneralScript
extends AbstractScript
implements UniqueIdManager.Identifyable, ValidityChecker
-
Nested Class Summary
Nested classes/interfaces inherited from interface AutoConfigurable
AutoConfigurable.Util -
Field Summary
Fields inherited from class AbstractScript
DESC, NAME, SCRIPTFields 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 TypeMethodDescriptionvoidAdds this component to its parent.protected Stringcompile()evaluate(PropertySource target) static StringgetId()voidremoveFrom(Buildable parent) Remove this component from its parentvoidvoidvalidate(Buildable target, ValidationReport report) Methods inherited from class AbstractScript
getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeTypes, getAttributeValueString, getDescription, getI18nData, getScript, setAttribute, setDescription, setScriptModifier and TypeMethodDescriptionClass<?>[]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 elementvoidsetAttribute(String key, Object value) Sets a buildFile (XML) attribute value for this component.voidsetDescription(String description) voidMethods inherited from class AbstractConfigurable
add, addPropertyChangeListener, getAttributeVisibility, getConfigureComponents, getConfigureName, getExpressionList, getFormattedStringList, getI18nPrefix, getLocalizedConfigureName, getMenuTextList, getNamedKeyStrokeList, getPropertyList, getTypeName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameModifier and TypeMethodDescriptionvoidSet the owning translatable of this componentvoidAdd a PropertyChangeListener.getAttributeVisibility(String name) By default, all attributes are visibleConfigureName 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, setAncestorModifier 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) 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 UniqueIdManager.Identifyable
getConfigureName
-
Constructor Details
-
GeneralScript
public GeneralScript()
-
-
Method Details
-
getConfigureTypeName
-
evaluate
-
getId
- Specified by:
getIdin interfaceUniqueIdManager.Identifyable
-
setId
- Specified by:
setIdin interfaceUniqueIdManager.Identifyable
-
buildHeaderLine
-
getFullScript
-
compile
- Specified by:
compilein classAbstractScript
-
getConfigurer
Description copied from class:AbstractConfigurable- Specified by:
getConfigurerin interfaceConfigurable- Overrides:
getConfigurerin classAbstractConfigurable- Returns:
- Configurer for this component
-
getHelpFile
- Specified by:
getHelpFilein interfaceConfigurable- Returns:
- a HelpFile describing how to use and configure * this component
-
removeFrom
Description copied from interface:ConfigurableRemove this component from its parent- Specified by:
removeFromin interfaceConfigurable
-
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. -
validate
- Specified by:
validatein interfaceValidityChecker- Overrides:
validatein classAbstractBuildable
-
AbstractBuildable.getBuildables()instead.