Package com.nomagic.magicdraw.properties
Class StringProperty
java.lang.Object
com.nomagic.magicdraw.properties.Property
com.nomagic.magicdraw.properties.StringProperty
- All Implemented Interfaces:
PropertyVisitorAcceptor
,Cloneable
- Direct Known Subclasses:
DateTimeProperty
,JarEntryProperty
,PasswordProperty
The property for storing and editing some String value.
-
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
ConstructorDescriptionDefault constructor.StringProperty
(String id, Object value) Deprecated.StringProperty
(String id, Object value, boolean multiline) Deprecated.StringProperty
(String id, String value) The property constructor.StringProperty
(String id, String value, boolean multiline) The property constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Accepts the given visitor.clone()
Clones the property.Returns property class type.Returns value as String object.Returns value's string representation.boolean
Returns multiline flag.void
setMultiline
(boolean multiline) Sets the multiline flagvoid
Sets new property value.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, getValue, hashCode, isEditable, isUndefinedState, isValueCompatible, removeAnnotation, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setAnnotations, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toString
-
Constructor Details
-
StringProperty
public StringProperty()Default constructor. Value of the property will be null. ID will be empty string. Property is editable. -
StringProperty
Deprecated. -
StringProperty
The property constructor. Property is editable, and not multi lined.- Parameters:
id
- the ID of property.value
- value of the property.
-
StringProperty
Deprecated. -
StringProperty
The property constructor. Property is editable.- Parameters:
id
- the ID of property.value
- value of the property.multiline
- the multiline flag value.
-
-
Method Details
-
setValue
Description copied from class:Property
Sets new property value. Will fire aPropertyChangeEvent
with propertyName - property ID, newValue and oldValue. -
isMultiline
public boolean isMultiline()Returns multiline flag.- Returns:
- the multiline flag.
-
setMultiline
public void setMultiline(boolean multiline) Sets the multiline flag- Parameters:
multiline
- the multiline flag value.
-
getValueStringRepresentation
Returns value's string representation.- Overrides:
getValueStringRepresentation
in classProperty
- Returns:
- string value.
-
accept
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classProperty
- Parameters:
v
- the PropertyVisitor.- Throws:
Exception
-
getString
Returns value as String object.- Returns:
- String object.
-
getClassType
Returns property class type.- Specified by:
getClassType
in interfacePropertyVisitorAcceptor
- Overrides:
getClassType
in classProperty
- Returns:
- PropertyID.STRING_PROPERTY
- See Also:
-
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.
-
StringProperty(String, String)