Class SymbolElementMap
- java.lang.Object
-
- com.nomagic.magicdraw.uml.symbols.SymbolElementMap
-
@OpenApi public class SymbolElementMap extends java.lang.Object
Maps model elements to presentation elements of loaded diagrams.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Element,java.util.List<PresentationElement>>
map
-
Constructor Summary
Constructors Constructor Description SymbolElementMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPresentationElement(Element element, PresentationElement presentationElement)
java.util.List<PresentationElement>
getAllPresentationElements(Element element)
Returns all presentation elements for specified model element.java.util.List<PresentationElement>
getAllPresentationElements(Element element, DiagramPresentationElement diagramView)
Returns all presentation elements for specified model element in a given diagram.java.util.List<PresentationElement>
getAllPresentationElements(Element element, java.util.Collection<DiagramPresentationElement> diagramViews)
Returns all presentation elements for specified model element in a given diagram.java.util.Collection<Element>
getElements()
PresentationElement
getPresentationElement(Element element)
Returns presentation element for specified model element.PresentationElement
getPresentationElement(Element element, java.lang.Class<? extends PresentationElement> clazz)
Gets presentation element for a specified model element and presentation element class.void
removePresentationElement(Element element, PresentationElement presentationElement)
-
-
-
Field Detail
-
map
private final java.util.Map<Element,java.util.List<PresentationElement>> map
-
-
Method Detail
-
addPresentationElement
public void addPresentationElement(Element element, PresentationElement presentationElement)
-
removePresentationElement
public void removePresentationElement(@CheckForNull Element element, PresentationElement presentationElement)
-
getPresentationElement
@OpenApi @CheckForNull public PresentationElement getPresentationElement(Element element)
Returns presentation element for specified model element. Presentation element of loaded diagrams only is returned.- Parameters:
element
- model element- Returns:
- first presentation element for specified model element.
-
getPresentationElement
@CheckForNull public PresentationElement getPresentationElement(Element element, java.lang.Class<? extends PresentationElement> clazz)
Gets presentation element for a specified model element and presentation element class.- Parameters:
element
- model element for which to get presentation element.clazz
- presentation element class to get.- Returns:
- presentation element of a given model element.
-
getAllPresentationElements
@OpenApi public java.util.List<PresentationElement> getAllPresentationElements(@CheckForNull Element element)
Returns all presentation elements for specified model element. Presentation elements of loaded diagrams only are returned.- Parameters:
element
- model element.- Returns:
- list of
PresentationElement
objects.
-
getAllPresentationElements
@OpenApi public java.util.List<PresentationElement> getAllPresentationElements(@CheckForNull Element element, DiagramPresentationElement diagramView)
Returns all presentation elements for specified model element in a given diagram.- Parameters:
element
- model element.diagramView
- diagram in which returned symbols should be used.- Returns:
- list of
PresentationElement
objects.
-
getAllPresentationElements
@OpenApi public java.util.List<PresentationElement> getAllPresentationElements(@CheckForNull Element element, java.util.Collection<DiagramPresentationElement> diagramViews)
Returns all presentation elements for specified model element in a given diagram.- Parameters:
element
- model element.diagramViews
- diagram in which returned symbols should be used.- Returns:
- list of
PresentationElement
objects.
-
getElements
public java.util.Collection<Element> getElements()
- Returns:
- Model elements which has symbols.
-
-