Class StringArrayConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.StringArrayConfigurer
- All Implemented Interfaces:
ConfigurableList
- Direct Known Subclasses:
FormattedStringArrayConfigurer
A Configurer that returns an array of Strings
-
Nested Class Summary
Nested classes/interfaces inherited from class Configurer
Configurer.ContextLevelModifier and TypeClassDescriptionstatic enumThe ContextLevel of a Configurer defines the level that it is defined at. -
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.protected intDeprecated, for removal: This API element is subject to removal in a future version.protected intDeprecated, for removal: This API element is subject to removal in a future version.protected DefaultListModel<String> Deprecated, for removal: This API element is subject to removal in a future version.protected JPanelprotected JTextFieldDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class Configurer
changeSupport, context, contextLevel, frozen, hint, key, LIST_ENTRY_HIGHLIGHT_COLOR, name, NAME_PROPERTY, noUpdate, valueModifier and TypeFieldDescriptionprotected PropertyChangeSupportprotected AbstractBuildableprotected Configurer.ContextLevelprotected booleanWhen frozen is true, setting the value programmatically will not result in a PropertyChangeEvent being firedprotected StringA Hint to be displayed in an empty fieldprotected StringA String the uniquely identifies this propertystatic final ColorDefault Highlight Color for Configurable Listsprotected StringA String that provides a short description of the property to the userstatic final Stringprotected booleanWhen noUpdate is true, setting the value programmatically will not result in an update of the GUI Componentprotected ObjectThe valueFields inherited from interface ConfigurableList
DEFAULT_ICON_SIZEModifier and TypeFieldDescriptionstatic final intThe Default Icon Size to use for all Configurable List related button icons -
Constructor Summary
ConstructorsConstructorDescriptionStringArrayConfigurer(String key, String name) StringArrayConfigurer(String key, String name, Object val) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntry()Add a new list entry after the currently selected entry, or at the bottom of the list if no entries selected.voidaddFocusListener(FocusListener listener) Add a FocusListener to the Swing Components that make up this Configurer.protected voidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.static StringarrayToString(String[] s) buildChildConfigurer(Object value) voiddeleteEntry(ConfigurableListEntry entry) Remove the specified entry from the list.voidAn entry has had it's value changedGUI interface for setting the option in an editing windowList<VASSAL.configure.StringArrayConfigurer.StringEntry> Return the ListController associated with this Configurable ListgetModel()Deprecated, for removal: This API element is subject to removal in a future version.intReturn the index of the currently selected entryString[]protected ComponentDeprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.voidMove the currently selected list entry down one position The moved entry should retain the selectionvoidMove the currently selected list entry up one position The moved entry should retain the selectionvoidremoveFocusListener(FocusListener listener) Remove a FocusListener from the Swing Components that make up this Configurer.voidvoidrepack()Repack the current configurervoidselectEntry(ConfigurableListEntry entry) Set the selection to the specified list entry.voidsetContext(AbstractBuildable context) 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.voidsetHighlighted(boolean highlighted) Don't do anything special when highlighting, but deslect currently selected entry when unhighlightingvoidsetSelectedEntryIndex(int index) Set the currently selected entryprotected voidDeprecated, for removal: This API element is subject to removal in a future version.voidSet the Object valuevoidSet the Object value from a Stringstatic String[]protected voidDeprecated, for removal: This API element is subject to removal in a future version.voidupdateViewable(int rows) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class Configurer
addPropertyChangeListener, fireUpdate, getContext, getContextLevel, getHint, getKey, getName, getScreenSize, getValue, initCustomControls, isFrozen, isHighlighted, isPieceContext, removePropertyChangeListener, repack, requestFocus, setContext, setContext, setContextLevel, setEnabled, setFrozen, setHint, setHintKey, setLabelVisibile, setLabelVisible, setNameModifier and TypeMethodDescriptionvoidAdd a listener to be notified when the Object state changesvoidFire a PropertyChangeEvent as if the value had been set from nullGet the Context for this ConfigurergetHint()Return the current hint StringgetKey()Unique identifiergetName()Plain English description of the Objectprotected DimensionReturn the current screen size for use by List type configurers to allow them to take up maximum screen real estate if needed.getValue()The Object value May be null if the Object has not been initializedvoidinitCustomControls(JDialog d, Configurable target) Initialize any custom controls / keystrokesbooleanisFrozen()booleanReturn the current highlighted statusbooleanvoidprotected voidRepack a dialog or windowvoidMove the cursor to the first input field of this ConfigurervoidsetContext(Buildable context) voidsetContext(Configurable context) voidsetContextLevel(Configurer.ContextLevel contextLevel) voidsetEnabled(boolean enabled) Enable or Disable the action of this configurer/voidsetFrozen(boolean val) If true, then don't fire PropertyChangeEvents when the value is resetvoidSet the Hint StringvoidsetHintKey(String hintKey) Set the Hint String via a I18n keyvoidsetLabelVisibile(boolean visible) Deprecated, for removal: This API element is subject to removal in a future version.voidsetLabelVisible(boolean visible) Show/Hide the internal label maintained by this Configurer.void
-
Field Details
-
list
Deprecated, for removal: This API element is subject to removal in a future version. -
model
Deprecated, for removal: This API element is subject to removal in a future version. -
textField
Deprecated, for removal: This API element is subject to removal in a future version. -
minRows
Deprecated, for removal: This API element is subject to removal in a future version. -
maxRows
Deprecated, for removal: This API element is subject to removal in a future version. -
panel
-
-
Constructor Details
-
StringArrayConfigurer
-
StringArrayConfigurer
-
StringArrayConfigurer
-
-
Method Details
-
getModel
Deprecated, for removal: This API element is subject to removal in a future version. -
addValue
Deprecated, for removal: This API element is subject to removal in a future version. -
removeValue
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-
updateViewable
Deprecated, for removal: This API element is subject to removal in a future version. -
getTextComponent
Deprecated, for removal: This API element is subject to removal in a future version. -
getTextValue
Deprecated, for removal: This API element is subject to removal in a future version. -
setTextValue
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
-
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
Deprecated, for removal: This API element is subject to removal in a future version. -
buildChildConfigurer
-
moveEntryUp
public void moveEntryUp()Description copied from interface:ConfigurableListMove the currently selected list entry up one position The moved entry should retain the selection- Specified by:
moveEntryUpin interfaceConfigurableList
-
moveEntryDown
public void moveEntryDown()Description copied from interface:ConfigurableListMove the currently selected list entry down one position The moved entry should retain the selection- Specified by:
moveEntryDownin interfaceConfigurableList
-
addEntry
public void addEntry()Description copied from interface:ConfigurableListAdd 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:
addEntryin interfaceConfigurableList
-
deleteEntry
Description copied from interface:ConfigurableListRemove 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:
deleteEntryin interfaceConfigurableList- Parameters:
entry- Entry to delete.
-
getListController
Description copied from interface:ConfigurableListReturn the ListController associated with this Configurable List- Specified by:
getListControllerin interfaceConfigurableList- Returns:
- List Controller
-
addFocusListener
Description copied from class:ConfigurerAdd a FocusListener to the Swing Components that make up this Configurer.- Overrides:
addFocusListenerin classConfigurer- Parameters:
listener- Focus Listener
-
removeFocusListener
Description copied from class:ConfigurerRemove a FocusListener from the Swing Components that make up this Configurer.- Overrides:
removeFocusListenerin classConfigurer- Parameters:
listener- Focus Listener
-
selectEntry
Description copied from interface:ConfigurableListSet the selection to the specified list entry.- Specified by:
selectEntryin interfaceConfigurableList- Parameters:
entry- Entry to select
-
repack
public void repack()Description copied from class:ConfigurerRepack the current configurer- Specified by:
repackin interfaceConfigurableList- Overrides:
repackin classConfigurer
-
setSelectedEntryIndex
public void setSelectedEntryIndex(int index) Description copied from interface:ConfigurableListSet the currently selected entry- Specified by:
setSelectedEntryIndexin interfaceConfigurableList- Parameters:
index- Index of currently selected entry
-
getSelectedEntryIndex
public int getSelectedEntryIndex()Description copied from interface:ConfigurableListReturn the index of the currently selected entry- Specified by:
getSelectedEntryIndexin interfaceConfigurableList- Returns:
- currently selected entry index
-
entryChanged
Description copied from interface:ConfigurableListAn entry has had it's value changed- Specified by:
entryChangedin interfaceConfigurableList- 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:
setHighlightedin classConfigurer- Parameters:
highlighted- New Highlighted status
-
getEntries
-
setContext
Description copied from class:ConfigurerSet 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:
setContextin classConfigurer- Parameters:
context- Owning Configurable
-
Configurer.setLabelVisible(boolean)instead.