Package VASSAL.configure
Class StringArrayConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.StringArrayConfigurer
- Direct Known Subclasses:
FormattedStringArrayConfigurer
public class StringArrayConfigurer extends Configurer
A Configurer that returns an array of Strings
-
Field Summary
Fields Modifier and Type Field Description protected JList<String>listprotected intmaxRowsprotected intminRowsprotected DefaultListModel<String>modelprotected JPanelpanelprotected JTextFieldtextFieldFields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, hint, key, name, NAME_PROPERTY, noUpdate, value -
Constructor Summary
Constructors Constructor Description StringArrayConfigurer(int minRows, int maxRows)StringArrayConfigurer(Object val)StringArrayConfigurer(Object val, int minRows, int maxRows)StringArrayConfigurer(String key, String name)StringArrayConfigurer(String key, String name, int minRows, int maxRows)StringArrayConfigurer(String key, String name, Object val) -
Method Summary
Modifier and Type Method Description protected voidaddTextActionListener(ActionListener a)voidaddValue(String s)static StringarrayToString(String[] s)ComponentgetControls()GUI interface for setting the option in an editing windowDefaultListModel<String>getModel()String[]getStringArray()protected ComponentgetTextComponent()protected StringgetTextValue()StringgetValueString()static voidmain(String[] args)voidremoveValue(String s)protected voidsetTextValue(String s)voidsetValue(Object o)Set the Object valuevoidsetValue(String s)Set the Object value from a Stringstatic String[]stringToArray(String s)protected voidupdateModel()voidupdateViewable(int rows)Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getHint, getKey, getName, getScreenSize, getValue, isFrozen, removePropertyChangeListener, repack, repack, setFrozen, setHint, setLabelVisibile, setName
-
Field Details
-
panel
-
list
-
model
-
textField
-
minRows
protected int minRows -
maxRows
protected int maxRows
-
-
Constructor Details
-
StringArrayConfigurer
-
StringArrayConfigurer
-
StringArrayConfigurer
-
StringArrayConfigurer
-
StringArrayConfigurer
public StringArrayConfigurer(int minRows, int maxRows) -
StringArrayConfigurer
-
-
Method Details
-
getModel
-
addValue
-
removeValue
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-
updateViewable
public void updateViewable(int rows) -
getTextComponent
-
getTextValue
-
setTextValue
-
addTextActionListener
-
getStringArray
-
getValueString
- Specified by:
getValueStringin classConfigurer- Returns:
- a String representation of the Object value
-
arrayToString
-
setValue
Description copied from class:ConfigurerSet the Object value- Overrides:
setValuein classConfigurer
-
setValue
Description copied from class:ConfigurerSet the Object value from a String- Specified by:
setValuein classConfigurer
-
stringToArray
-
updateModel
protected void updateModel() -
main
-