public class MultiChoiceOption extends AbstractOption
Modifier and Type | Field and Description |
---|---|
protected int |
chosenOptionIndex |
protected int |
defaultOptionIndex |
protected String[] |
optionDescriptions |
protected String[] |
optionLabels |
cliChar, illegalNameCharacters, name, purpose
Constructor and Description |
---|
MultiChoiceOption(String name,
char cliChar,
String purpose,
String[] optionLabels,
String[] optionDescriptions,
int defaultOptionIndex) |
Modifier and Type | Method and Description |
---|---|
int |
getChosenIndex() |
String |
getChosenLabel() |
String |
getDefaultCLIString()
Gets the Command Line Interface text
|
JComponent |
getEditComponent()
Gets the GUI component to edit
|
String[] |
getOptionLabels() |
String |
getValueAsCLIString()
Gets the value of a Command Line Interface text as a string
|
void |
setChosenIndex(int index) |
void |
setChosenLabel(String label) |
void |
setValueViaCLIString(String s)
Sets value of this option via the Command Line Interface text
|
copy, getCLIChar, getDescription, getName, getPurpose, getStateString, nameIsLegal, resetToDefault
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
measureByteSize
protected String[] optionLabels
protected String[] optionDescriptions
protected int defaultOptionIndex
protected int chosenOptionIndex
public String getDefaultCLIString()
Option
public String getValueAsCLIString()
Option
public void setValueViaCLIString(String s)
Option
s
- the Command Line Interface textpublic void setChosenLabel(String label)
public void setChosenIndex(int index)
public String[] getOptionLabels()
public String getChosenLabel()
public int getChosenIndex()
public JComponent getEditComponent()
Option
getEditComponent
in interface Option
getEditComponent
in class AbstractOption
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.