Class StringArrayConfigurer

java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.StringArrayConfigurer
All Implemented Interfaces:
ConfigurableList
Direct Known Subclasses:
FormattedStringArrayConfigurer

public class StringArrayConfigurer extends Configurer implements ConfigurableList
A Configurer that returns an array of Strings
  • Field Details

  • Constructor Details

    • StringArrayConfigurer

      public StringArrayConfigurer(String key, String name, Object val)
    • StringArrayConfigurer

      public StringArrayConfigurer(Object val)
    • StringArrayConfigurer

      public StringArrayConfigurer(String key, String name)
  • Method Details

    • getModel

      @Deprecated(since="2020-11-12", forRemoval=true) public DefaultListModel<String> getModel()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addValue

      @Deprecated(since="2020-11-12", forRemoval=true) public void addValue(String s)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • removeValue

      public void removeValue(String s)
    • 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
    • updateViewable

      @Deprecated(since="2020-11-12", forRemoval=true) public void updateViewable(int rows)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTextComponent

      @Deprecated(since="2020-11-12", forRemoval=true) protected Component getTextComponent()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTextValue

      @Deprecated(since="2020-11-12", forRemoval=true) protected String getTextValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTextValue

      @Deprecated(since="2020-11-12", forRemoval=true) protected void setTextValue(String s)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addTextActionListener

      @Deprecated(since="2020-11-12", forRemoval=true) protected void addTextActionListener(ActionListener a)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getStringArray

      public String[] getStringArray()
    • getValueString

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

      public static String arrayToString(String[] s)
    • setValue

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

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

      public static String[] stringToArray(String s)
    • updateModel

      @Deprecated(since="2020-11-12", forRemoval=true) protected void updateModel()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • buildChildConfigurer

      public Configurer buildChildConfigurer(Object value)
    • moveEntryUp

      public void moveEntryUp()
      Description copied from interface: ConfigurableList
      Move the currently selected list entry up one position The moved entry should retain the selection
      Specified by:
      moveEntryUp in interface ConfigurableList
    • moveEntryDown

      public void moveEntryDown()
      Description copied from interface: ConfigurableList
      Move the currently selected list entry down one position The moved entry should retain the selection
      Specified by:
      moveEntryDown in interface ConfigurableList
    • addEntry

      public void addEntry()
      Description copied from interface: ConfigurableList
      Add a new list entry after the currently selected entry, or at the bottom of the list if no entries selected. The new entry should be selected.
      Specified by:
      addEntry in interface ConfigurableList
    • deleteEntry

      public void deleteEntry(ConfigurableListEntry entry)
      Description copied from interface: ConfigurableList
      Remove the specified entry from the list. The entry following the removed entry should be selected, or the last entry in the list if the deleted entry was last.
      Specified by:
      deleteEntry in interface ConfigurableList
      Parameters:
      entry - Entry to delete.
    • getListController

      public JComponent getListController()
      Description copied from interface: ConfigurableList
      Return the ListController associated with this Configurable List
      Specified by:
      getListController in interface ConfigurableList
      Returns:
      List Controller
    • addFocusListener

      public void addFocusListener(FocusListener listener)
      Description copied from class: Configurer
      Add a FocusListener to the Swing Components that make up this Configurer.
      Overrides:
      addFocusListener in class Configurer
      Parameters:
      listener - Focus Listener
    • removeFocusListener

      public void removeFocusListener(FocusListener listener)
      Description copied from class: Configurer
      Remove a FocusListener from the Swing Components that make up this Configurer.
      Overrides:
      removeFocusListener in class Configurer
      Parameters:
      listener - Focus Listener
    • selectEntry

      public void selectEntry(ConfigurableListEntry entry)
      Description copied from interface: ConfigurableList
      Set the selection to the specified list entry.
      Specified by:
      selectEntry in interface ConfigurableList
      Parameters:
      entry - Entry to select
    • repack

      public void repack()
      Description copied from class: Configurer
      Repack the current configurer
      Specified by:
      repack in interface ConfigurableList
      Overrides:
      repack in class Configurer
    • setSelectedEntryIndex

      public void setSelectedEntryIndex(int index)
      Description copied from interface: ConfigurableList
      Set the currently selected entry
      Specified by:
      setSelectedEntryIndex in interface ConfigurableList
      Parameters:
      index - Index of currently selected entry
    • getSelectedEntryIndex

      public int getSelectedEntryIndex()
      Description copied from interface: ConfigurableList
      Return the index of the currently selected entry
      Specified by:
      getSelectedEntryIndex in interface ConfigurableList
      Returns:
      currently selected entry index
    • entryChanged

      public void entryChanged(ConfigurableListEntry entry)
      Description copied from interface: ConfigurableList
      An entry has had it's value changed
      Specified by:
      entryChanged in interface ConfigurableList
      Parameters:
      entry - Changed Entry
    • setHighlighted

      public void setHighlighted(boolean highlighted)
      Don't do anything special when highlighting, but deslect currently selected entry when unhighlighting
      Overrides:
      setHighlighted in class Configurer
      Parameters:
      highlighted - New Highlighted status
    • getEntries

      public List<VASSAL.configure.StringArrayConfigurer.StringEntry> getEntries()
    • setContext

      public void setContext(AbstractBuildable context)
      Description copied from class: Configurer
      Set the Context for this Configurer to the first ancestor that is of type GameModule or Map NOTE: The ContextLevel may already have been preset by the ConfigureFactory when the Configurer was created. Don't let the AutoConfigurer over-write this
      Overrides:
      setContext in class Configurer
      Parameters:
      context - Owning Configurable