Class StringEnumConfigurer

java.lang.Object
VASSAL.configure.Configurer
VASSAL.build.module.gamepieceimage.StringEnumConfigurer
Direct Known Subclasses:
SizeConfigurer, SymbolConfigurer

public class StringEnumConfigurer extends Configurer
A Configurer that returns a String from among a list of possible values
  • Field Details

  • Constructor Details

    • StringEnumConfigurer

      public StringEnumConfigurer(String key, String name, String[] validValues)
  • Method Details

    • 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
    • getComboBox

      public JComboBox<String> getComboBox()
    • isValidValue

      public boolean isValidValue(Object o)
    • getValidValues

      public String[] getValidValues()
    • setValidValues

      public void setValidValues(String[] s)
    • setValue

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

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

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

      public static void main(String[] args)