thales.actor.gui
Class SingleWindowConfiguration

java.lang.Object
  extended byptolemy.kernel.util.NamedObj
      extended byptolemy.kernel.InstantiableNamedObj
          extended byptolemy.kernel.Entity
              extended byptolemy.kernel.ComponentEntity
                  extended byptolemy.kernel.CompositeEntity
                      extended byptolemy.actor.gui.Configuration
                          extended bythales.actor.gui.SingleWindowConfiguration
All Implemented Interfaces:
Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable

public class SingleWindowConfiguration
extends Configuration

A Configuration that intercept created Tableau, and the content of its Frame into a TabbedPane.

Since:
Ptolemy II 4.0
Version:
$Id: SingleWindowConfiguration.java,v 1.21.2.1 2004/06/18 00:49:32 cxh Exp $
Author:
Jérôme Blanc & Benoit Masson, Thales Research and technology, 01 sept. 2003
See Also:
Serialized Form
Accepted Rating:
Red (cxh)
Proposed Rating:
Yellow (jerome.blanc)

Nested Class Summary
 
Nested classes inherited from class ptolemy.kernel.CompositeEntity
CompositeEntity.ContainedObjectsIterator
 
Field Summary
 
Fields inherited from class ptolemy.actor.gui.Configuration
_DIRECTORY_NAME
 
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Constructor Summary
SingleWindowConfiguration(Workspace workspace)
           
 
Method Summary
protected  PtolemyEffigy createEffigy(PtolemyEffigy container)
           
 Tableau createPrimaryTableau(Effigy effigy)
          Create the first tableau for the given effigy, using the tableau factory.
 Tableau openModel(NamedObj entity)
          Open the specified Ptolemy II model.
 Tableau openModel(java.net.URL base, java.net.URL in, java.lang.String identifier, EffigyFactory factory)
          Open the specified URL using the specified effigy factory.
 
Methods inherited from class ptolemy.actor.gui.Configuration
_removeEntity, findEffigy, getDirectory, getEffigy, openModel, openModel, setContainer, showAll
 
Methods inherited from class ptolemy.kernel.CompositeEntity
_addEntity, _addRelation, _adjustDeferrals, _description, _exportMoMLContents, _finishedAddEntity, _removeRelation, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, clone, connect, connect, containedObjectsIterator, deepEntityList, deepGetEntities, entityList, entityList, exportLinks, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, isOpaque, newRelation, numberOfClassDefinitions, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, uniqueName, validateSettables
 
Methods inherited from class ptolemy.kernel.ComponentEntity
_addPort, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, newPort, propagateExistence, setContainer, setName
 
Methods inherited from class ptolemy.kernel.Entity
_removePort, connectedPortList, connectedPorts, connectionsChanged, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition
 
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace
 
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, getFullName, getName, getName
 

Constructor Detail

SingleWindowConfiguration

public SingleWindowConfiguration(Workspace workspace)
Parameters:
workspace -
Method Detail

createPrimaryTableau

public Tableau createPrimaryTableau(Effigy effigy)
Create the first tableau for the given effigy, using the tableau factory. This is called after an effigy is first opened, or when a new effigy is created. If the method fails to create a tableau, then it removes the effigy from the directory. This prevents us from having lingering effigies that have no user interface.

Overrides:
createPrimaryTableau in class Configuration
Parameters:
effigy - The effigy for which to create a tableau.
Returns:
A tableau for the specified effigy, or null if none can be opened.

openModel

public Tableau openModel(NamedObj entity)
                  throws IllegalActionException,
                         NameDuplicationException
Open the specified Ptolemy II model. If a model already has open tableaux, then put those in the foreground and return the first one. Otherwise, create a new tableau.

Overrides:
openModel in class Configuration
Parameters:
entity - The model.
Returns:
The tableau that is created, or the first one found, or null if none is created or found.
Throws:
IllegalActionException - If constructing an effigy or tableau fails.
NameDuplicationException - If a name conflict occurs (this should not be thrown).

createEffigy

protected PtolemyEffigy createEffigy(PtolemyEffigy container)

openModel

public Tableau openModel(java.net.URL base,
                         java.net.URL in,
                         java.lang.String identifier,
                         EffigyFactory factory)
                  throws java.lang.Exception
Description copied from class: Configuration
Open the specified URL using the specified effigy factory. If a model with the specified identifier is present in the directory, then find all the tableaux of that model and make them visible; otherwise, read a model from the specified URL in and create a default tableau for the model and add the tableau to this directory.

Overrides:
openModel in class Configuration
Parameters:
base - The base for relative file references, or null if there are no relative file references.
in - The input URL.
identifier - The identifier that uniquely identifies the model.
factory - The effigy factory to use.
Returns:
The tableau that is created, or null if none.
Throws:
java.lang.Exception - If the URL cannot be read.