public class GraphLayoutContext extends AbstractLayoutContext
GraphLayoutContext is a Graph-specific
ILayoutContext implementation. It adapts GEF4 Graph to GEF4 Layout.pcs, pssDYNAMIC_LAYOUT_ALGORITHM_PROPERTY, STATIC_LAYOUT_ALGORITHM_PROPERTY| Constructor and Description |
|---|
GraphLayoutContext()
Constructs a new
GraphLayoutContext without nodes and edges. |
GraphLayoutContext(Graph graph)
Constructs a new
GraphLayoutContext from the given Graph. |
| Modifier and Type | Method and Description |
|---|---|
ISubgraphLayout |
createSubgraph(INodeLayout[] nodes) |
IConnectionLayout[] |
getConnections() |
GraphEdgeLayout |
getEdgeLayout(Edge edge)
Returns the
GraphEdgeLayout corresponding to the given
Edge. |
IEntityLayout[] |
getEntities() |
Graph |
getGraph()
Returns the transfered
Graph. |
GraphNodeLayout |
getNodeLayout(Node node)
Returns the
GraphNodeLayout corresponding to the given
Node. |
INodeLayout[] |
getNodes() |
void |
setGraph(Graph graph)
Transfers the given
Graph into this GraphLayoutContext,
i.e. creates GraphNodeLayouts and GraphEdgeLayouts for
the Nodes and Edges of the given Graph. |
addContextListener, addEdge, addGraphStructureListener, addLayoutFilter, addLayoutListener, addNode, addPropertyChangeListener, addPruningListener, applyDynamicLayout, applyStaticLayout, clearEdges, clearNodes, doFlushChanges, fireBackgroundEnableChangedEvent, fireBoundsChangedEvent, fireConnectionAddedEvent, fireConnectionRemovedEvent, fireNodeAddedEvent, fireNodeMovedEvent, fireNodeRemovedEvent, fireNodeResizedEvent, firePruningEnableChangedEvent, fireSubgraphMovedEvent, fireSubgraphResizedEvent, flushChanges, getConnections, getDynamicLayoutAlgorithm, getProperty, getStaticLayoutAlgorithm, getSubgraphs, isLayoutIrrelevant, isLayoutIrrelevant, removeContextListener, removeEdge, removeGraphStructureListener, removeLayoutFilter, removeLayoutListener, removeNode, removePropertyChangeListener, removePruningListener, schedulePostLayoutPass, schedulePreLayoutPass, setDynamicLayoutAlgorithm, setProperty, setStaticLayoutAlgorithm, unschedulePostLayoutPass, unschedulePreLayoutPasspublic GraphLayoutContext()
GraphLayoutContext without nodes and edges.public GraphLayoutContext(Graph graph)
GraphLayoutContext from the given Graph.
The Nodes and Edges of the Graph are transfered
into GraphNodeLayouts and GraphEdgeLayouts.graph - The Graph that is transfered.public ISubgraphLayout createSubgraph(INodeLayout[] nodes)
public IConnectionLayout[] getConnections()
getConnections in interface ILayoutContextgetConnections in class AbstractLayoutContextpublic GraphEdgeLayout getEdgeLayout(Edge edge)
GraphEdgeLayout corresponding to the given
Edge.edge - The Edge for which to return the corresponding
GraphEdgeLayout.GraphEdgeLayout corresponding to the given
Edge.public IEntityLayout[] getEntities()
public GraphNodeLayout getNodeLayout(Node node)
GraphNodeLayout corresponding to the given
Node.node - The Node for which to return the corrsponding
GraphNodeLayout.GraphNodeLayout corresponding to the given
Node.public INodeLayout[] getNodes()
getNodes in interface ILayoutContextgetNodes in class AbstractLayoutContextpublic void setGraph(Graph graph)
Graph into this GraphLayoutContext,
i.e. creates GraphNodeLayouts and GraphEdgeLayouts for
the Nodes and Edges of the given Graph.graph - The Graph that is transfered into this
GraphLayoutContext.Copyright (c) 2014 itemis AG and others. All rights reserved.