VASSAL.build
Interface AutoConfigurable

All Superinterfaces:
Buildable, Configurable
All Known Implementing Classes:
AbstractConfigurable, GlobalMap

public interface AutoConfigurable
extends Configurable

A class that implements AutoConfigurable can use the AutoConfigurer class to automatically build a property editor.


Nested Class Summary
static class AutoConfigurable.Util
           
 
Field Summary
 
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
 
Method Summary
 java.lang.String[] getAttributeDescriptions()
          Return an array of Strings describing the attributes of this object.
 java.lang.String[] getAttributeNames()
           
 java.lang.Class[] getAttributeTypes()
          Return the Class for the attributes of this object.
 java.lang.String getAttributeValueString(java.lang.String key)
          Called by the Buildable.getBuildElement(org.w3c.dom.Document) method to write the attributes into an XML element
 VisibilityCondition getAttributeVisibility(java.lang.String name)
          Because attributes are not always applicable in all cases, this method returns an interface to determine when the controls for specifying the named attribute should be visible.
 void setAttribute(java.lang.String key, java.lang.Object value)
          Called by the Buildable.build(org.w3c.dom.Element) method, where value is the String value read by the XML attribute.
 
Methods inherited from interface VASSAL.build.Configurable
addPropertyChangeListener, getAllowableConfigureComponents, getConfigureComponents, getConfigureName, getConfigurer, getHelpFile, remove, removeFrom
 
Methods inherited from interface VASSAL.build.Buildable
add, addTo, build, getBuildElement
 

Method Detail

getAttributeNames

public java.lang.String[] getAttributeNames()
Returns:
an array of Strings giving all attributes of this Buildable component that will be written to/read from an XML element

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Called by the Buildable.build(org.w3c.dom.Element) method, where value is the String value read by the XML attribute. Can also be called with Object value to set the attribute.


getAttributeValueString

public java.lang.String getAttributeValueString(java.lang.String key)
Called by the Buildable.getBuildElement(org.w3c.dom.Document) method to write the attributes into an XML element


getAttributeDescriptions

public java.lang.String[] getAttributeDescriptions()
Return an array of Strings describing the attributes of this object. These strings are used as prompts in the Properties window for this object.


getAttributeTypes

public java.lang.Class[] getAttributeTypes()
Return the Class for the attributes of this object. Valid classes are: String, Integer, Double, Boolean, Image, File, Color, and KeyStroke


getAttributeVisibility

public VisibilityCondition getAttributeVisibility(java.lang.String name)
Because attributes are not always applicable in all cases, this method returns an interface to determine when the controls for specifying the named attribute should be visible.

Parameters:
name -
Returns:
null if the attribute controls should always be visible;