VASSAL.build.module
Class PrototypeDefinition
java.lang.Object
|
+--VASSAL.build.module.PrototypeDefinition
- All Implemented Interfaces:
- Buildable, Configurable, UniqueIdManager.Identifyable, ValidityChecker
- public class PrototypeDefinition
- extends java.lang.Object
- implements Configurable, UniqueIdManager.Identifyable, ValidityChecker
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrototypeDefinition
public PrototypeDefinition()
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
- Description copied from interface:
Configurable
- Add a PropertyChangeListener. A PropertyChangeEvent should be fired
with property name
Configurable.NAME_PROPERTY when the value returned from
Configurable.getConfigureName() has changed
- Specified by:
addPropertyChangeListener in interface Configurable
getAllowableConfigureComponents
public java.lang.Class[] getAllowableConfigureComponents()
- Description copied from interface:
Configurable
- Return 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 Configuration Window.
- Specified by:
getAllowableConfigureComponents in interface Configurable
getConfigureComponents
public Configurable[] getConfigureComponents()
- Specified by:
getConfigureComponents in interface Configurable
- Following copied from interface:
VASSAL.build.Configurable
- Returns:
- an array of Configurer objects representing
the Configurable children of this Configurable object
getConfigureName
public java.lang.String getConfigureName()
- Description copied from interface:
Configurable
- The name of this Configurable Object
- Specified by:
getConfigureName in interface Configurable
setConfigureName
public void setConfigureName(java.lang.String s)
getConfigurer
public Configurer getConfigurer()
- Description copied from interface:
Configurable
- Return a
Configurer object which can be used to set the
attributes of this object
- Specified by:
getConfigurer in interface Configurable
getHelpFile
public HelpFile getHelpFile()
- Specified by:
getHelpFile in interface Configurable
- Following copied from interface:
VASSAL.build.Configurable
- Returns:
- a HelpFilte describing how to use and configure
this component
remove
public void remove(Buildable child)
- Description copied from interface:
Configurable
- Remove a child component
- Specified by:
remove in interface Configurable
removeFrom
public void removeFrom(Buildable parent)
- Description copied from interface:
Configurable
- Remove this component from its parent
- Specified by:
removeFrom in interface Configurable
add
public void add(Buildable child)
- Description copied from interface:
Buildable
- Adds a child component. Both this method and
Buildable.addTo(VASSAL.build.Buildable) are
invoked when adding a child to a parent
- Specified by:
add in interface Buildable
getId
public java.lang.String getId()
- Specified by:
getId in interface UniqueIdManager.Identifyable
setId
public void setId(java.lang.String id)
- Specified by:
setId in interface UniqueIdManager.Identifyable
validate
public void validate(Buildable target,
ValidationReport report)
- Specified by:
validate in interface ValidityChecker
addTo
public void addTo(Buildable parent)
- Description copied from interface:
Buildable
- Adds this component to its parent.
In order to make Buildable objects extensible, the child
is reponsible 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:
addTo in interface Buildable
getPiece
public GamePiece getPiece()
setPiece
public void setPiece(GamePiece p)
build
public void build(org.w3c.dom.Element e)
- Description copied from interface:
Buildable
- Build the object
- Specified by:
build in interface Buildable
- Following copied from interface:
VASSAL.build.Buildable
- Parameters:
e - the XML element containing the object data
getBuildElement
public org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
- Specified by:
getBuildElement in interface Buildable
- Following copied from interface:
VASSAL.build.Buildable
- Returns:
- an XML element from which
this component can be built
getConfigureTypeName
public static java.lang.String getConfigureTypeName()