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 |
layoutAlgorithmLAYOUT_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 GraphNodeLayouts and GraphEdgeLayouts for
the Nodes and Edges of the given Graph. |
addEdge, addLayoutFilter, addNode, applyLayout, clearEdges, clearNodes, flushChanges, getConnections, getLayoutAlgorithm, isLayoutIrrelevant, isLayoutIrrelevant, layoutAlgorithmProperty, removeEdge, removeLayoutFilter, removeNode, schedulePostLayoutPass, schedulePreLayoutPass, setLayoutAlgorithm, unschedulePostLayoutPass, unschedulePreLayoutPasspublic 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 Nodes and Edges of the Graph are transfered
into GraphNodeLayouts and GraphEdgeLayouts.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 ILayoutContextgetEdges in class AbstractLayoutContextpublic 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 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.