Class AttributeNodeModel

  • All Implemented Interfaces:
    NodeModel

    public class AttributeNodeModel
    extends NamedObjNodeModel
    A model for an attribute as a diva graph node. This is used for visible attributes.
    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Steve Neuendorffer and Edward A. Lee
    Pt.AcceptedRating:
    Red (reviewmoderator)
    Pt.ProposedRating:
    Red (yourname)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDeleteNodeMoML​(java.lang.Object node)
      Return a MoML String that will delete the given node from the Ptolemy model.
      java.lang.Object getParent​(java.lang.Object node)
      Return the graph parent of the given node.
      java.util.Iterator inEdges​(java.lang.Object node)
      Return an iterator over the edges coming into the given node.
      java.util.Iterator outEdges​(java.lang.Object node)
      Return an iterator over the edges coming out of the given node.
      void removeNode​(java.lang.Object eventSource, java.lang.Object node)
      Remove the given node from the model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttributeNodeModel

        public AttributeNodeModel()
    • Method Detail

      • getDeleteNodeMoML

        public java.lang.String getDeleteNodeMoML​(java.lang.Object node)
        Return a MoML String that will delete the given node from the Ptolemy model.
        Specified by:
        getDeleteNodeMoML in class NamedObjNodeModel
        Parameters:
        node - The node to be deleted.
        Returns:
        A valid MoML string.
      • getParent

        public java.lang.Object getParent​(java.lang.Object node)
        Return the graph parent of the given node.
        Parameters:
        node - The node, which is assumed to be an instance of Locatable.
        Returns:
        The container of the location's container, which should be the root of the graph.
      • inEdges

        public java.util.Iterator inEdges​(java.lang.Object node)
        Return an iterator over the edges coming into the given node.
        Parameters:
        node - The node.
        Returns:
        A NullIterator, since no edges are attached to attributes.
      • outEdges

        public java.util.Iterator outEdges​(java.lang.Object node)
        Return an iterator over the edges coming out of the given node.
        Parameters:
        node - The node.
        Returns:
        A NullIterator, since no edges are attached to attributes.
      • removeNode

        public void removeNode​(java.lang.Object eventSource,
                               java.lang.Object node)
        Remove the given node from the model. The node is assumed to be an instance of Locatable belonging to an attribute. The removal is accomplished by queueing a change request with the container.
        Specified by:
        removeNode in class NamedObjNodeModel
        Parameters:
        eventSource - The source of the remove event (ignored).
        node - The node.