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
ConstructorsConstructorDescriptionTextConfigurer(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 StringescapeNewlines(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 StringRestores a string by replacing '|' with newlinesvoidSet the Object valuevoidSet the Object value from a StringvoidsetWordWrap(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:
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
-