Package org.eclipse.gef.graph
Class Node
- java.lang.Object
-
- org.eclipse.gef.graph.Node
-
- All Implemented Interfaces:
org.eclipse.gef.common.attributes.IAttributeStore
public class Node extends java.lang.Object implements org.eclipse.gef.common.attributes.IAttributeStore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Node.Builder
TheNode.Builder
can be used to construct aNode
little by little.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ReadOnlyMapProperty<java.lang.String,java.lang.Object>
attributesProperty()
java.util.Set<Edge>
getAllIncomingEdges()
java.util.Set<Node>
getAllNeighbors()
Returns all neighbors of thisNode
.java.util.Set<Edge>
getAllOutgoingEdges()
java.util.Set<Node>
getAllPredecessorNodes()
java.util.Set<Node>
getAllSuccessorNodes()
javafx.collections.ObservableMap<java.lang.String,java.lang.Object>
getAttributes()
Graph
getGraph()
java.util.Set<Edge>
getIncomingEdges()
java.util.Set<Node>
getNeighbors()
Returns all (local) neighbors of thisNode
, i.e. the union of thegetPredecessorNodes()
andgetSuccessorNodes()
.Graph
getNestedGraph()
java.util.Set<Edge>
getOutgoingEdges()
java.util.Set<Node>
getPredecessorNodes()
java.util.Set<Node>
getSuccessorNodes()
void
setNestedGraph(Graph nestedGraph)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Node
public Node()
Constructs a newNode
.
-
Node
public Node(java.util.Map<java.lang.String,java.lang.Object> attributes)
Constructs a newNode
and copies the given attributesProperty into theattributesProperty map
of thisNode
.- Parameters:
attributes
- AMap
containing the attributesProperty which are copied into theattributesProperty map
of thisNode
.
-
-
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
-
getAllIncomingEdges
public java.util.Set<Edge> getAllIncomingEdges()
Returns all incomingEdge
s of thisNode
. The full graph hierarchy is scanned for incoming edges, and not just theassociated graph
.- Returns:
- All incoming
Edge
s.
-
getAllNeighbors
public java.util.Set<Node> getAllNeighbors()
Returns all neighbors of thisNode
. The full graph hierarchy is scanned for neighbors, and not just theassociated graph
.- Returns:
- All neighbors.
-
getAllOutgoingEdges
public java.util.Set<Edge> getAllOutgoingEdges()
Returns all outgoingEdge
s of thisNode
. The full graph hierarchy is scanned for outgoing edges, and not just theassociated graph
.- Returns:
- All outgoing
Edge
s.
-
getAllPredecessorNodes
public java.util.Set<Node> getAllPredecessorNodes()
Returns all predecessorNode
s of thisNode
. The full graph hierarchy is scanned for predecessor nodes, and not just theassociated graph
.- Returns:
- All predecessor
Node
s.
-
getAllSuccessorNodes
public java.util.Set<Node> getAllSuccessorNodes()
Returns all successorNode
s of thisNode
. The full graph hierarchy is scanned for successor nodes, and not just theassociated graph
.- Returns:
- All successor
Node
s.
-
getAttributes
public javafx.collections.ObservableMap<java.lang.String,java.lang.Object> getAttributes()
- Specified by:
getAttributes
in interfaceorg.eclipse.gef.common.attributes.IAttributeStore
-
getIncomingEdges
public java.util.Set<Edge> getIncomingEdges()
Returns the local incomingEdge
s of thisNode
. Only theassociated graph
is scanned for incoming edges, and not the whole graph hierarchy.- Returns:
- The local incoming
Edge
s.
-
getNeighbors
public java.util.Set<Node> getNeighbors()
Returns all (local) neighbors of thisNode
, i.e. the union of thegetPredecessorNodes()
andgetSuccessorNodes()
.- Returns:
- All (local) neighbors of this
Node
.
-
getNestedGraph
public Graph getNestedGraph()
-
getOutgoingEdges
public java.util.Set<Edge> getOutgoingEdges()
Returns the local outgoingEdge
s of thisNode
. Only theassociated graph
is scanned for outgoing edges, and not the whole graph hierarchy.- Returns:
- The local outgoing
Edge
s.
-
getPredecessorNodes
public java.util.Set<Node> getPredecessorNodes()
Returns the local predecessorNode
s of thisNode
. Only theassociated graph
is scanned for predecessor nodes, and not the whole graph hierarchy.- Returns:
- The local predecessor
Node
s.
-
getSuccessorNodes
public java.util.Set<Node> getSuccessorNodes()
Returns the local successorNode
s of thisNode
. Only theassociated graph
is scanned for successor nodes, and not the whole graph hierarchy.- Returns:
- The local successor
Node
s.
-
setNestedGraph
public void setNestedGraph(Graph nestedGraph)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-