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
ConstructorsConstructorDescriptionDefault 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 TypeMethodDescriptionvoidAccepts the given visitor.clone()Clones the property.Returns property class type.Returns value as String object.Returns value's string representation.booleanReturns multiline flag.voidsetMultiline(boolean multiline) Sets the multiline flagvoidSets 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:PropertySets new property value. Will fire aPropertyChangeEventwith 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:
getValueStringRepresentationin classProperty- Returns:
- string value.
-
accept
Accepts the given visitor.- Specified by:
acceptin interfacePropertyVisitorAcceptor- Overrides:
acceptin classProperty- Parameters:
v- the PropertyVisitor.- Throws:
Exception
-
getString
Returns value as String object.- Returns:
- String object.
-
getClassType
Returns property class type.- Specified by:
getClassTypein interfacePropertyVisitorAcceptor- Overrides:
getClassTypein classProperty- Returns:
- PropertyID.STRING_PROPERTY
- See Also:
-
clone
Description copied from class:PropertyClones 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)