public class GraphLayoutContext extends AbstractLayoutContext
GraphLayoutContext
is a Graph
-specific
ILayoutContext
implementation. It adapts GEF4 Graph to GEF4 Layout.pcs, pss
DYNAMIC_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 GraphNodeLayout s and GraphEdgeLayout s for
the Node s and Edge s 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, unschedulePreLayoutPass
public GraphLayoutContext()
GraphLayoutContext
without nodes and edges.public GraphLayoutContext(Graph graph)
GraphLayoutContext
from the given Graph
.
The Node
s and Edge
s of the Graph
are transfered
into GraphNodeLayout
s and GraphEdgeLayout
s.graph
- The Graph
that is transfered.public ISubgraphLayout createSubgraph(INodeLayout[] nodes)
public IConnectionLayout[] getConnections()
getConnections
in interface ILayoutContext
getConnections
in class AbstractLayoutContext
public 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 ILayoutContext
getNodes
in class AbstractLayoutContext
public void setGraph(Graph graph)
Graph
into this GraphLayoutContext
,
i.e. creates GraphNodeLayout
s and GraphEdgeLayout
s for
the Node
s and Edge
s of the given Graph
.graph
- The Graph
that is transfered into this
GraphLayoutContext
.Copyright (c) 2014 itemis AG and others. All rights reserved.