Package VASSAL.configure
Class Configurer
java.lang.Object
VASSAL.configure.Configurer
- Direct Known Subclasses:
AddressBookServerConfigurer
,AutoConfigurer
,BooleanConfigurer
,ColorConfigurer
,ColorSwatchConfigurer
,DynamicProperty.DynamicKeyCommandConfigurer
,FileConfigurer
,FontConfigurer
,FontConfigurer
,FontStyleConfigurer
,HotKeyConfigurer
,IconConfigurer
,InstanceConfigurer
,JavaNameConfigurer
,KeyModifiersConfigurer
,KeyStrokeArrayConfigurer
,LayoutConfigurer
,ListConfigurer
,LocaleConfigurer
,MassKeyCommand.DeckPolicyConfig
,NamedHotKeyConfigurer
,NamedKeyStrokeArrayConfigurer
,NewColorConfigurer
,PieceAccessConfigurer
,PositionOption
,PropertyChangerConfigurer
,PrototypeDefinition.Config
,ServerConfigurer
,SimpleConfigurer
,SoundConfigurer
,StringArrayConfigurer
,StringConfigurer
,StringEnumConfigurer
,StringEnumConfigurer
,TableConfigurer
,TextConfigurer
,ToggleablePasswordConfigurer
,Zone.Editor
,ZoneHighlight.PercentageConfigurer
,Zoomer.LevelConfigurer
public abstract class Configurer extends Object
A property editor class. Wraps an Object value and provides
methods for saving and restoring the Object from a String. Also
includes a
Component
that can be placed into a
property editing window, allowing the user to change the value
interactively.-
Field Summary
Fields Modifier and Type Field Description protected PropertyChangeSupport
changeSupport
protected boolean
frozen
When frozen is true, setting the value programmatically will not result in a PropertyChangeEvent being firedprotected String
key
A String the uniquely identifies this propertyprotected String
name
A String that provides a short description of the property to the userstatic String
NAME_PROPERTY
protected boolean
noUpdate
When noUpdate is true, setting the value programmatically will not result in an update of the GUI Componentprotected Object
value
The value -
Constructor Summary
Constructors Constructor Description Configurer(String key, String name)
Configurer(String key, String name, Object val)
-
Method Summary
Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener l)
Add a listener to be notified when the Object state changesvoid
fireUpdate()
Fire a PropertyChangeEvent as if the value had been set from nullabstract Component
getControls()
GUI interface for setting the option in an editing windowString
getKey()
Unique identifierString
getName()
Plain English description of the ObjectObject
getValue()
The Object value May be null if the Object has not been initializedabstract String
getValueString()
boolean
isFrozen()
void
removePropertyChangeListener(PropertyChangeListener l)
void
setFrozen(boolean val)
If true, then don't fire PropertyChangeEvents when the value is resetvoid
setName(String s)
void
setValue(Object o)
Set the Object valueabstract void
setValue(String s)
Set the Object value from a String
-
Field Details
-
NAME_PROPERTY
- See Also:
- Constant Field Values
-
key
A String the uniquely identifies this property -
name
A String that provides a short description of the property to the user -
value
The value -
changeSupport
-
noUpdate
protected boolean noUpdateWhen noUpdate is true, setting the value programmatically will not result in an update of the GUI Component -
frozen
protected boolean frozenWhen frozen is true, setting the value programmatically will not result in a PropertyChangeEvent being fired
-
-
Constructor Details
-
Configurer
-
Configurer
-
-
Method Details
-
getKey
Unique identifier -
getName
Plain English description of the Object -
setName
-
getValue
The Object value May be null if the Object has not been initialized -
getValueString
- Returns:
- a String representation of the Object value
-
setValue
Set the Object value -
setFrozen
public void setFrozen(boolean val)If true, then don't fire PropertyChangeEvents when the value is reset -
isFrozen
public boolean isFrozen() -
fireUpdate
public void fireUpdate()Fire a PropertyChangeEvent as if the value had been set from null -
setValue
Set the Object value from a String -
getControls
GUI interface for setting the option in an editing window -
addPropertyChangeListener
Add a listener to be notified when the Object state changes -
removePropertyChangeListener
-