public class ChoiceCriterionElement extends StringCriterionElement
Constructor and Description |
---|
ChoiceCriterionElement(java.lang.String name,
boolean canDisable)
Construct a choice element for a criterion.
|
ChoiceCriterionElement(java.lang.String name,
boolean canDisable,
boolean acceptRegularExpression,
boolean acceptPtolemyExpression,
boolean editable)
Construct a choice element for a criterion.
|
Modifier and Type | Method and Description |
---|---|
void |
addChoice(java.lang.Object choice)
Add a choice to the end of choices.
|
void |
addChoices(java.util.Collection<?> choices)
Add choices to the end of choices.
|
java.util.List<java.lang.Object> |
getChoices()
Get an unmodifiable list of all the choices.
|
boolean |
isEditable()
Return whether a new value can be input in the edit box.
|
void |
removeChoice(java.lang.Object choice)
Remove a choice from the list of choices.
|
void |
removeChoices(java.util.Collection<?> choices)
Remove choices from the list of choices.
|
acceptPtolemyExpression, acceptRegularExpression
canDisable, getName
public ChoiceCriterionElement(java.lang.String name, boolean canDisable)
name
- The name of the element.canDisable
- Whether the element can be disabled.public ChoiceCriterionElement(java.lang.String name, boolean canDisable, boolean acceptRegularExpression, boolean acceptPtolemyExpression, boolean editable)
name
- The name of the element.canDisable
- Whether the element can be disabled.acceptRegularExpression
- Whether regular expression is accepted.acceptPtolemyExpression
- Whether Ptolemy expression is accepted.editable
- Whether a new value can be input in the edit box.public void addChoice(java.lang.Object choice)
choice
- The new choice.public void addChoices(java.util.Collection<?> choices)
choices
- The new choices.public java.util.List<java.lang.Object> getChoices()
public boolean isEditable()
public void removeChoice(java.lang.Object choice)
choice
- The choice to be removed.public void removeChoices(java.util.Collection<?> choices)
choices
- The choices to be removed.