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 StringescapeNewlines(String s)Encodes a string by replacing newlines with '|' charactersConfigurergetConfigurer(AutoConfigurable c, String key, String name)ComponentgetControls()GUI interface for setting the option in an editing windowStringgetValueString()static StringrestoreNewlines(String s)Restores a string by replacing '|' with newlinesvoidsetValue(Object o)Set the Object valuevoidsetValue(String s)Set the Object value from a StringvoidsetWordWrap(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:
getConfigurerin interfaceConfigurerFactory
-
getValueString
- Specified by:
getValueStringin 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:ConfigurerSet the Object value from a String- Specified by:
setValuein classConfigurer
-
setValue
Description copied from class:ConfigurerSet the Object value- Overrides:
setValuein classConfigurer
-
restoreNewlines
Restores a string by replacing '|' with newlines- Parameters:
s-- Returns:
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-