Package com.nomagic.magicdraw.properties
Class AbstractChoiceProperty
java.lang.Object
com.nomagic.magicdraw.properties.Property
com.nomagic.magicdraw.properties.AbstractChoiceProperty
- All Implemented Interfaces:
PropertyVisitorAcceptor
,Cloneable
- Direct Known Subclasses:
ChoiceProperty
Extracted more common class for Choice editing
-
Field Summary
Fields inherited from class com.nomagic.magicdraw.properties.Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, TO, UNDEFINED, VALUE, VALUE_ANNOTATIONS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the property.Returns list of possible values.boolean
Returns editable flag.boolean
boolean
void
Sets the list of possible values for selecting.void
setEditableValue
(boolean editable) Sets the editable flag..void
setUndefinedStateAvailable
(boolean undefinedStateAvailable) void
setValuesTranslatable
(boolean valuesTranslatable) Set true, if values of this property must be translated with property's resource provider.Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, accept, addAnnotation, addPropertyChangeListener, addSource, addSources, areEqualByValue, areValuesEqual, checkFrozen, checkFrozen, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getAnnotation, getAnnotations, getClassType, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSortableValueStringRepresentation, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, getValue, getValueStringRepresentation, hashCode, isEditable, isUndefinedState, isValueCompatible, removeAnnotation, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setAnnotations, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, setValue, toString
-
Constructor Details
-
AbstractChoiceProperty
public AbstractChoiceProperty() -
AbstractChoiceProperty
-
-
Method Details
-
setEditableValue
public void setEditableValue(boolean editable) Sets the editable flag.. If property is editable, then value can be selected not just from the list, but entered the new one.- Parameters:
editable
- the editable state of the property.
-
isEditableValue
public boolean isEditableValue()Returns editable flag.- Returns:
- the editable flag.
-
getChoice
Returns list of possible values.- Returns:
- list of possible values.
-
setChoice
Sets the list of possible values for selecting. Sets only mMaximum number of values from the List's beginning.- Parameters:
val
- a new possible values list.
-
isValuesTranslatable
public boolean isValuesTranslatable()- Returns:
- true, if values of this property must be translated with property's resource provider
-
setValuesTranslatable
public void setValuesTranslatable(boolean valuesTranslatable) Set true, if values of this property must be translated with property's resource provider.- Parameters:
valuesTranslatable
- the new value of this flag.
-
clone
Description copied from class:Property
Clones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners. -
isUndefinedStateAvailable
public boolean isUndefinedStateAvailable() -
setUndefinedStateAvailable
public void setUndefinedStateAvailable(boolean undefinedStateAvailable)
-