Package VASSAL.configure
Class TextConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.TextConfigurer
- All Implemented Interfaces:
ConfigurerFactory
A Configurer that allows multi-line string input via a JTextArea
-
Field Summary
Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, hint, key, LIST_ENTRY_HIGHLIGHT_COLOR, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
ConstructorDescriptionTextConfigurer(String key, String name)
TextConfigurer(String key, String name, String val)
TextConfigurer(String key, String name, String val, boolean wrap)
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
escapeNewlines(String s)
Encodes a string by replacing newlines with '|' charactersgetConfigurer(AutoConfigurable c, String key, String name)
GUI interface for setting the option in an editing windowstatic String
Restores a string by replacing '|' with newlinesvoid
Set the Object valuevoid
Set the Object value from a Stringvoid
setWordWrap(boolean b)
Methods inherited from class VASSAL.configure.Configurer
addFocusListener, addPropertyChangeListener, fireUpdate, getHint, getKey, getName, getScreenSize, getValue, isFrozen, isHighlighted, removeFocusListener, removePropertyChangeListener, repack, repack, requestFocus, setFrozen, setHighlighted, setHint, setHintKey, setLabelVisibile, setName
-
Constructor Details
-
TextConfigurer
public TextConfigurer() -
TextConfigurer
-
TextConfigurer
-
TextConfigurer
-
-
Method Details
-
getConfigurer
- Specified by:
getConfigurer
in interfaceConfigurerFactory
-
getValueString
- Specified by:
getValueString
in classConfigurer
- Returns:
- a String representation of the Object value
-
setWordWrap
public void setWordWrap(boolean b) -
escapeNewlines
Encodes a string by replacing newlines with '|' characters- Parameters:
s
-- Returns:
-
setValue
Description copied from class:Configurer
Set the Object value from a String- Specified by:
setValue
in classConfigurer
-
setValue
Description copied from class:Configurer
Set the Object value- Overrides:
setValue
in classConfigurer
-
restoreNewlines
Restores a string by replacing '|' with newlines- Parameters:
s
-- Returns:
-
getControls
Description copied from class:Configurer
GUI interface for setting the option in an editing window- Specified by:
getControls
in classConfigurer
-