VASSAL.build
Class AbstractConfigurable

java.lang.Object
  |
  +--VASSAL.build.AbstractBuildable
        |
        +--VASSAL.build.AbstractConfigurable
All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable
Direct Known Subclasses:
AboutScreen, Board, CounterDetailViewer, DiceButton, DieManager, Documentation, GameModule, GlobalOptions, HelpFile, HexGrid, ImageSaver, LOS_Thread, Map, MassKeyCommand, NotesWindow, PrototypesContainer, Region, RegionGrid, RegularGridNumbering, SetupStack, SquareGrid, StackMetrics, SymbolDiceButton, Widget, Zoomer

public abstract class AbstractConfigurable
extends AbstractBuildable
implements AutoConfigurable

An abstract implementation of the Configurable interface. Takes care of most of the Configurable functionality


Inner classes inherited from class VASSAL.build.AutoConfigurable
AutoConfigurable.Util
 
Field Summary
protected  java.beans.PropertyChangeSupport changeSupport
           
protected  Configurer config
           
protected  java.lang.String name
           
 
Fields inherited from class VASSAL.build.AbstractBuildable
buildComponents
 
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
 
Constructor Summary
AbstractConfigurable()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Add a PropertyChangeListener.
abstract  java.lang.String[] getAttributeDescriptions()
          Return an array of Strings describing the attributes of this object.
abstract  java.lang.Class[] getAttributeTypes()
          Return the Class for the attributes of this object.
 VisibilityCondition getAttributeVisibility(java.lang.String name)
          By default, all attributes are visible
 Configurable[] getConfigureComponents()
           
 java.lang.String getConfigureName()
          The name of this Configurable Object
 Configurer getConfigurer()
          The default Configurer of an AbstractConfigurable class is an instance of AutoConfigurer
 void remove(Buildable b)
          Remove a Buildable object from this object
 void setConfigureName(java.lang.String s)
          Sets the name and fires a PropertyChangeEvent
 
Methods inherited from class VASSAL.build.AbstractBuildable
add, build, getAttributeNames, getAttributeValueString, getBuildComponents, getBuildElement, getComponents, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface VASSAL.build.AutoConfigurable
getAttributeNames, getAttributeValueString, setAttribute
 
Methods inherited from interface VASSAL.build.Configurable
getAllowableConfigureComponents, getHelpFile, removeFrom
 
Methods inherited from interface VASSAL.build.Buildable
add, addTo, build, getBuildElement
 

Field Detail

changeSupport

protected java.beans.PropertyChangeSupport changeSupport

name

protected java.lang.String name

config

protected Configurer config
Constructor Detail

AbstractConfigurable

public AbstractConfigurable()
Method Detail

remove

public void remove(Buildable b)
Remove a Buildable object from this object
Specified by:
remove in interface Configurable

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)
Sets the name and fires a PropertyChangeEvent

getAttributeDescriptions

public abstract 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. The order of descriptions should be the same as the order of names in AbstractBuildable.getAttributeNames()
Specified by:
getAttributeDescriptions in interface AutoConfigurable

getAttributeTypes

public abstract java.lang.Class[] getAttributeTypes()
Return the Class for the attributes of this object. Valid classes are: String, Integer, Double, Boolean, Image, Color, and KeyStroke The order of classes should be the same as the order of names in AbstractBuildable.getAttributeNames()
Specified by:
getAttributeTypes in interface AutoConfigurable

getAttributeVisibility

public VisibilityCondition getAttributeVisibility(java.lang.String name)
By default, all attributes are visible
Specified by:
getAttributeVisibility in interface AutoConfigurable
Parameters:
name -  
Returns:
 

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

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

getConfigurer

public Configurer getConfigurer()
The default Configurer of an AbstractConfigurable class is an instance of AutoConfigurer
Specified by:
getConfigurer in interface Configurable