Class BaseGraph
java.lang.Object
y.base.Graph
y.layout.LayoutGraph
y.layout.DefaultLayoutGraph
com.nomagic.magicdraw.uml.symbols.layout.BaseGraph
- All Implemented Interfaces:
y.base.GraphInterface
,y.layout.GraphLayout
- Direct Known Subclasses:
UMLGraph
@OpenApi
public class BaseGraph
extends y.layout.DefaultLayoutGraph
UML graph data.
-
Field Summary
Fields inherited from class y.layout.DefaultLayoutGraph
edgeLabelFeatureMap, edgeLabelMap, nodeLabelFeatureMap, nodeLabelMap
Fields inherited from class y.layout.LayoutGraph
z
Fields inherited from class y.base.Graph
AFTER, BEFORE
-
Constructor Summary
ConstructorDescriptionBaseGraph
(AbstractDiagramPresentationElement diagramView, boolean supportsSubgraph, Set<PresentationElement> selected) Deprecated.supportsSubgraph has no effectBaseGraph
(AbstractDiagramPresentationElement diagramView, boolean supportsSubgraph, Set<PresentationElement> selected, boolean resetLabelPositions) Deprecated.supportsSubgraph has no effectBaseGraph
(AbstractDiagramPresentationElement diagramView, Set<PresentationElement> selected) Construct a graph with given parameterBaseGraph
(AbstractDiagramPresentationElement diagramView, Set<PresentationElement> selected, boolean resetLabelPositions) -
Method Summary
Modifier and TypeMethodDescriptionint
int
void
Collects all data provided by diagram to nodes and edges.void
setCreateEdgeLabels
(int createEdgeLabels) Sets the label creation mode.void
setCreateNodeLabels
(boolean shouldCreateNodeLabels) void
setPlaceEdgeLabelsTo
(int placeEdgeLabelsTo) Sets the calculated label placement for labels.void
setPlaceNodeLabels
(boolean shouldPlaceNodeLabelsToCalculatedPositions) boolean
boolean
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 Details
-
BaseGraph
@OpenApi public BaseGraph(AbstractDiagramPresentationElement diagramView, Set<PresentationElement> selected) Construct a graph with given parameter- Parameters:
diagramView
- diagram for which to construct graph.selected
- selected elements
-
BaseGraph
@Deprecated @OpenApi public BaseGraph(AbstractDiagramPresentationElement diagramView, boolean supportsSubgraph, Set<PresentationElement> selected) Deprecated.supportsSubgraph has no effect -
BaseGraph
@OpenApi public BaseGraph(AbstractDiagramPresentationElement diagramView, Set<PresentationElement> selected, boolean resetLabelPositions) -
BaseGraph
@Deprecated @OpenApi public BaseGraph(AbstractDiagramPresentationElement diagramView, boolean supportsSubgraph, Set<PresentationElement> selected, boolean resetLabelPositions) Deprecated.supportsSubgraph has no effect
-
-
Method Details
-
initializeData
@OpenApi public void initializeData()Collects all data provided by diagram to nodes and edges. -
setPlaceEdgeLabelsTo
@OpenApi public void setPlaceEdgeLabelsTo(int placeEdgeLabelsTo) Sets the calculated label placement for labels. Labels can be created for consideration only, but not placed at the calculated location. One of EDGE_LABEL_NONE, EDGE_LABEL_AT_ENDS, EDGE_LABEL_NON_ENDS , EDGE_LABEL_ALL. EDGE_LABEL_ALL by default.- Parameters:
placeEdgeLabelsTo
- the edge placement mode
-
getPlaceEdgeLabelsPositions
@OpenApi public int getPlaceEdgeLabelsPositions()- Returns:
- the edge placement mode
-
setCreateEdgeLabels
@OpenApi public void setCreateEdgeLabels(int createEdgeLabels) Sets the label creation mode. One of EDGE_LABEL_NONE, EDGE_LABEL_AT_ENDS, EDGE_LABEL_NON_ENDS , EDGE_LABEL_ALL. EDGE_LABEL_ALL by default.- Parameters:
createEdgeLabels
- edge placement mode
-
getCreateEdgeLabels
@OpenApi public int getCreateEdgeLabels()- Returns:
- the edge creation mode
-
setPlaceNodeLabels
@OpenApi public void setPlaceNodeLabels(boolean shouldPlaceNodeLabelsToCalculatedPositions) - Parameters:
shouldPlaceNodeLabelsToCalculatedPositions
- determines if node labels should be placed at the calculated graph position
-
shouldPlaceNodeLabels
@OpenApi public boolean shouldPlaceNodeLabels()- Returns:
- true if node labels should be set at the calculated position, false for the default position
-
setCreateNodeLabels
@OpenApi public void setCreateNodeLabels(boolean shouldCreateNodeLabels) - Parameters:
shouldCreateNodeLabels
- determines if node labels should be created and considered by the graph
-
shouldCreateNodeLabels
@OpenApi public boolean shouldCreateNodeLabels()- Returns:
- the node label creation mode
-