Package com.nomagic.magicdraw.properties
Class ExtendablePropertyManager
java.lang.Object
com.nomagic.magicdraw.properties.PropertyManager
com.nomagic.magicdraw.properties.ExtendablePropertyManager
- All Implemented Interfaces:
PropertyVisitorAcceptor
,PropertyChangeListener
,Cloneable
,EventListener
- Direct Known Subclasses:
PropertyManagerByDiagram
,PropertyManagerByStereotype
Property manager which can be specified by another property manager.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
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
ConstructorDescriptionConstruct ExtendablePropertyManagerExtendablePropertyManager
(boolean extendableByDiagram, boolean extendableByStereotype) Construct ExtendablePropertyManager with given arguments.ExtendablePropertyManager
(PropertyManager parentPropertyManager, String name, List<Property> properties) Construct ExtendablePropertyManager with the given argument.ExtendablePropertyManager
(String name, List<Property> properties) Construct ExtendablePropertyManager with given arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(PropertyVisitor visitor) Accepts the given visitor.boolean
elementIsAllowed
(DiagramType diagramType) Checks If element is allowed by diagram type.Returns property class type.com.nomagic.ci.persistence.IProject
Class[]
Get Symbol type.boolean
Tests If ExtendablePropertyManager is ExtendableByDiagram.boolean
Tests If ExtendablePropertyManager is ExtendableByStereotype.boolean
Tests Manager is removable.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
(Class symbolType) Set symbol type.void
setSymbolType
(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
-
Field Details
-
removable
protected boolean removableSome property managers by diagram should be fixed and not allowed to be removed.
-
-
Constructor Details
-
ExtendablePropertyManager
public ExtendablePropertyManager()Construct ExtendablePropertyManager -
ExtendablePropertyManager
public ExtendablePropertyManager(PropertyManager parentPropertyManager, String name, List<Property> properties) Construct ExtendablePropertyManager with the given argument.- Parameters:
parentPropertyManager
- Parent of this Property managername
- ExtendablePropertyManager 's name.properties
- List of properties.
-
ExtendablePropertyManager
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 Details
-
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
Description copied from class:PropertyManager
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classPropertyManager
- Parameters:
visitor
- the PropertyVisitor.- Throws:
Exception
- See Also:
-
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:
-
setSymbolType
Set symbol type. If set null manager can be used for diagrams.- Parameters:
symbolType
- symbol type
-
setSymbolType
Set symbol type. If set null manager can be used for diagrams.- Parameters:
symbolType
- symbol types
-
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
Checks If element is allowed by diagram type.- Parameters:
diagramType
- The given diagram type.- Returns:
- boolean
-
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.
-