Package com.nomagic.magicdraw.properties
Class ListProperty
java.lang.Object
com.nomagic.magicdraw.properties.Property
com.nomagic.magicdraw.properties.ListProperty
- All Implemented Interfaces:
PropertyVisitorAcceptor
,Cloneable
- Direct Known Subclasses:
ClassPathEntriesListProperty
,ElementListProperty
ListProperty
represents a property for storing and editing entries of the list.-
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
ConstructorDescriptionCreates and initializes a newListProperty
object.ListProperty
(String id, Object[] value) Creates and initializes a newListProperty
object from specified parameters. -
Method Summary
Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addAnnotation, addPropertyChangeListener, addSource, addSources, areEqualByValue, areValuesEqual, checkFrozen, checkFrozen, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getAnnotation, getAnnotations, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSortableValueStringRepresentation, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, hashCode, isEditable, isUndefinedState, isValueCompatible, removeAnnotation, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setAnnotations, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toString
-
Constructor Details
-
ListProperty
public ListProperty()Creates and initializes a newListProperty
object. ID of the property will be empty string and value - null. -
ListProperty
Creates and initializes a newListProperty
object from specified parameters.- Parameters:
id
- - id of the property.value
- - value of the property.
-
-
Method Details
-
setValue
Sets a value of the property.- Overrides:
setValue
in classProperty
- Parameters:
value
- a value.- Throws:
IllegalArgumentException
- if specified value is not an array. null is legal value.
-
getClassType
Returns a class type of the property.- Specified by:
getClassType
in interfacePropertyVisitorAcceptor
- Overrides:
getClassType
in classProperty
- Returns:
- PropertyID.LIST_PROPERTY
- See Also:
-
accept
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classProperty
- Parameters:
v
- the PropertyVisitor.- Throws:
Exception
-
getValueStringRepresentation
Description copied from class:Property
Returns value's string representation.- Overrides:
getValueStringRepresentation
in classProperty
- Returns:
- string "null" if property does not have value;
value. toString()
if property has value.
-
getValue
Description copied from class:Property
Returns properties value. -
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.
-