edu.ull.cgunay.plots
Class PlotHandle

java.lang.Object
  |
  +--edu.ull.cgunay.plots.PlotHandle

public class PlotHandle
extends Object

Entity that associates a plot and a grapher at display time. This is the handle that represents the visual representation of the plot. It contains pointers to the plot, the grapher, and the associated window number in the grapher.

TODO: maybe just keep axes instead of plots.

Created: Sun Apr 28 12:54:13 2002

Modified: $Date: 2003/03/21 05:10:58 $

Version:
$Revision: 1.7 $ for this file.
Author:
Cengiz Gunay
See Also:
Plot, Grapher, Grapher.windowNumber

Field Summary
(package private)  Grapher grapher
          The Grapher that displayed the Plot.
(package private)  Plot plot
          The description of the Plot encapsulated.
(package private)  Collection plots
          The description of the Plot collection encapsulated.
(package private)  int windowNumber
          The windowNumber in the associated Grapher.
 
Constructor Summary
PlotHandle(Collection plots, Grapher grapher, int windowNumber)
          Association of a plot group with the grapher.
PlotHandle(Plot plot, Grapher grapher, int windowNumber)
          Association of a plot with the grapher.
 
Method Summary
 Grapher getGrapher()
          Get the value of grapher.
 Plot getPlot()
          Get the value of plot.
 int getWindowNumber()
          Get the value of windowNumber.
 void writeEPS(String filename)
          Exports an EPS file of the current plot with the grapher.
 void writeEPSbw(String filename)
          Exports an black/white EPS file of the current plot with the grapher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plot

Plot plot
The description of the Plot encapsulated.


plots

Collection plots
The description of the Plot collection encapsulated.


grapher

final Grapher grapher
The Grapher that displayed the Plot.


windowNumber

final int windowNumber
The windowNumber in the associated Grapher.

See Also:
Grapher.windowNumber
Constructor Detail

PlotHandle

public PlotHandle(Plot plot,
                  Grapher grapher,
                  int windowNumber)
Association of a plot with the grapher. Sets the grapher property of the plot.

Parameters:
plot - a Plot value
grapher - a Grapher value
windowNumber - an int value

PlotHandle

public PlotHandle(Collection plots,
                  Grapher grapher,
                  int windowNumber)
Association of a plot group with the grapher. Sets the grapher property of each of the plots.

Parameters:
plots - a Collection value
grapher - a Grapher value
windowNumber - an int value
See Also:
Grapher.multiPlot(edu.ull.cgunay.plots.Plot[], java.io.PrintStream)
Method Detail

getPlot

public Plot getPlot()
Get the value of plot.

Returns:
value of plot.

getGrapher

public Grapher getGrapher()
Get the value of grapher.

Returns:
value of grapher.

getWindowNumber

public int getWindowNumber()
Get the value of windowNumber.

Returns:
value of windowNumber.

writeEPS

public void writeEPS(String filename)
Exports an EPS file of the current plot with the grapher. Calls Grapher.writeEPS()

Parameters:
filename - a String value
See Also:
Grapher.writeEPS(edu.ull.cgunay.plots.PlotHandle, java.lang.String)

writeEPSbw

public void writeEPSbw(String filename)
Exports an black/white EPS file of the current plot with the grapher. Calls Grapher.writeEPSbw()

Parameters:
filename - a String value
See Also:
Grapher.writeEPS(edu.ull.cgunay.plots.PlotHandle, java.lang.String)