|
||||||||||
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
public class DefaultPort
A simple implementation for a port.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jgraph.graph.DefaultGraphCell |
---|
DefaultGraphCell.ValueChangeHandler |
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, defaultBounds |
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 vertex that holds a reference to the specified user object. |
|
DefaultPort(Object userObject,
Port anchor)
Constructs a vertex 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 ports. |
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 anchor of this port. |
boolean |
removeEdge(Object edge)
Removes edge from the list of ports. |
void |
setAnchor(Port port)
Sets the anchor of this port. |
void |
setEdges(Set edges)
Sets the anchor of this port. |
Methods inherited from class org.jgraph.graph.DefaultGraphCell |
---|
changeAttributes, cloneUserObject, getAttributes, getChildren, setAttributes, setUserObject |
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 objectpublic DefaultPort(Object userObject, Port anchor)
userObject
- reference to the user objectanchor
- to a a graphcell that constitutes the anchorMethod Detail |
---|
public Iterator edges()
edges
in interface Port
public boolean addEdge(Object edge)
edge
to the list of ports.
addEdge
in interface Port
public boolean removeEdge(Object edge)
edge
from the list of ports.
removeEdge
in interface Port
public Set getEdges()
public void setEdges(Set edges)
public Port getAnchor()
getAnchor
in interface Port
public void setAnchor(Port port)
setAnchor
in interface Port
public Object clone()
clone
in class DefaultGraphCell
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |