|
|||||||||
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.util.Attribute
ptolemy.actor.gui.TableauFactory
public class TableauFactory
This class is an attribute that creates a tableau to view a specified effigy. When a model is opened, if the top-level of that model contains this attribute or a subclass, then that attribute handles constructing a tableau. Otherwise, the configuration specifies which tableau is used. A configuration contains an instance of this class, and uses it to create a tableau for a model represented by an effigy. This base class assumes that it contains other tableau factories. Its createTableau() method defers to each contained factory, in the order in which they were added, until one is capable of creating a tableau for the specified effigy. Subclasses of this class will usually be inner classes of a Tableau, and will create the Tableau, or might themselves be aggregates of instances of TextEditorTableauFactory.
When there are multiple distinct TableauFactory classes that are capable of providing views on the same effigy, then instances of these factories should be aggregated into a single factory contained herein. Those instances can be presented as alternative views of the data when any single view is opened.
There is a significant subtlety with respect to how Ptolemy II classes are dealt with. Normally, when one looks inside an instance of a class, what is opened is the class definition, not the instance. However, if the instance contains an instance of TableauFactory, then what is opened is the instance, not the class definition. This is used, for example, when the look inside behavior is customized on a per instance basis.
Configuration
,
Effigy
,
Tableau
,
Serialized Form
Yellow (celaine) |
Green (eal) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
private java.lang.String |
_configureSource
The input source that was specified the last time the configure method was called. |
private java.lang.String |
_configureText
The text string that represents the current configuration of this object. |
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 | |
---|---|
TableauFactory(NamedObj container,
java.lang.String name)
Create a factory with the given name and container. |
Method Summary | |
---|---|
protected void |
_configureTableau(Tableau tableau)
Configure the given tableau with the configuration data attached to this tableau factory, if any. |
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the tableau factory with data from the specified input source (a URL) and/or textual data. |
Tableau |
createTableau(Effigy effigy)
Create a tableau for the specified effigy. |
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure method was called. |
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of this object. |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String _configureSource
private java.lang.String _configureText
Constructor Detail |
---|
public TableauFactory(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name.
IllegalActionException
- If the container is incompatible
with this attribute.
NameDuplicationException
- If the name coincides with
an attribute already in the container.Method Detail |
---|
public Tableau createTableau(Effigy effigy) throws java.lang.Exception
effigy
- The model effigy.
java.lang.Exception
- If the factory should be able to create a
Tableau for the effigy, but something goes wrong.public void configure(java.net.URL base, java.lang.String source, java.lang.String text) throws java.lang.Exception
configure
in interface Configurable
base
- The base relative to which references within the input
are found, or null if this is not known, or there is none.source
- The input source, which specifies a URL, or null
if none.text
- Configuration information given as text, or null if
none.
java.lang.Exception
- If something goes wrong. No thrown in this class.public java.lang.String getConfigureSource()
getConfigureSource
in interface Configurable
public java.lang.String getConfigureText()
getConfigureText
in interface Configurable
protected void _configureTableau(Tableau tableau)
tableau
- The tableau to be configured.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |