FreeHEP API
Version current

hep.aida.ref.plotter
Class PlotterUtilities

java.lang.Object
  extended byhep.aida.ref.plotter.PlotterUtilities

public abstract class PlotterUtilities
extends Object

Some utilities for using the JAIDA Plotter in other Java applications.

Version:
$Id: PlotterUtilities.java,v 1.1 2003/09/03 22:37:28 tonyj Exp $
Author:
tonyj
Source Code:
PlotterUtilities.java

Constructor Summary
PlotterUtilities()
           
 
Method Summary
static Component componentForPlotter(hep.aida.IPlotter plotter)
          A method to enable the JAIDA plotter to be embedded inside a Java GUI.
static void writeToFile(hep.aida.IPlotter plotter, OutputStream out, String type, Properties props)
          Write a plot to an output stream, specifying extra properties
static void writeToFile(hep.aida.IPlotter plotter, String file, String type, Properties props)
          Write a plot to a file, specifying extra properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotterUtilities

public PlotterUtilities()
Method Detail

componentForPlotter

public static Component componentForPlotter(hep.aida.IPlotter plotter)
                                     throws IllegalArgumentException
A method to enable the JAIDA plotter to be embedded inside a Java GUI.

Parameters:
plotter - The plotter to be embedded
Returns:
The component associated with this IPlotter
Throws:
IllegalArgumentException - If the plotter passed in was not created by JAIDA's default analysis factory

writeToFile

public static void writeToFile(hep.aida.IPlotter plotter,
                               String file,
                               String type,
                               Properties props)
                        throws IOException,
                               IllegalArgumentException
Write a plot to a file, specifying extra properties

Parameters:
plotter - The plotter to write
file - The file to write to
type - The format to write out. Supported types include cgm, emf, gif, pdf, ppm, ps, svg, swf, png and jpg. See the JAIDA release notes for required jar files to support different graphics formats.
props - Properties that control how the image is produced. Supported properties include plotWidth and plotHeight, as well as other format specific properties.
Throws:
IllegalArgumentException - If the plotter passed in was not created by JAIDA's default analysis factory
IOException

writeToFile

public static void writeToFile(hep.aida.IPlotter plotter,
                               OutputStream out,
                               String type,
                               Properties props)
                        throws IOException,
                               IllegalArgumentException
Write a plot to an output stream, specifying extra properties

Parameters:
plotter - The plotter to write
out - The output stream to write to
type - The format to write out. Supported types include cgm, emf, gif, pdf, ppm, ps, svg, swf, png and jpg. See the JAIDA release notes for required jar files to support different graphics formats.
props - Properties that control how the image is produced. Supported properties include plotWidth and plotHeight, as well as other format specific properties.
Throws:
IllegalArgumentException - If the plotter passed in was not created by JAIDA's default analysis factory
IOException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.