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
  • Constructor Details

    • TextConfigurer

      public TextConfigurer()
    • TextConfigurer

      public TextConfigurer(String key, String name)
    • TextConfigurer

      public TextConfigurer(String key, String name, String val)
    • TextConfigurer

      public TextConfigurer(String key, String name, String val, boolean wrap)
  • Method Details

    • getConfigurer

      public Configurer getConfigurer(AutoConfigurable c, String key, String name)
      Specified by:
      getConfigurer in interface ConfigurerFactory
    • getValueString

      public String getValueString()
      Specified by:
      getValueString in class Configurer
      Returns:
      a String representation of the Object value
    • setWordWrap

      public void setWordWrap(boolean b)
    • escapeNewlines

      public static String escapeNewlines(String s)
      Encodes a string by replacing newlines with '|' characters
      Parameters:
      s -
      Returns:
    • setValue

      public void setValue(String s)
      Description copied from class: Configurer
      Set the Object value from a String
      Specified by:
      setValue in class Configurer
    • setValue

      public void setValue(Object o)
      Description copied from class: Configurer
      Set the Object value
      Overrides:
      setValue in class Configurer
    • restoreNewlines

      public static String restoreNewlines(String s)
      Restores a string by replacing '|' with newlines
      Parameters:
      s -
      Returns:
    • requestFocus

      public void requestFocus()
      Description copied from class: Configurer
      Move the cursor to the first input field of this Configurer
      Overrides:
      requestFocus in class Configurer
    • getControls

      public Component getControls()
      Description copied from class: Configurer
      GUI interface for setting the option in an editing window
      Specified by:
      getControls in class Configurer