Documentation of 'org.jgraph.graph.DefaultPort' Java class
DefaultPort
org.jgraph.graph

Class DefaultPort

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode, GraphCell, Port


    public class DefaultPort
    extends DefaultGraphCell
    implements Port
    A simple implementation for a port.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.tree.DefaultMutableTreeNode

        EMPTY_ENUMERATION
    • Constructor Summary

      Constructors 
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class javax.swing.tree.DefaultMutableTreeNode

        add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, 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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultPort

        public DefaultPort()
        Constructs an empty port.
      • DefaultPort

        public DefaultPort(java.lang.Object userObject)
        Constructs a port that holds a reference to the specified user object.
        Parameters:
        userObject - reference to the user object
      • DefaultPort

        public 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.
        Parameters:
        userObject - reference to the user object
        anchor - reference to a graphcell that constitutes the anchor
    • Method Detail

      • edges

        public java.util.Iterator edges()
        Returns an iterator of the edges connected to the port.
        Specified by:
        edges in interface Port
      • addEdge

        public boolean addEdge(java.lang.Object edge)
        Adds edge to the list of edges.
        Specified by:
        addEdge in interface Port
      • removeEdge

        public boolean removeEdge(java.lang.Object edge)
        Removes edge from the list of edges.
        Specified by:
        removeEdge in interface Port
      • getEdges

        public java.util.Set getEdges()
        Returns the collection of edges connected to this port.
      • setEdges

        public void setEdges(java.util.Set edges)
        Sets the collection of edges connected to this port.
      • getAnchor

        public Port getAnchor()
        Returns the anchor of this port.
        Specified by:
        getAnchor in interface Port
      • setAnchor

        public void setAnchor(Port port)
        Sets the anchor of this port.
        Specified by:
        setAnchor in interface Port
      • clone

        public java.lang.Object clone()
        Create a clone of the cell. The cloning of the user object is deferred to the cloneUserObject() method.
        Overrides:
        clone in class DefaultGraphCell
        Returns:
        Object a clone of this object.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.