Package VASSAL.configure
Class AutoConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.AutoConfigurer
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
- Direct Known Subclasses:
BrowserHelpFile.MyConfigurer
public class AutoConfigurer extends Configurer implements PropertyChangeListener
A Configurer for configuring Configurable components
(Is that as redundant as it sounds?)
Automatically builds a property editor with controls for setting all
of the attributes of the target Configurable component
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,VisibilityCondition>
conditions
protected List<Configurer>
configurers
protected JPanel
p
protected AutoConfigurable
target
Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
Constructors Constructor Description AutoConfigurer(AutoConfigurable c)
-
Method Summary
Modifier and Type Method Description protected void
checkVisibility()
static Configurer
createConfigurer(Class<?> type, String key, String prompt, AutoConfigurable target)
Configurer
getConfigurer(String attribute)
Component
getControls()
GUI interface for setting the option in an editing windowString
getValueString()
void
propertyChange(PropertyChangeEvent evt)
void
reset()
void
setValue(String s)
Set the Object value from a Stringvoid
setVisibility(String attribute, VisibilityCondition c)
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, removePropertyChangeListener, setFrozen, setName, setValue
-
Field Details
-
p
-
target
-
configurers
-
conditions
-
-
Constructor Details
-
AutoConfigurer
-
-
Method Details
-
createConfigurer
public static Configurer createConfigurer(Class<?> type, String key, String prompt, AutoConfigurable target) -
reset
public void reset() -
getValueString
- Specified by:
getValueString
in classConfigurer
- Returns:
- a String representation of the Object value
-
setValue
Description copied from class:Configurer
Set the Object value from a String- Specified by:
setValue
in classConfigurer
-
getControls
Description copied from class:Configurer
GUI interface for setting the option in an editing window- Specified by:
getControls
in classConfigurer
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
setVisibility
-
checkVisibility
protected void checkVisibility() -
getConfigurer
-