Class Tableau

    • Field Detail

      • size

        public SizeAttribute size
        A specification for the size of the frame.
      • _debugClosing

        protected boolean _debugClosing
        Set to true to print closing sequence information to standard out.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        If the argument is the size parameter, and a frame has been specified with setFrame(), then set the size of the frame.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the size specification is not correctly formatted, or if the base class throws it.
      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Clone the object into the specified workspace. This calls the base class and then sets the associated frame to null. Thus, the resulting tableau has no frame associated with it.
        Overrides:
        clone in class CompositeEntity
        Parameters:
        workspace - The workspace for the new object.
        Returns:
        A new object.
        Throws:
        java.lang.CloneNotSupportedException - If a derived class contains an attribute that cannot be cloned.
        See Also:
        NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)
      • close

        public boolean close()
        Close this tableau by calling dispose() on the associated frame, or if the associated frame is an instance of TableauFrame, by calling _close() on it.
        Returns:
        False if the user cancels on a save query.
      • getFrame

        public javax.swing.JFrame getFrame()
        Return the top-level window that implements the display of this tableau.
        Returns:
        A top-level window.
        See Also:
        setFrame(JFrame)
      • getTitle

        public java.lang.String getTitle()
        Return the title of this tableau. Subclasses can override this to provide a better description of themselves for use in the title. This base class returns the value set by a call to setTitle(), if it has been called. If not, then it returns an identifier of the effigy containing this tableau, or the string "Unnamed" if there is no such identifier. The title is used as the title of the top-level window in the setFrame() method.
        Returns:
        The title to put on the window.
        See Also:
        setTitle(String)
      • isEditable

        public boolean isEditable()
        Return true if the tableau is editable. This base class returns whatever value has been set by setEditable(), or true if none has been specified.
        Returns:
        True if the tableau is editable.
        See Also:
        setEditable(boolean)
      • isMaster

        public boolean isMaster()
        Return true if this tableau is a master, which means that if that if its window is closed, then all other windows associated with the model are also closed. A tableau is a master if its container effigy is a master (its masterEffigy() method returns itself).
        Returns:
        True if the tableau is a master.
      • setContainer

        public void setContainer​(CompositeEntity container)
                          throws IllegalActionException,
                                 NameDuplicationException
        Override the base class so that if the argument is null and the window is a master, then all other windows associated with the container are closed and the model is removed from the ModelDirectory. If this window is not a master, but after removing it there are no more windows associated with the model, then also remove it from the ModelDirectory.
        Overrides:
        setContainer in class CompositeEntity
        Parameters:
        container - The container to attach this attribute to.
        Throws:
        IllegalActionException - If the proposed container is not an instance of Effigy, or if this attribute is not of the expected class for the container, or it has no name, or the attribute and container are not in the same workspace, or the proposed container would result in recursive containment.
        NameDuplicationException - If the container already has an attribute with the name of this attribute.
        See Also:
        ComponentEntity.getContainer()
      • setEditable

        public void setEditable​(boolean flag)
        Make the tableau editable or uneditable. Notice that this does not change whether the effigy is modifiable, so other tableaux on the same effigy may still modify the associated file. Derived class will usually need to override this method to set whether their associated interfaces are editable or not. They should call this superclass method so that isEditable() returns the value specified here.
        Parameters:
        flag - False to make the tableau uneditable.
        See Also:
        isEditable()
      • setFrame

        public void setFrame​(javax.swing.JFrame frame)
                      throws IllegalActionException
        Set the top-level window associated with this tableau.
        Parameters:
        frame - The top-level window associated with the tableau.
        Throws:
        IllegalActionException - If the frame is not acceptable (not thrown in this base class).
        See Also:
        getFrame()
      • setMaster

        public void setMaster​(boolean flag)
        Specify whether the window associated with this tableau is a master, which means that if that window is closed, then all windows associated with the model are closed.
        Parameters:
        flag - If true, makes the window a master.
      • setTitle

        public void setTitle​(java.lang.String title)
        Set the title of this tableau, changing the title of the associated top-level window. Call this with a null argument to use the identifier of the containing effigy as a title.
        Parameters:
        title - The title to put on the window.
        See Also:
        getTitle()
      • show

        public void show()
        Make this tableau visible by calling setVisible(true), and raising or deiconifying its window. If no frame has been set, then do nothing.