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 classGraph.BuilderTheGraph.Buildercan be used to construct a newGraphlittle by little.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEDGES_PROPERTYThe name of theedgesProperty property.static java.lang.StringNODES_PROPERTYThe 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 newGraphfrom 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 newGraphfrom 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.NodegetNestingNode()javafx.collections.ObservableList<Node>getNodes()Returns the nodes of this Graph.GraphgetRootGraph()Returns the root graph of this Graph.javafx.beans.property.ReadOnlyListProperty<Node>nodesProperty()voidsetNestingNode(Node nestingNode)java.lang.StringtoString()
-
-
-
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:
attributesPropertyin 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:
getAttributesin 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:
toStringin classjava.lang.Object
-
-