public class DefaultPort extends DefaultGraphCell implements Port
Modifier and Type | Field and Description |
---|---|
protected Port |
anchor
Reference to the anchor of this port
|
protected java.util.HashSet |
edges
Edges that are connected to the port
|
attributes
Constructor and Description |
---|
DefaultPort()
Constructs an empty port.
|
DefaultPort(java.lang.Object userObject)
Constructs a port that holds a reference to the specified user object.
|
DefaultPort(java.lang.Object userObject,
Port anchor)
Constructs a port that holds a reference to the specified user object
and a reference to the specified anchor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEdge(java.lang.Object edge)
Adds
edge to the list of edges. |
java.lang.Object |
clone()
Create a clone of the cell.
|
java.util.Iterator |
edges()
Returns an iterator of the edges connected
to the port.
|
Port |
getAnchor()
Returns the anchor of this port.
|
java.util.Set |
getEdges()
Returns the collection of edges connected to this port.
|
boolean |
removeEdge(java.lang.Object edge)
Removes
edge from the list of edges. |
void |
setAnchor(Port port)
Sets the anchor of this port.
|
void |
setEdges(java.util.Set edges)
Sets the collection of edges connected to this port.
|
addPort, addPort, addPort, changeAttributes, getAttributes, getChildren, setAttributes
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
changeAttributes, getAttributes, setAttributes
protected java.util.HashSet edges
protected Port anchor
public DefaultPort()
public DefaultPort(java.lang.Object userObject)
userObject
- reference to the user objectpublic DefaultPort(java.lang.Object userObject, Port anchor)
userObject
- reference to the user objectanchor
- reference to a graphcell that constitutes the anchorpublic java.util.Iterator edges()
public boolean addEdge(java.lang.Object edge)
edge
to the list of edges.public boolean removeEdge(java.lang.Object edge)
edge
from the list of edges.removeEdge
in interface Port
public java.util.Set getEdges()
public void setEdges(java.util.Set edges)
public Port getAnchor()
public void setAnchor(Port port)
public java.lang.Object clone()
clone
in class DefaultGraphCell
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.