Package VASSAL.configure
Class TextConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.TextConfigurer
- All Implemented Interfaces:
ConfigurerFactory
public class TextConfigurer extends Configurer implements ConfigurerFactory
A Configurer that allows multi-line string input via a JTextArea
-
Field Summary
Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
Constructors Constructor Description TextConfigurer()
TextConfigurer(String key, String name)
TextConfigurer(String key, String name, String val)
TextConfigurer(String key, String name, String val, boolean wrap)
-
Method Summary
Modifier and Type Method Description static String
escapeNewlines(String s)
Encodes a string by replacing newlines with '|' charactersConfigurer
getConfigurer(AutoConfigurable c, String key, String name)
Component
getControls()
GUI interface for setting the option in an editing windowString
getValueString()
static String
restoreNewlines(String s)
Restores a string by replacing '|' with newlinesvoid
setValue(Object o)
Set the Object valuevoid
setValue(String s)
Set the Object value from a Stringvoid
setWordWrap(boolean b)
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, removePropertyChangeListener, setFrozen, 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
-