Class UMLGraph
- java.lang.Object
-
- y.base.Graph
-
- y.layout.LayoutGraph
-
- y.layout.DefaultLayoutGraph
-
- com.nomagic.magicdraw.uml.symbols.layout.UMLGraph
-
- All Implemented Interfaces:
y.base.GraphInterface,y.layout.GraphLayout
@OpenApi public class UMLGraph extends y.layout.DefaultLayoutGraphUML graph data.
-
-
Constructor Summary
Constructors Constructor Description UMLGraph(DiagramPresentationElement diagramView, boolean supportsSubgraph, java.util.Set<PresentationElement> selected)Deprecated.supportsSubgraph has no effectUMLGraph(DiagramPresentationElement diagramView, boolean supportsSubgraph, java.util.Set<PresentationElement> selected, boolean resetLabelPositions)Deprecated.supportsSubgraph has no effectUMLGraph(DiagramPresentationElement diagramView, java.util.Set<PresentationElement> selected)Construct UML Graph.UMLGraph(DiagramPresentationElement diagramView, java.util.Set<PresentationElement> selected, boolean resetLabelPositions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiagramPresentationElementgetDiagram()Get Presentation Diagram.java.util.Set<PresentationElement>getSelected()Get Set of the selected PresentationElement.java.awt.PointgetSphereCenterPoint()intgetSphereRadius()java.lang.StringgetStyle()Get String representation of Style.voidinitializeData()Collects all data provided by diagram to nodes and edges.voidsetPathStyle(java.lang.String style)Set path stylevoidsetResetLabelsAtInit(boolean resetLabelsAtInit)voidsetSphereCenterPoint(java.awt.Point point)Sets the center of the sphere that is used for node creationvoidsetSphereRadius(int radius)Sets the sphere from the defined point.booleanshouldResetLabelsAtInit()-
Methods inherited from class y.layout.DefaultLayoutGraph
createEdgeLayout, createGraphCopyFactory, createLabelFactory, createNodeLayout, getFeature, getFeature, getLabelLayout, getLabelLayout, getLayout, getLayout, setLabelLayout, setLabelLayout, setLabelLayout, setLayout, setLayout
-
Methods inherited from class y.layout.LayoutGraph
getCenter, getCenterX, getCenterY, getEdgeLabelLayout, getEdgeLayout, getEdgeList, getHeight, getLocation, getNodeLabelLayout, getNodeLayout, getPath, getPathList, getPointList, getPoints, getRectangle, getSize, getSourcePointAbs, getSourcePointRel, getTargetPointAbs, getTargetPointRel, getWidth, getX, getY, moveBy, setCenter, setCenter, setEndPointsAbs, setLocation, setLocation, setPath, setPath, setPoints, setPoints, setSize, setSize, setSourcePointAbs, setSourcePointRel, setTargetPointAbs, setTargetPointRel
-
Methods inherited from class y.base.Graph
addDataProvider, addGraphListener, changeEdge, changeEdge, changeEdge, clear, contains, contains, containsEdge, createCopy, createEdge, createEdge, createEdgeMap, createGraph, createNode, createNodeMap, disposeEdgeMap, disposeNodeMap, E, edgeCount, edgeObjects, edges, fireGraphEvent, firePostEvent, firePostEvent, firePreEvent, firePreEvent, firstEdge, firstNode, firstOutEdge, getDataProvider, getDataProviderKeys, getEdgeArray, getGraphCopyFactory, getGraphListeners, getNodeArray, getRegisteredEdgeMaps, getRegisteredNodeMaps, getSource, getTarget, hasListeners, hide, hide, isEmpty, lastEdge, lastNode, moveSubGraph, moveToFirst, moveToFirst, moveToLast, moveToLast, N, nodeCount, nodeObjects, nodes, printNodeSlotSize, reInsertEdge, reInsertNode, removeDataProvider, removeEdge, removeGraphListener, removeNode, setGraphCopyFactory, sortEdges, sortEdges, sortNodes, toString, unhide, unhide
-
-
-
-
Constructor Detail
-
UMLGraph
@OpenApi public UMLGraph(DiagramPresentationElement diagramView, java.util.Set<PresentationElement> selected)
Construct UML Graph. with given parameter- Parameters:
diagramView- diagram for which to construct graph.selected- selected elements
-
UMLGraph
@Deprecated @OpenApi public UMLGraph(DiagramPresentationElement diagramView, boolean supportsSubgraph, java.util.Set<PresentationElement> selected)
Deprecated.supportsSubgraph has no effect
-
UMLGraph
@OpenApi public UMLGraph(DiagramPresentationElement diagramView, java.util.Set<PresentationElement> selected, boolean resetLabelPositions)
-
UMLGraph
@Deprecated @OpenApi public UMLGraph(DiagramPresentationElement diagramView, boolean supportsSubgraph, java.util.Set<PresentationElement> selected, boolean resetLabelPositions)
Deprecated.supportsSubgraph has no effect
-
-
Method Detail
-
initializeData
@OpenApi public void initializeData()
Collects all data provided by diagram to nodes and edges.
-
getDiagram
@OpenApi public DiagramPresentationElement getDiagram()
Get Presentation Diagram.- Returns:
- Presentation Diagram.
-
shouldResetLabelsAtInit
@OpenApi public boolean shouldResetLabelsAtInit()
- Returns:
- if label positions should be reset before creating the graph
-
setResetLabelsAtInit
@OpenApi public final void setResetLabelsAtInit(boolean resetLabelsAtInit)
- Parameters:
resetLabelsAtInit- true for label reset when creating the graph, false otherwise. Use true for layouting, false when graph is used as a reference for routing.
-
getStyle
@OpenApi public java.lang.String getStyle()
Get String representation of Style.- Returns:
- String.
-
setPathStyle
@OpenApi public void setPathStyle(java.lang.String style)
Set path style- Parameters:
style- path style to set
-
getSelected
@OpenApi public java.util.Set<PresentationElement> getSelected()
Get Set of the selected PresentationElement.- Returns:
- Set set of selected presentation elements
-
setSphereRadius
@OpenApi public void setSphereRadius(int radius)
Sets the sphere from the defined point. All element within this sphere will be collected and initiated. Shapes outside the sphere will be ignored.- Parameters:
radius- the radius that shapes are collected
-
getSphereRadius
@OpenApi public int getSphereRadius()
- Returns:
- the sphere size for data initialization
-
setSphereCenterPoint
@OpenApi public void setSphereCenterPoint(@CheckForNull java.awt.Point point)Sets the center of the sphere that is used for node creation- Parameters:
point- new point of center, default is 0,0
-
getSphereCenterPoint
@CheckForNull @OpenApi public java.awt.Point getSphereCenterPoint()
- Returns:
- the center of the sphere for node creation
-
-