public class Tableau extends CompositeEntity
By convention, the constructor for a tableau does not (necessarily) make the associated frame visible. To do that, call show().
Effigy
Modifier and Type | Class and Description |
---|---|
(package private) class |
Tableau.WindowClosedAdapter |
CompositeEntity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected boolean |
_debugClosing
Set to true to print closing sequence information to standard
out.
|
SizeAttribute |
size
A specification for the size of the frame.
|
_levelCrossingLinks
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
_addEntity, _addRelation, _adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _finishedAddEntity, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, isOpaque, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, newRelation, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName
_addPort, _removePort, connectedPortList, connectedPorts, connectionsChanged, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDerivedLevel, getDerivedList, propagateValue
description, getDisplayName, getFullName, getName, getName
public SizeAttribute size
protected boolean _debugClosing
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.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()