|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--VASSAL.build.AbstractBuildable
Abstract implementation of the Buildable interface To make a Buildable component, extend this class. You'll need to implement the methods and specify the Buildable attributes of this class, and the build process is handled automatically.
| Field Summary | |
protected java.util.Vector |
buildComponents
|
| Constructor Summary | |
AbstractBuildable()
|
|
| Method Summary | |
void |
add(Buildable b)
Add a Buildable object to this object |
void |
build(org.w3c.dom.Element e)
Build this component by getting all XML attributes of the XML element and calling setAttribute(java.lang.String, java.lang.Object) with the String value
of the attribute |
abstract java.lang.String[] |
getAttributeNames()
|
abstract java.lang.String |
getAttributeValueString(java.lang.String key)
Return a String representation of the attribute with the given name. |
java.util.Enumeration |
getBuildComponents()
Returns an enumeration of Buildable objects which are the direct children of this object in the Buildable containment hierarchy. |
org.w3c.dom.Element |
getBuildElement(org.w3c.dom.Document doc)
|
java.util.Enumeration |
getComponents(java.lang.Class target)
|
abstract void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets an attribute value for this component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface VASSAL.build.Buildable |
addTo |
| Field Detail |
protected java.util.Vector buildComponents
| Constructor Detail |
public AbstractBuildable()
| Method Detail |
public void build(org.w3c.dom.Element e)
setAttribute(java.lang.String, java.lang.Object) with the String value
of the attribute
build in interface Buildablee - the XML element containing the object datapublic abstract java.lang.String[] getAttributeNames()
public abstract void setAttribute(java.lang.String key,
java.lang.Object value)
key
parameter will be one of those listed in getAttributeNames().
If the value parameter is a String, it will be the
value returned by getAttributeValueString(java.lang.String) for the same
key. If the implementing class extends
AbstractConfigurable, then value will be
an instance of the corresponding Class listed in
AbstractConfigurable.getAttributeTypes()
key - the name of the attribute. Will be one of those
listed in getAttributeNames()public abstract java.lang.String getAttributeValueString(java.lang.String key)
setAttribute(java.lang.String, java.lang.Object).
key - the name of the attribute. Will be one of those
listed in getAttributeNames()public java.util.Enumeration getComponents(java.lang.Class target)
public org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
getBuildElement in interface Buildablepublic void add(Buildable b)
add in interface Buildablepublic java.util.Enumeration getBuildComponents()
getBuildElement(org.w3c.dom.Document) method uses these objects to construct
the XML element from which this object can be built.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||