|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.kernel.CompositeEntity
ptolemy.actor.gui.Tableau
public class Tableau
A tableau is a visual representation of a Ptolemy II model in a top-level window. This class represents such a top level window. The top-level is always a frame, which is a window with a border and title bar. The window itself is specified by the setFrame() method, and accessed by the getFrame() method. An instance of this class will be contained by the instance of Effigy that represents the model that is depicted in the top-level window.
By convention, the constructor for a tableau does not (necessarily) make the associated frame visible. To do that, call show().
Effigy
,
Serialized Form
Red (neuendor) |
Yellow (neuendor) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.CompositeEntity |
---|
CompositeEntity.ContainedObjectsIterator |
Field Summary | |
---|---|
private boolean |
_editable
Flag indicating whether the tableau is editable. |
private javax.swing.JFrame |
_frame
The frame that the tableau is shown in. |
private boolean |
_master
True if this tableau is a master tableau. |
private java.lang.String |
_title
The title set by setTitle(). |
SizeAttribute |
size
A specification for the size of the frame. |
Fields inherited from class ptolemy.kernel.CompositeEntity |
---|
_levelCrossingLinks |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary | |
---|---|
Tableau(CompositeEntity container,
java.lang.String name)
Construct a tableau with the given name and container. |
|
Tableau(Workspace workspace)
Construct a tableau in the specified workspace. |
Method Summary | |
---|---|
void |
attributeChanged(Attribute attribute)
If the argument is the size parameter, and a frame has been specified with setFrame(), then set the size of the frame. |
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace. |
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. |
javax.swing.JFrame |
getFrame()
Return the top-level window that implements the display of this tableau. |
java.lang.String |
getTitle()
Return the title of this tableau. |
boolean |
isEditable()
Return true if the tableau is editable. |
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. |
void |
setContainer(CompositeEntity container)
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. |
void |
setEditable(boolean flag)
Make the tableau editable or uneditable. |
void |
setFrame(javax.swing.JFrame frame)
Set the top-level window associated with this tableau. |
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. |
void |
setTitle(java.lang.String title)
Set the title of this tableau, changing the title of the associated top-level window. |
void |
show()
Make this tableau visible by calling setVisible(true), and raising or deiconifying its window. |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_addPort, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_removePort, connectedPortList, connectedPorts, connectionsChanged, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getDisplayName, getFullName, getName, getName |
Field Detail |
---|
public SizeAttribute size
private boolean _editable
private javax.swing.JFrame _frame
private boolean _master
private java.lang.String _title
Constructor Detail |
---|
public Tableau(Workspace workspace) throws IllegalActionException, NameDuplicationException
workspace
- The workspace.
IllegalActionException
- If an error occurs creating
the size attribute (should not occur).
NameDuplicationException
- If the base class has already
created an attribute with name "size" (should not occur).public Tableau(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the tableau.
IllegalActionException
- If the tableau cannot be contained
by the proposed container.
NameDuplicationException
- If the name coincides with
an entity already in the container.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the size
specification is not correctly formatted, or if the base
class throws it.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class CompositeEntity
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public boolean close()
public javax.swing.JFrame getFrame()
setFrame(JFrame)
public java.lang.String getTitle()
setTitle(String)
public boolean isEditable()
setEditable(boolean)
public boolean isMaster()
public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer
in class CompositeEntity
container
- The container to attach this attribute to.
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.ComponentEntity.getContainer()
public void setEditable(boolean flag)
flag
- False to make the tableau uneditable.isEditable()
public void setFrame(javax.swing.JFrame frame) throws IllegalActionException
frame
- The top-level window associated with the tableau.
IllegalActionException
- If the frame is not acceptable
(not thrown in this base class).getFrame()
public void setMaster(boolean flag)
flag
- If true, makes the window a master.public void setTitle(java.lang.String title)
title
- The title to put on the window.getTitle()
public void show()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |