|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.graph.core.GraphElement | +--gishur.graph.core.Node
Basic node class for Graphs
. Most of its functionality is
inherited from GraphElement
, e.g. the methods for connections to
other GraphElements
(which may here only be Edges
).
Fields inherited from class gishur.graph.core.GraphElement |
ACCESS_CONNECT, ACCESS_REMOVE, BOTH, DETAILED, IN, LINK_ALL, NORMAL, OUT, SET_KEY, SET_VALUE, SHORT, VERY_DETAILED |
Fields inherited from interface gishur.core.ControlledCloneable |
DEEP, FLAT |
Constructor Summary | |
Node()
Empty constructor, returns a new automatically named Node . |
|
Node(int i)
Constructs a Node with the i 'th automatically generated name. |
|
Node(java.lang.String name)
Constructor returning a Node named with the given name . |
|
Node(java.lang.String name,
java.lang.Object key)
Constructor returning a Node named with the given name
and with key key . |
|
Node(java.lang.String name,
java.lang.Object key,
java.lang.Object value)
Constructor returning a Node named with the given name
and with key key and value value . |
Method Summary | |
protected boolean |
checkAccess(int access,
java.lang.Object argument)
Overrides GraphElement.checkAccess(int, java.lang.Object) . |
int |
degree(Graph g)
Returns the number of Edges connected to this Node . |
static java.lang.String |
generateName(int i)
Get generic name. |
int |
inDegree(Graph g)
Returns the number of ingoing Edges from this Node . |
int |
outDegree(Graph g)
Returns the number of outgoing Edges from this Node . |
java.lang.Object |
preferredPosition()
Returns the preferred position of this Node . |
void |
setPreferredPosition(java.lang.Object position)
Sets the preferred position for Visualizations. |
java.lang.String |
toString(int level)
Returns a string representation of this Edge in a definable level of
detail. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Node()
Node
.public Node(int i)
Node
with the i
'th automatically generated name.public Node(java.lang.String name)
Node
named with the given name
.public Node(java.lang.String name, java.lang.Object key)
Node
named with the given name
and with key key
.public Node(java.lang.String name, java.lang.Object key, java.lang.Object value)
Node
named with the given name
and with key key
and value value
.Method Detail |
public static final java.lang.String generateName(int i)
i
- the instancenumberpublic java.lang.String toString(int level)
Edge
in a definable level of
detail. level
can be one of the constants GraphElement.SHORT
,GraphElement.NORMAL
,
GraphElement.DETAILED
or GraphElement.VERY_DETAILED
. For information about these
levels, see GraphElement.toString(int)
.toString
in class GraphElement
level
- the requested level of detail: GraphElement.SHORT
,GraphElement.NORMAL
,
GraphElement.DETAILED
or GraphElement.VERY_DETAILED
Edge
public void setPreferredPosition(java.lang.Object position)
position
- the position informationpublic java.lang.Object preferredPosition()
this
Node
.this
Node
.public int inDegree(Graph g)
Edges
from this Node
.public int outDegree(Graph g)
Edges
from this Node
.public int degree(Graph g)
Edges
connected to this Node
.protected boolean checkAccess(int access, java.lang.Object argument)
GraphElement.checkAccess(int, java.lang.Object)
. The method returns
true
, if argument
is of type Edge
,
false
otherwise.checkAccess
in class GraphElement
access
- an access constant specifying the requested operationargument
- the argument of the requested operationtrue
, if the operation is allowed, false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |