public class GraphLayoutContext extends AbstractLayoutContext
GraphLayoutContext
is a Graph
-specific
ILayoutContext
implementation. It adapts GEF4 Graph to GEF4 Layout.Type | Property and Description |
---|---|
javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object> |
attributes |
layoutAlgorithm
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 |
---|---|
javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object> |
attributesProperty() |
javafx.collections.ObservableMap<java.lang.String,java.lang.Object> |
getAttributes()
Gets the value of the property attributes.
|
GraphEdgeLayout |
getEdgeLayout(Edge edge)
Returns the
GraphEdgeLayout corresponding to the given
Edge . |
IEdgeLayout[] |
getEdges() |
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 . |
addEdge, addLayoutFilter, addNode, applyLayout, clearEdges, clearNodes, flushChanges, getConnections, getLayoutAlgorithm, isLayoutIrrelevant, isLayoutIrrelevant, layoutAlgorithmProperty, removeEdge, removeLayoutFilter, removeNode, schedulePostLayoutPass, schedulePreLayoutPass, setLayoutAlgorithm, unschedulePostLayoutPass, unschedulePreLayoutPass
public javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object> attributesProperty
getAttributes()
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 javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object> attributesProperty()
getAttributes()
public javafx.collections.ObservableMap<java.lang.String,java.lang.Object> getAttributes()
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 IEdgeLayout[] getEdges()
getEdges
in interface ILayoutContext
getEdges
in class AbstractLayoutContext
public GraphNodeLayout getNodeLayout(Node node)
GraphNodeLayout
corresponding to the given
Node
.node
- The Node
for which to return the corresponding
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.