|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.jgraph.graph.DefaultGraphCell
org.jgraph.graph.DefaultPort
A simple implementation for a port.
| Field Summary | |
protected Port |
anchor
Reference to the anchor of this port |
protected HashSet |
edges
Edges that are connected to the port |
| Fields inherited from class org.jgraph.graph.DefaultGraphCell |
attributes |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
DefaultPort()
Constructs an empty port. |
|
DefaultPort(Object userObject)
Constructs a port that holds a reference to the specified user object. |
|
DefaultPort(Object userObject,
Port anchor)
Constructs a port that holds a reference to the specified user object and a reference to the specified anchor. |
|
| Method Summary | |
boolean |
addEdge(Object edge)
Adds edge to the list of edges. |
Object |
clone()
Create a clone of the cell. |
Iterator |
edges()
Returns an iterator of the edges connected to the port. |
Port |
getAnchor()
Returns the anchor of this port. |
Set |
getEdges()
Returns the collection of edges connected to this port. |
boolean |
removeEdge(Object edge)
Removes edge from the list of edges. |
void |
setAnchor(Port port)
Sets the anchor of this port. |
void |
setEdges(Set edges)
Sets the collection of edges connected to this port. |
| Methods inherited from class org.jgraph.graph.DefaultGraphCell |
addPort, addPort, addPort, changeAttributes, getAttributes, getChildren, setAttributes |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jgraph.graph.GraphCell |
changeAttributes, getAttributes, setAttributes |
| Field Detail |
protected HashSet edges
protected Port anchor
| Constructor Detail |
public DefaultPort()
public DefaultPort(Object userObject)
userObject - reference to the user object
public DefaultPort(Object userObject,
Port anchor)
userObject - reference to the user objectanchor - reference to a graphcell that constitutes the anchor| Method Detail |
public Iterator edges()
edges in interface Portpublic boolean addEdge(Object edge)
edge to the list of edges.
addEdge in interface Portpublic boolean removeEdge(Object edge)
edge from the list of edges.
removeEdge in interface Portpublic Set getEdges()
public void setEdges(Set edges)
public Port getAnchor()
getAnchor in interface Portpublic void setAnchor(Port port)
setAnchor in interface Portpublic Object clone()
clone in class DefaultGraphCell
|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||