@OpenApiAll public class ChoiceProperty extends AbstractChoiceProperty
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, mAdditionalProperties, mDescriptionID, mEditable, mGroupName, mID, mResourceProvider, mSources, mSupport, mUndefinedState, mValue, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, UNDEFINED, VALUE
Constructor and Description |
---|
ChoiceProperty()
Default constructor.
|
ChoiceProperty(java.lang.String id,
int index,
java.util.List choice)
The constructor.
|
ChoiceProperty(java.lang.String id,
int index,
java.util.List choice,
int max)
The constructor.
|
ChoiceProperty(java.lang.String id,
java.lang.Object value,
java.util.List choice)
The constructor.
|
ChoiceProperty(java.lang.String id,
java.lang.Object value,
java.util.List choice,
int max)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(PropertyVisitor v)
Accepts the
PropertyVisitor . |
ChoiceProperty |
clone()
Clones the property.
|
java.lang.String |
getClassType()
Returns property class type.
|
int |
getIndex()
Returns the index of value in the choice list.
|
boolean |
isAppendValue()
Return append value flag.
|
void |
setAppendValue(boolean appendValue)
Sets the append value flag.
|
void |
setChoice(java.util.List val)
Sets the list of possible values for selecting.
|
void |
setIndex(int val)
Sets index of selected value.
|
void |
setValue(java.lang.Object value)
Sets value of the property.
|
java.lang.String |
toString()
The string representation of the property.
|
getChoice, isEditableValue, isUndefinedStateAvailable, isValuesTranslatable, setEditableValue, setUndefinedStateAvailable, setValuesTranslatable
_isFrozen, _setFrozen, addPropertyChangeListener, addSource, addSources, areValuesEqual, createCellEditor, createEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getDescription, getDescriptionID, getGroup, getID, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSources, getUndefinedString, getUndefinedString, getValue, getValueStringRepresentation, hashCode, isEditable, isUndefinedState, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setDescription, setDescriptionID, setEditable, setGroup, setID, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState
public ChoiceProperty()
public ChoiceProperty(java.lang.String id, @CheckForNull java.lang.Object value, java.util.List choice)
id
- the ID of property.value
- the value of the property.choice
- the list of possible values.public ChoiceProperty(java.lang.String id, @CheckForNull java.lang.Object value, java.util.List choice, int max)
id
- the ID of property.value
- the value of the property.choice
- the list of possible values.max
- the maximum size of possible values list.public ChoiceProperty(java.lang.String id, int index, java.util.List choice, int max)
id
- the ID of property.index
- the index in choice of selected value.choice
- the list of possible values.max
- the maximum size of possible values list.public ChoiceProperty(java.lang.String id, int index, java.util.List choice)
id
- the ID of property.index
- the index in choice of selected value.choice
- the list of possible values.public boolean isAppendValue()
public void setAppendValue(boolean appendValue)
appendValue
- the append state of the property.public void accept(PropertyVisitor v) throws java.lang.Exception
PropertyVisitor
.accept
in interface PropertyVisitorAcceptor
accept
in class Property
v
- the given visitor.java.lang.Exception
public int getIndex()
public void setChoice(java.util.List val)
setChoice
in class AbstractChoiceProperty
val
- a new possible values list.public void setIndex(int val)
val
- a new index.public void setValue(@CheckForNull java.lang.Object value)
public java.lang.String getClassType()
getClassType
in interface PropertyVisitorAcceptor
getClassType
in class Property
PropertyID.CHOICE_PROPERTY
public java.lang.String toString()
public ChoiceProperty clone()
Property
clone
in class AbstractChoiceProperty