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 StringEncodes a string by replacing newlines with '|' charactersgetConfigurer(AutoConfigurable c, String key, String name) GUI interface for setting the option in an editing windowvoidMove the cursor to the first input field of this Configurerstatic 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, initCustomControls, isFrozen, isHighlighted, removeFocusListener, removePropertyChangeListener, repack, repack, setFrozen, setHighlighted, setHint, setHintKey, setLabelVisibile, setLabelVisible, 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:
-
requestFocus
public void requestFocus()Description copied from class:ConfigurerMove the cursor to the first input field of this Configurer- Overrides:
requestFocusin classConfigurer
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-