Package VASSAL.build.module.properties
Class PropertyChangerConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.build.module.properties.PropertyChangerConfigurer
Configurer instance that allows a module editor to specify a
PropertyChanger, i.e. the way in which a dynamic property will be
updated by a player during a game
- Author:
- rkinney
-
Nested Class Summary
Nested classes/interfaces inherited from class VASSAL.configure.Configurer
Configurer.ContextLevel
-
Field Summary
Modifier and TypeFieldDescriptionprotected JPanel
protected JPanel
protected PropertyChangerConfigurer.Constraints
protected JPanel
protected static final char
protected static final char
protected FormattedExpressionConfigurer
protected static final String
protected JLabel
protected static final char
protected static final String
protected static final char
protected static final String
protected StringConfigurer
protected JLabel
protected static final String
protected TranslatingStringEnumConfigurer
protected JLabel
protected static final Map
<Class<? extends PropertyChanger>, Character> protected static final Map
<Class<? extends PropertyChanger>, String> protected StringArrayConfigurer
protected FormattedExpressionConfigurer
protected JLabel
Fields inherited from class VASSAL.configure.Configurer
changeSupport, context, contextLevel, frozen, hint, key, LIST_ENTRY_HIGHLIGHT_COLOR, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
ConstructorDescriptionPropertyChangerConfigurer
(String key, String name, PropertyChangerConfigurer.Constraints constraints) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFocusListener
(FocusListener listener) Add a FocusListener to the Swing Components that make up this Configurer.GUI interface for setting the option in an editing windowboolean
void
removeFocusListener
(FocusListener listener) Remove a FocusListener from the Swing Components that make up this Configurer.void
setContext
(AbstractBuildable context) Set the Context for this Configurer to the first ancestor that is of type GameModule or Map NOTE: The ContextLevel may already have been preset by the ConfigureFactory when the Configurer was created.void
setHighlighted
(boolean highlighted) Set the highlighted status of this configurer.void
Set the Object value from a Stringprotected void
protected void
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getContext, getContextLevel, getHint, getKey, getName, getScreenSize, getValue, initCustomControls, isFrozen, isHighlighted, isPieceContext, removePropertyChangeListener, repack, repack, requestFocus, setContext, setContext, setContextLevel, setEnabled, setFrozen, setHint, setHintKey, setLabelVisibile, setLabelVisible, setName, setValue
-
Field Details
-
PLAIN_TYPE
- See Also:
-
INCREMENT_TYPE
- See Also:
-
PROMPT_TYPE
- See Also:
-
SELECT_TYPE
- See Also:
-
PLAIN_CODE
protected static final char PLAIN_CODE- See Also:
-
PROMPT_CODE
protected static final char PROMPT_CODE- See Also:
-
ENUM_CODE
protected static final char ENUM_CODE- See Also:
-
INCR_CODE
protected static final char INCR_CODE- See Also:
-
typeToCode
-
typeToDescription
-
descriptionToCode
-
constraints
-
controls
-
typeLabel
-
typeConfig
-
valueLabel
-
valueConfig
-
promptLabel
-
promptConfig
-
incrLabel
-
incrConfig
-
validValuesConfig
-
changerLabelControls
-
changerControls
-
-
Constructor Details
-
PropertyChangerConfigurer
public PropertyChangerConfigurer(String key, String name, PropertyChangerConfigurer.Constraints constraints)
-
-
Method Details
-
getControls
Description copied from class:Configurer
GUI interface for setting the option in an editing window- Specified by:
getControls
in classConfigurer
-
getTypeLabel
-
getTypeControls
-
getChangerLabel
-
getChangerControls
-
getValuesControls
-
updateControls
protected void updateControls() -
updateValue
protected void updateValue() -
getValueString
- Specified by:
getValueString
in classConfigurer
- Returns:
- a String representation of the Object value
-
isEnumType
public boolean isEnumType() -
getPropertyChanger
-
setValue
Description copied from class:Configurer
Set the Object value from a String- Specified by:
setValue
in classConfigurer
-
setHighlighted
public void setHighlighted(boolean highlighted) Description copied from class:Configurer
Set the highlighted status of this configurer. It is up to individual Configurers to override this method and implement a suitable visual highlighting scheme Note: Cannot make this abstract as it will break custom code.- Overrides:
setHighlighted
in classConfigurer
- Parameters:
highlighted
- New Highlighted status
-
addFocusListener
Description copied from class:Configurer
Add a FocusListener to the Swing Components that make up this Configurer.- Overrides:
addFocusListener
in classConfigurer
- Parameters:
listener
- Focus Listener
-
removeFocusListener
Description copied from class:Configurer
Remove a FocusListener from the Swing Components that make up this Configurer.- Overrides:
removeFocusListener
in classConfigurer
- Parameters:
listener
- Focus Listener
-
setContext
Description copied from class:Configurer
Set the Context for this Configurer to the first ancestor that is of type GameModule or Map NOTE: The ContextLevel may already have been preset by the ConfigureFactory when the Configurer was created. Don't let the AutoConfigurer over-write this- Overrides:
setContext
in classConfigurer
- Parameters:
context
- Owning Configurable
-