Package ptolemy.actor.gui

Ptolemy GUI components for actors and configurations.

See:
          Description

Interface Summary
CustomQueryBoxParameter An interface for Parameter classes that supply their own customized GUI element for modifying the query content.
Placeable Interface for objects that have UI components that can be placed in containers.
TopPack An interface that allows alternate pack() methods to be called from TableauFrame which allows for functionality such as alternate menu systems in Vergil.
 

Class Summary
AbstractPlaceableActor Base class for actors that implement the Placeable interface.
ArrayOfRecordsPane A graphical component that displays the values in an array of records.
ArrayOfRecordsPane.ArrayAsTable This class provides an implementation of the TableModel interface for viewing an array of records.
ArrayOfRecordsPane.EmptyTableModel This class provides an implementation of the TableModel interface representing an empty table.
ArrayOfRecordsPane.SimpleTable Table panel.
BrowserEffigy An effigy for a web browser.
BrowserEffigy.Factory A factory for creating new effigies.
BrowserLauncher BrowserLauncher is a class that provides one static method, openURL, which opens the default web browser for the current user of the system to the given URL.
BrowserTableau A tableau representing a web browser window.
BrowserTableau.Factory A factory that creates web browser tableaux for Ptolemy models.
CheckModelSize Class that checks the size, zoom, and location of a model.
ColorAttribute This is an attribute that specifies a color.
CompositeActorApplication This application creates one or more Ptolemy II models given a classname on the command line, and then executes those models, each in its own thread.
CompositeActorSimpleApplication This application creates one or more Ptolemy II models given a classname on the command line, and then executes those models, each in its own thread.
Configuration The configuration of an application that uses Ptolemy II classes.
ConfigurationApplication An application that reads one or more files specified on the command line, or instantiates one or more Java classes specified by the -class option.
ConfigurationApplication.ConfigurationFilenameFilter Look for directories that contain files named configuration.xml and intro.htm.
ConfigurationApplication.IgnoreErrorHandler Error Handler that ignore errors.
ConfigurationEffigy An effigy for a Ptolemy II model.
Configurer This class is an editor for the user settable attributes of an object.
DebugListenerTableau A tableau representing a debug listener window.
DebugListenerTableau.DebugListenerFrame This class is a top-level window for displaying textual debug output from an instance of Debuggable.
DialogTableau A tableau representing a Dialog in a toplevel window.
EditorFactory This is an attribute that can create an editor for interactively configuring its container.
EditorPaneFactory This is an attribute that can create a pane (called a "configuration widget") for interactively configuring its container.
EditParametersDialog This class is a modal dialog box for editing the parameters of a target object, which is an instance of NamedObj.
Effigy An effigy represents model metadata, and is contained by the model directory or by another effigy.
EffigyFactory A configuration contains an instance of this class, and uses it to create effigies from a URL, or to create blank effigies of a particular kind.
ExpressionShellEffigy A representative of an expression shell.
ExpressionShellEffigy.ShellFactory A factory for creating new Ptolemy effigies.
ExpressionShellFrame A frame that provides an interactive shell for evaluating expressions.
ExpressionShellTableau A tableau that provides an interactive shell for evaluating expressions.
ExpressionShellTableau.Factory A factory that creates a control panel to display an Expression Shell.
ExternalTextEffigy An external EDITOR-based effigy for a text file (see ExternalTextTableau).
ExternalTextTableau A tableau representing an external text editor (for now emacs only, with the gnuserv package installed).
FileOrURLEditorFactory An editor factory for an attribute that has a fileOrURL parameter.
GenerateCopyrights Generate an HTML file that contains links to the appropriate copyrights for entities in the configuration.
HTMLAbout This class contains static methods that are called by when HTMLViewer.hyperlinkUpdate() is invoked on a hyperlink that starts with about:.
HTMLEffigy An effigy for an HTML file.
HTMLEffigyFactory A factory for creating new effigies for HTML pages.
HTMLViewer This class is a toplevel frame that can view HTML documents.
HTMLViewerTableau A tableau representing a rendered HTML view in a toplevel window.
HTMLViewerTableau.Factory A factory that creates HTML viewer tableaux for Ptolemy models.
InsideEntityEditorPaneFactory This is an attribute that can create a pane (called a "configuration widget") for interactively configuring an entity contained by its container.
JNLPUtilities This class contains utilities for use with JNLP, aka Web Start.
JVMTableau A tableau that displays Java Virtual Machine information such as the version number and other properties.
JVMTableau.Factory A factory that creates a control panel to display JVM Properties.
LevelSkippingTableauFactory This class is an attribute that creates a tableau to view an object contained by the model associated with the specified effigy.
LocationAttribute This attribute stores the width and height of a graphical component.
MatrixPane A graphical component that displays the values in a matrix.
MatrixPane.EmptyTableModel This class provides an implementation of the TableModel interface representing an empty matrix.
MatrixPane.MatrixAsTable This class provides an implementation of the TableModel interface for viewing matrix tokens.
MatrixTokenTableau A tableau representing matrix tokens in a top-level window with a table.
MatrixTokenTableau.Factory A factory that creates a matrix token tableau.
ModelDirectory A directory of open models.
ModelFrame ModelFrame is a top-level window containing a Ptolemy II model control panel.
ModelPane ModelPane is a panel for interacting with an executing Ptolemy II model.
ModelRepaintController A class to do scheduled repaints at certain user specified moments in the execution of the model.
MoMLApplet This is an applet that constructs a Ptolemy II model from a MoML file.
MoMLApplication An application that sets the look and feel to the native look and feel and then reads one or more files specified on the command line, or instantiates one or more Java classes specified by the -class option.
MoMLSimpleApplication Deprecated. Use MoMLSimpleApplication instead.
MoMLSimpleStatisticalApplication A simple application that reads in a .xml file as a command line argument, runs it and prints out time and memory statistics MoMLApplication sets the look and feel, which starts up Swing, so we can't use MoMLApplication for non-graphical simulations.
OpenInstanceDialog This class is a non-modal dialog that displays the current state of parameters of an instance.
OpenInstanceDialog.ColumnNames Strings that are available for the column names.
PasswordAttribute An attribute that represents a password.
PlotEffigy An effigy for a plot file.
PlotEffigy.Factory A factory for creating new effigies.
PlotTableau A tableau representing a plot in a toplevel window.
PlotTableau.Factory A factory that creates a plot tableau for Ptolemy models.
PlotTableauFrame PlotTableauFrame is a version of PlotFrame in the plot package that works more closely with the Ptolemy actor.gui infrastructure.
PlotTableauFrame.EPSFileFilter Display only .eps files.
PortConfigurer Deprecated. This class is no longer used.
PortConfigurerDialog This class is a non-modal dialog for configuring the ports of an entity.
PortConfigurerDialog.ColumnNames Strings that are available for the column names.
PortConfigurerDialog.PortBooleanCellRenderer Render a boolean cell.
PortConfigurerDialog.StringCellRenderer Default renderer for _portTable.
PortConfigurerDialog.ValidatingComboBoxCellEditor A validating ComboBox table cell editor for use with JTable.
PtExecuteApplication This application executes Ptolemy II models specified on the command line.
PtolemyApplet This class provides a convenient way to make applets out of Ptolemy II models.
PtolemyApplication This application opens run control panels for models specified on the command line.
PtolemyDialog Ptolemy specific dialog.
PtolemyEffigy An effigy for a Ptolemy II model.
PtolemyEffigy.Factory A factory for creating new Ptolemy effigies.
PtolemyEffigy.FactoryWithoutNew A factory for creating new Ptolemy effigies, but without the capability of creating a new blank effigy.
PtolemyFrame This is a top-level window for Ptolemy models with a menubar and status bar.
PtolemyPreferences Default preferences definition for Vergil.
PtolemyQuery This class is a query dialog box with various entries for setting the values of Ptolemy II attributes that implement the Settable interface and have visibility FULL.
PtolemyTableauFactory This is an intermediate container tableau factory that is designed to contain all tableau factories in a configuration that are capable of displaying a Ptolemy II model.
QueryUtilities This class contains utility methods for Ptolemy Query classes that access the configuration.
RenameConfigurer This class is an editor widget to rename an object.
RenameDialog This class is a modal dialog box for renaming an object.
RunTableau A tableau that creates a new run control panel for a ptolemy model.
RunTableau.Factory A factory that creates run control panel tableaux for Ptolemy models.
RunTableau.TopFactory A factory that creates run control panel tableaux for the model associated with a top-level effigy (one that has a file representation).
SizeAttribute This attribute stores the width and height of a graphical component.
Tableau A tableau is a visual representation of a Ptolemy II model in a top-level window.
TableauFactory This class is an attribute that creates a tableau to view a specified effigy.
TableauFrame This is a top-level window associated with a tableau that has a menubar and status bar.
TableauFrame.ExtensionFileFilter File filter that filters out files that do not have one of a pre-specified list of extensions.
TextEditor A top-level window containing a simple text editor or viewer.
TextEditorTableau A tableau representing a text window.
TextEditorTableau.Factory A factory that creates text editor tableaux for Ptolemy models.
TextEffigy An effigy for a text file.
TextEffigy.Factory A factory for creating new effigies.
TokenEffigy An effigy for a file that contains one or more tokens, one per line, represented as text in the expression language.
TokenEffigy.Factory A factory for creating new effigies.
TokenTableau A tableau representing one or more tokens in a top-level window with a text editor.
TokenTableau.Factory A factory that creates a token tableau.
UserActorLibrary Access the User Actor Library.
WelcomeWindow A toplevel frame that can view HTML documents, but has no menus.
WelcomeWindowTableau A tableau representing a rendered HTML view in a toplevel window that has no menu choices.
WindowPropertiesAttribute This attribute stores properties of a window, including the width, height, and location.
 

Package ptolemy.actor.gui Description

Ptolemy GUI components for actors and configurations.

This package consists of several types of classes:

  1. Classes that manage the editors
  2. Graphical User Interface (GUI) classes that render specific editors.
  3. Classes that invoke models

Classes that manage editors

A ptolemy application has a configuration which is a xml file found in $PTII/ptolemy/configs. For example, the "Full" configuration is found in $PTII/ptolemy/configs/full/configuration.xml.

The configuration.xml file defines a set of properties and entities that determine what editors are available to view a model.

It is possible to invoke Ptolemy models without using the configuration system, see MoMLSimpleApplication.

The Configuration class is in charge of the user interface, it coordinates views of multiple models. The Configuration class manages the opening of new models by ensuring that the appropriate viewer is used.

The Configuration class contains a ModelDirectory, which is a directory of open models. Each open model is represented by an instance of an Effigy.

An Effigy represents model metadata, such as the location from which the model originated, whether the model has been modified. See Effigy for a discussion about why the class is called "Effigy".

Each open model has an Effigy. The Effigy contains a Tableau that is a visual representation of the model in a top-level window. The Tableau contains a javax.swing.JFrame, which may be accessed via Tableau.getFrame().

How a file is opened using the Configuration class

The ConfigurationApplication uses the Configuration class to open a model. ConfigurationApplication uses these steps
  1. Set up MoMLFilters.
  2. Parse arguments, look for a configuration file and parse the configuration file.
  3. For each model, parse the xml and then open each model with: Configuration.openModel(NamedObj).
  4. openModel() checks with the ModelDirectory to see if the model is already open. If the model is open, then the Tableau that contains a reference to the JFrame is returned.
  5. If openModel() does not find an open model, then we look for a EffigyFactory and then ask the EffigyFactory to create an Effigy for our model.
  6. The EffigyFactory loops through its contained factories and calls EffigyFactory.createEffigy(CompositeEntity, URL, URL) for each factory.
  7. The createEffigy() method determines if it should create an Effigy for the container and urls. If createEffigy() for a particular viewer does not want to create an Effigy for a particular model, then it returns null and then next factory gets to try. Eventually, a createEffigy() method is found that creates an Effigy, or an error is thrown.
  8. Once Configuration.openModel() gets an effigy, then Configuration.createPrimaryTableau(Effigy) is called, which returns a Tableau. The Tableau contains a reference to the javax.swing.JFrame that is a view on the model.

Graphical User Interface (GUI) classes that render specific editors.

In general, each view on a model has a corresponding Effigy and Tableau class. Some viewers also have Viewer and/or Frame classes.

Overview of classes used to invoke models

Uses Configuration?
Class Name Optionally reads parameters from the command line? Calls RemoveGraphicalClasses?
CompositeActorApplication instantiates a Java class named as an argument. The Java class should extend TypedCompositeActor and have a director. This class is not often used. No No No
CompositeActorSimpleApplication is similar to CompositeActorApplication but this class does not handle Placeable classes. This class is not often used. No No No
MoMLSimpleApplication is a simple example of how to invoke a model No No Yes
MoMLSimpleStatisticalApplication extends MoMLSimpleApplication and prints out statistics about the run. See also CompositeEntity.statistics(String). This class is not often used. No No Yes
MoMLCommandLineApplication extends MoMLSimpleApplication and optionally sets parameters from the command line. No Yes Yes
ConfigurationApplication Yes Yes Optionally, by setting _removeGraphicalClasses
MoMLApplication Yes Yes No, this class sets the Look and Feel, which invokes Java's UI code
PtolemyApplication extends MoMLApplication and opens a RunTableau for the specified models. This class is not often used. Yes Yes No, this class sets the Look and Feel, which invokes Java's UI code
PtExecuteApplication extends MoMLApplication and in the default opens a RunTableau for the specified models and then executes the models. This class is not often used. Yes Yes No, this class sets the Look and Feel, which invokes Java's UI code
VergilApplication extends MoMLApplication and opens the Vergil graphical editor Yes Yes No, this class sets the Look and Feel, which invokes Java's UI code

Since:
Ptolemy II 0.2