Class CaseGraphFrame

  • All Implemented Interfaces:
    java.awt.datatransfer.ClipboardOwner, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.WindowFocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants, ImageExportable, ChangeListener, StatusHandler, HTMLExportable

    public class CaseGraphFrame
    extends ActorGraphFrame
    implements javax.swing.event.ChangeListener
    This is a graph editor frame for ptolemy case models.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    See Also:
    Serialized Form
    Pt.AcceptedRating:
    Red (johnr)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • _caseMenu

        protected javax.swing.JMenu _caseMenu
        The case menu.
    • Constructor Detail

      • CaseGraphFrame

        public CaseGraphFrame​(Case entity,
                              Tableau tableau)
        Construct a frame associated with the specified case actor. After constructing this, it is necessary to call setVisible(true) to make the frame appear. This is typically done by calling show() on the controlling tableau. This constructor results in a graph frame that obtains its library either from the model (if it has one) or the default library defined in the configuration.
        Parameters:
        entity - The model to put in this frame.
        tableau - The tableau responsible for this frame.
        See Also:
        Tableau.show()
      • CaseGraphFrame

        public CaseGraphFrame​(Case entity,
                              Tableau tableau,
                              LibraryAttribute defaultLibrary)
        Construct a frame associated with the specified case actor. After constructing this, it is necessary to call setVisible(true) to make the frame appear. This is typically done by calling show() on the controlling tableau. This constructor results in a graph frame that obtains its library either from the model (if it has one), or the defaultLibrary argument (if it is non-null), or the default library defined in the configuration.
        Parameters:
        entity - The model to put in this frame.
        tableau - The tableau responsible for this frame.
        defaultLibrary - An attribute specifying the default library to use if the model does not have a library.
        See Also:
        Tableau.show()
    • Method Detail

      • openContainer

        public void openContainer()
        Open the container, if any, of the entity. If this entity has no container, then do nothing.
        Overrides:
        openContainer in class BasicGraphFrame
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent event)
        React to a change in the state of the tabbed pane.
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
        Parameters:
        event - The event.
      • _addMenus

        protected void _addMenus()
        Create the menus that are used by this frame. It is essential that _createGraphPane() be called before this.
        Overrides:
        _addMenus in class ActorGraphFrame
      • _createGraphPane

        protected GraphPane _createGraphPane​(NamedObj entity)
        Create a new graph pane. Note that this method is called in constructor of the base class, so it must be careful to not reference local variables that may not have yet been created. This overrides the base class to create a specialized graph controller (an inner class).
        Overrides:
        _createGraphPane in class ActorGraphFrame
        Parameters:
        entity - The object to be displayed in the pane.
        Returns:
        The pane that is created.
      • _createRightComponent

        protected javax.swing.JComponent _createRightComponent​(NamedObj entity)
        Create the component that goes to the right of the library. NOTE: This is called in the base class constructor, before things have been initialized. Hence, it cannot reference local variables.
        Overrides:
        _createRightComponent in class BasicGraphFrame
        Parameters:
        entity - The entity to display in the component.
        Returns:
        The component that goes to the right of the library.