Package com.nomagic.magicdraw.properties
Class ExtendablePropertyManager
- java.lang.Object
-
- com.nomagic.magicdraw.properties.PropertyManager
-
- com.nomagic.magicdraw.properties.ExtendablePropertyManager
-
- All Implemented Interfaces:
PropertyVisitorAcceptor
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
- Direct Known Subclasses:
PropertyManagerByDiagram
,PropertyManagerByStereotype
@OpenApiAll public class ExtendablePropertyManager extends PropertyManager
Property manager which can be specified by another property manager.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
removable
Some property managers by diagram should be fixed and not allowed to be removed.-
Fields inherited from class com.nomagic.magicdraw.properties.PropertyManager
IS_UNIQUE, OWN_PROPERTY_ADDED, OWN_PROPERTY_REMOVED
-
-
Constructor Summary
Constructors Constructor Description ExtendablePropertyManager()
Construct ExtendablePropertyManagerExtendablePropertyManager(boolean extendableByDiagram, boolean extendableByStereotype)
Construct ExtendablePropertyManager with given arguments.ExtendablePropertyManager(PropertyManager parentPropertyManager, java.lang.String name, java.util.List<Property> properties)
Construct ExtendablePropertyManager with the given argument.ExtendablePropertyManager(java.lang.String name, java.util.List<Property> properties)
Construct ExtendablePropertyManager with given arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(PropertyVisitor visitor)
Accepts the given visitor.boolean
elementIsAllowed(DiagramType diagramType)
Checks If element is allowed by diagram type.java.lang.String
getClassType()
Returns property class type.com.nomagic.ci.persistence.IProject
getDefinedIn()
java.lang.Class[]
getSymbolType()
Get Symbol type.boolean
isExtendableByDiagram()
Tests If ExtendablePropertyManager is ExtendableByDiagram.boolean
isExtendableByStereotype()
Tests If ExtendablePropertyManager is ExtendableByStereotype.boolean
isRemovable()
Tests Manager is removable.PropertyManager
makeCopy()
Make copy of property.void
setDefinedIn(com.nomagic.ci.persistence.IProject definedIn)
Set project where this module is read from.void
setExtendableByDiagram(boolean extendableByDiagram)
Sets this manager extendable by diagram.void
setExtendableByStereotype(boolean extendableByStereotype)
Sets this manager extendable by stereotype.void
setRemovable(boolean removable)
Set Removable flag.void
setSymbolType(java.lang.Class symbolType)
Set symbol type.void
setSymbolType(java.lang.Class[] symbolType)
Set symbol type.-
Methods inherited from class com.nomagic.magicdraw.properties.PropertyManager
addProperties, addProperty, addPropertyChangeListener, append, append, append, append, apply, apply, applyValues, clone, cloneProperties, distinct, distinct, equalsTo, equalsWithValues, generateDefaultDescriptionID, generateNullDescriptionID, getHiddenProperties, getID, getName, getOrderedProperties, getOwnProperties, getParentPropertyManager, getProperties, getProperty, getPropertyByName, getStyle, hideParentProperty, isFrozen, isHiddenParentProperty, isTheSame, isUndefinedStateOrValuesDiffer, leaveTheSame, leaveTheSame, makeOwnProperty, mergeBooleanProperty, mergeChoiceProperty, mergeElementProperty, mergeProperties, mergePropertyByType, propertyChange, removeProperty, removeProperty, removeProperty, removePropertyChangeListener, retainProperties, setFrozen, setID, setName, setParentPropertyManager, setParentPropertyManagerOnly, setProperties, setPropertyEnableMap, setStyle, sGetID, shareProperty, showParentProperty, toString
-
-
-
-
Constructor Detail
-
ExtendablePropertyManager
public ExtendablePropertyManager()
Construct ExtendablePropertyManager
-
ExtendablePropertyManager
public ExtendablePropertyManager(PropertyManager parentPropertyManager, java.lang.String name, java.util.List<Property> properties)
Construct ExtendablePropertyManager with the given argument.- Parameters:
parentPropertyManager
- Parent of this Property managername
- ExtendablePropertyManager 's name.properties
- List of properties.
-
ExtendablePropertyManager
public ExtendablePropertyManager(java.lang.String name, java.util.List<Property> properties)
Construct ExtendablePropertyManager with given arguments.- Parameters:
name
- Property manager name.properties
- List of property.
-
ExtendablePropertyManager
public ExtendablePropertyManager(boolean extendableByDiagram, boolean extendableByStereotype)
Construct ExtendablePropertyManager with given arguments.- Parameters:
extendableByDiagram
- extendable by diagramextendableByStereotype
- extendable by stereotype
-
-
Method Detail
-
isExtendableByDiagram
public boolean isExtendableByDiagram()
Tests If ExtendablePropertyManager is ExtendableByDiagram.- Returns:
- true if this manager can be extended for diagram.
-
setExtendableByDiagram
public void setExtendableByDiagram(boolean extendableByDiagram)
Sets this manager extendable by diagram.- Parameters:
extendableByDiagram
- value
-
isExtendableByStereotype
public boolean isExtendableByStereotype()
Tests If ExtendablePropertyManager is ExtendableByStereotype.- Returns:
- true if this manager can be extended by stereotype.
-
setExtendableByStereotype
public void setExtendableByStereotype(boolean extendableByStereotype)
Sets this manager extendable by stereotype.- Parameters:
extendableByStereotype
- value
-
accept
public void accept(PropertyVisitor visitor) throws java.lang.Exception
Description copied from class:PropertyManager
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classPropertyManager
- Parameters:
visitor
- the PropertyVisitor.- Throws:
java.lang.Exception
- See Also:
PropertyManager.accept(com.nomagic.magicdraw.properties.PropertyVisitor)
-
getClassType
public java.lang.String getClassType()
Description copied from class:PropertyManager
Returns property class type.- Specified by:
getClassType
in interfacePropertyVisitorAcceptor
- Overrides:
getClassType
in classPropertyManager
- Returns:
- PropertyID.PROPERTY_MANAGER
- See Also:
PropertyVisitorAcceptor.getClassType()
-
setSymbolType
public void setSymbolType(java.lang.Class symbolType)
Set symbol type. If set null manager can be used for diagrams.- Parameters:
symbolType
- symbol type
-
setSymbolType
public void setSymbolType(java.lang.Class[] symbolType)
Set symbol type. If set null manager can be used for diagrams.- Parameters:
symbolType
- symbol types
-
getSymbolType
public java.lang.Class[] getSymbolType()
Get Symbol type.- Returns:
- symbol type.
-
isRemovable
public boolean isRemovable()
Tests Manager is removable.- Returns:
- true if manager can be removed using GUI.
-
setRemovable
public void setRemovable(boolean removable)
Set Removable flag.- Parameters:
removable
- true if manager can be removed using GUI.
-
elementIsAllowed
public boolean elementIsAllowed(DiagramType diagramType)
Checks If element is allowed by diagram type.- Parameters:
diagramType
- The given diagram type.- Returns:
- boolean
-
makeCopy
public PropertyManager makeCopy()
Description copied from class:PropertyManager
Make copy of property.- Overrides:
makeCopy
in classPropertyManager
- Returns:
- Property Manager.
-
getDefinedIn
@CheckForNull public com.nomagic.ci.persistence.IProject getDefinedIn()
- Returns:
- module or project where this manager is defined (read from). In case manager is defined in primary project it may return null.
-
setDefinedIn
public void setDefinedIn(@CheckForNull com.nomagic.ci.persistence.IProject definedIn)
Set project where this module is read from.- Parameters:
definedIn
- project where module is defined.
-
-