Package com.nomagic.magicdraw.properties
Class StringProperty
- java.lang.Object
-
- com.nomagic.magicdraw.properties.Property
-
- com.nomagic.magicdraw.properties.StringProperty
-
- All Implemented Interfaces:
PropertyVisitorAcceptor
,java.lang.Cloneable
- Direct Known Subclasses:
DateTimeProperty
,JarEntryProperty
,PasswordProperty
@OpenApiAll public class StringProperty extends Property
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, UNDEFINED, VALUE, VALUE_ANNOTATIONS
-
-
Constructor Summary
Constructors Constructor Description StringProperty()
Default constructor.StringProperty(java.lang.String id, java.lang.Object value)
Deprecated.StringProperty(java.lang.String id, java.lang.Object value, boolean multiline)
Deprecated.StringProperty(java.lang.String id, java.lang.String value)
The property constructor.StringProperty(java.lang.String id, java.lang.String value, boolean multiline)
The property constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(PropertyVisitor v)
Accepts the given visitor.StringProperty
clone()
Clones the property.java.lang.String
getClassType()
Returns property class type.java.lang.String
getString()
Returns value as String object.java.lang.String
getValueStringRepresentation()
Returns value's string representation.boolean
isMultiline()
Returns multiline flag.void
setMultiline(boolean multiline)
Sets the multiline flagvoid
setValue(java.lang.Object value)
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 Detail
-
StringProperty
public StringProperty()
Default constructor. Value of the property will be null. ID will be empty string. Property is editable.
-
StringProperty
@Deprecated public StringProperty(java.lang.String id, @CheckForNull java.lang.Object value)
Deprecated.
-
StringProperty
public StringProperty(java.lang.String id, @CheckForNull java.lang.String value)
The property constructor. Property is editable, and not multi lined.- Parameters:
id
- the ID of property.value
- value of the property.
-
StringProperty
@Deprecated public StringProperty(java.lang.String id, @CheckForNull java.lang.Object value, boolean multiline)
Deprecated.
-
StringProperty
public StringProperty(java.lang.String id, @CheckForNull java.lang.String value, boolean multiline)
The property constructor. Property is editable.- Parameters:
id
- the ID of property.value
- value of the property.multiline
- the multiline flag value.
-
-
Method Detail
-
setValue
public void setValue(@CheckForNull java.lang.Object value)
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
public java.lang.String getValueStringRepresentation()
Returns value's string representation.- Overrides:
getValueStringRepresentation
in classProperty
- Returns:
- string value.
-
accept
public void accept(PropertyVisitor v) throws java.lang.Exception
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classProperty
- Parameters:
v
- the PropertyVisitor.- Throws:
java.lang.Exception
-
getString
public java.lang.String getString()
Returns value as String object.- Returns:
- String object.
-
getClassType
public java.lang.String getClassType()
Returns property class type.- Specified by:
getClassType
in interfacePropertyVisitorAcceptor
- Overrides:
getClassType
in classProperty
- Returns:
- PropertyID.STRING_PROPERTY
- See Also:
PropertyID.STRING_PROPERTY
-
clone
public StringProperty 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.
-
-