@OpenApiAll public class TypeProperty extends Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, mAdditionalProperties, mDescriptionID, mEditable, mGroupName, mID, mResourceProvider, mSources, mSupport, mUndefinedState, mValue, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, UNDEFINED, VALUE
Constructor and Description |
---|
TypeProperty()
Default constructor.
|
TypeProperty(java.lang.String id,
java.lang.Object type)
The property constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(PropertyVisitor v)
Accepts the given visitor.
|
TypeProperty |
clone()
Clones the property.
|
java.lang.String |
getClassType()
Returns property class type.
|
java.util.Collection |
getNotSelectableTypes()
Returns not selectable elements class types.
|
java.lang.Object |
getValue()
Returns properties value.
|
java.lang.String |
getValueStringRepresentation()
Returns value's string representation.
|
boolean |
isAllowToEnterNewValue()
returns true when property allows to enter name of not existing element.
|
boolean |
isElementValue()
returns true when property value is instance of Element
|
void |
setElementValue(boolean b)
Sets if project root model will be added to the property editor.
|
void |
setPropertyData(java.util.Collection notSelectableTypes,
boolean useReverseOnNotSelectable,
boolean useUnspecified,
boolean allowToEnterNewName)
Sets data for property members.
|
void |
setValue(java.lang.Object value)
Sets new property value.
|
boolean |
useReverseOnNotSelectableTypes()
Returns reverse flag for not selectable types.
|
boolean |
useUnspecified()
Returns 'use unspecified' flag for this property.
|
_isFrozen, _setFrozen, addPropertyChangeListener, addSource, addSources, areValuesEqual, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getDescription, getDescriptionID, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSources, getUndefinedString, getUndefinedString, hashCode, isEditable, isUndefinedState, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toString
public TypeProperty()
public TypeProperty(java.lang.String id, @CheckForNull java.lang.Object type)
id
- the ID of property.type
- some type - ModelElement or String.public void accept(PropertyVisitor v) throws java.lang.Exception
accept
in interface PropertyVisitorAcceptor
accept
in class Property
v
- the PropertyVisitor.java.lang.Exception
public TypeProperty clone()
public java.lang.String getClassType()
getClassType
in interface PropertyVisitorAcceptor
getClassType
in class Property
PropertyID.STRING_PROPERTY
public void setPropertyData(java.util.Collection notSelectableTypes, boolean useReverseOnNotSelectable, boolean useUnspecified, boolean allowToEnterNewName)
notSelectableTypes
- the collection of not selectable elements class types.useReverseOnNotSelectable
- reverse flag for not selectable types. If this flag is true,
not selectable types will be treated as selectable.useUnspecified
- if true, "Unspecified" item will be added into the editor.allowToEnterNewName
- if true editor allows to enter free text (create new type).ClassTypes
public void setElementValue(boolean b)
b
- if true
, project model will be added into the property editor.public java.util.Collection getNotSelectableTypes()
setPropertyData(java.util.Collection, boolean, boolean, boolean)
public boolean useReverseOnNotSelectableTypes()
setPropertyData(java.util.Collection, boolean, boolean, boolean)
public boolean useUnspecified()
setPropertyData(java.util.Collection, boolean, boolean, boolean)
public boolean isAllowToEnterNewValue()
public boolean isElementValue()
@CheckForNull public java.lang.Object getValue()
public void setValue(@CheckForNull java.lang.Object value)
PropertyChangeEvent
with propertyName - property
ID, newValue and oldValue.public java.lang.String getValueStringRepresentation()
Property
getValueStringRepresentation
in class Property
value.
toString()
if property has value.