VASSAL.build
Interface Buildable

All Known Subinterfaces:
AutoConfigurable, Configurable
All Known Implementing Classes:
AbstractBuildable, BasicCommandEncoder, ExtensionElement, Chatter, MenuDisplayer, StackExpander, ForwardToChatter, KeyBufferer, ForwardToKeyBuffer

public interface Buildable

A Buildable instance can be initialized from a configuration file. The configuration file is an XML file in which each XML element represents an object. The Buildable objects are built into an containment hierarchy that mirrors the XML structure.


Method Summary
 void add(Buildable child)
          Adds a child component.
 void addTo(Buildable parent)
          Adds this component to its parent.
 void build(org.w3c.dom.Element e)
          Build the object
 org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
           
 

Method Detail

build

public void build(org.w3c.dom.Element e)
Build the object
Parameters:
e - the XML element containing the object data

addTo

public void addTo(Buildable parent)
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.

add

public void add(Buildable child)
Adds a child component. Both this method and addTo(VASSAL.build.Buildable) are invoked when adding a child to a parent

getBuildElement

public org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
Returns:
an XML element from which this component can be built