Package org.eclipse.gef.graph
Class Graph
- java.lang.Object
-
- org.eclipse.gef.graph.Graph
-
- All Implemented Interfaces:
org.eclipse.gef.common.attributes.IAttributeStore
public final class Graph extends java.lang.Object implements org.eclipse.gef.common.attributes.IAttributeStore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Graph.Builder
TheGraph.Builder
can be used to construct a newGraph
little by little.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EDGES_PROPERTY
The name of theedgesProperty property
.static java.lang.String
NODES_PROPERTY
The name of thenodes property
.
-
Constructor Summary
Constructors Constructor Description Graph()
Default constructor, using empty collections for attributes, nodes, and edges.Graph(java.util.Collection<? extends Node> nodes, java.util.Collection<? extends Edge> edges)
Constructs a newGraph
from the given nodes, and edges but empty attributes.Graph(java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Collection<? extends Node> nodes, java.util.Collection<? extends Edge> edges)
Constructs a newGraph
from the given attributes, nodes, and edgesProperty.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object>
attributesProperty()
javafx.beans.property.ReadOnlyListProperty<Edge>
edgesProperty()
javafx.collections.ObservableMap<java.lang.String,java.lang.Object>
getAttributes()
javafx.collections.ObservableList<Edge>
getEdges()
Returns the edgesProperty of thisGraph
.Node
getNestingNode()
javafx.collections.ObservableList<Node>
getNodes()
Returns the nodes of this Graph.Graph
getRootGraph()
Returns the root graph of this Graph.javafx.beans.property.ReadOnlyListProperty<Node>
nodesProperty()
void
setNestingNode(Node nestingNode)
java.lang.String
toString()
-
-
-
Field Detail
-
NODES_PROPERTY
public static final java.lang.String NODES_PROPERTY
The name of thenodes property
.- See Also:
- Constant Field Values
-
EDGES_PROPERTY
public static final java.lang.String EDGES_PROPERTY
The name of theedgesProperty property
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Graph
public Graph()
Default constructor, using empty collections for attributes, nodes, and edges.
-
Graph
public Graph(java.util.Collection<? extends Node> nodes, java.util.Collection<? extends Edge> edges)
-
-
Method Detail
-
attributesProperty
public javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object> attributesProperty()
- Specified by:
attributesProperty
in interfaceorg.eclipse.gef.common.attributes.IAttributeStore
-
edgesProperty
public javafx.beans.property.ReadOnlyListProperty<Edge> edgesProperty()
-
getAttributes
public javafx.collections.ObservableMap<java.lang.String,java.lang.Object> getAttributes()
- Specified by:
getAttributes
in interfaceorg.eclipse.gef.common.attributes.IAttributeStore
-
getEdges
public javafx.collections.ObservableList<Edge> getEdges()
Returns the edgesProperty of thisGraph
.- Returns:
- A list containing the edgesProperty.
-
getNestingNode
public Node getNestingNode()
-
getNodes
public javafx.collections.ObservableList<Node> getNodes()
Returns the nodes of this Graph.- Returns:
- A list containing the nodes.
-
getRootGraph
public Graph getRootGraph()
Returns the root graph of this Graph.- Returns:
- the root graph of this graph.
-
nodesProperty
public javafx.beans.property.ReadOnlyListProperty<Node> nodesProperty()
- Returns:
- A read-only list property.
-
setNestingNode
public void setNestingNode(Node nestingNode)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-