All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ptolemy.plot.PlotFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----ptolemy.plot.PlotFrame

public class PlotFrame
extends Frame
PlotFrame is a versatile two-dimensional data plotter that runs as part of an application, but in its own window. It can read files compatible with the Ptolemy plot file format (currently only ASCII), or the application can interact directly with the contained Plot object, which is visible as a public member. For a description of the file format, see the Plot and PlotBox classes.

An application that uses this class should set up the handling of window-closing events. Presumably, the application will exit when all windows have been closed. This is done with code something like:

plotFrameInstance.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
// Handle the event
}
});

Version:
$Id: PlotFrame.java,v 1.6 1998/11/21 02:09:06 lmuliadi Exp $
Author:
Christopher Hylands and Edward A. Lee
See Also:
Plot, PlotBox

Variable Index

 o _directory
 o _fileMenu
 o _filename
 o _menubar
 o _specialMenu
 o plot
The plot object held by this frame.

Constructor Index

 o PlotFrame()
Construct a plot frame with a default title.
 o PlotFrame(String)
Construct a plot frame with the specified title.

Method Index

 o _about()
Display basic information about the application.
 o _close()
Close the window.
 o _help()
Display more detailed information than given by _about().
 o _open()
Open a new file and plot its data.
 o _print()
Print the plot.
 o _save()
Save the plot to the current file, determined by the _directory and _filename protected variables.
 o _saveAs()
Query the user for a filename and save the plot to that file.
 o samplePlot()
Create a sample plot.

Variables

 o plot
 public Plot plot
The plot object held by this frame.

 o _menubar
 protected MenuBar _menubar
 o _fileMenu
 protected Menu _fileMenu
 o _specialMenu
 protected Menu _specialMenu
 o _directory
 protected String _directory
 o _filename
 protected String _filename

Constructors

 o PlotFrame
 public PlotFrame()
Construct a plot frame with a default title.

 o PlotFrame
 public PlotFrame(String title)
Construct a plot frame with the specified title.

Methods

 o samplePlot
 public void samplePlot()
Create a sample plot.

 o _about
 protected void _about()
Display basic information about the application.

 o _close
 protected void _close()
Close the window.

 o _help
 protected void _help()
Display more detailed information than given by _about().

 o _open
 protected void _open()
Open a new file and plot its data.

 o _print
 protected void _print()
Print the plot.

 o _save
 protected void _save()
Save the plot to the current file, determined by the _directory and _filename protected variables.

 o _saveAs
 protected void _saveAs()
Query the user for a filename and save the plot to that file.


All Packages  Class Hierarchy  This Package  Previous  Next  Index