hep.aida.ref.plotter
Class DummyPlotter

java.lang.Object
  extended by hep.aida.ref.plotter.DummyPlotter
All Implemented Interfaces:
IPlotter
Direct Known Subclasses:
Plotter

public class DummyPlotter
extends Object
implements IPlotter

A dummy implementation of an AIDA Plotter, useful in batch jobs where no graphical output is required.


Method Summary
 String[] availableParameterOptions(String parameterName)
           
 String[] availableParameters()
           
 void clearRegions()
          Clear all regions.
 IPlotterRegion createRegion()
          Create a new region.
 IPlotterRegion createRegion(double x)
          Create a new region.
 IPlotterRegion createRegion(double x, double y)
          Create a new region.
 IPlotterRegion createRegion(double x, double y, double w)
          Create a new region.
 IPlotterRegion createRegion(double x, double y, double w, double h)
          Create a new region.
 void createRegions()
          Create a grid of regions.
 void createRegions(int columns)
          Create a grid of regions.
 void createRegions(int columns, int rows)
          Create a grid of regions.
 void createRegions(int columns, int rows, int start)
          Create a grid of regions.
 IPlotterRegion currentRegion()
           
 int currentRegionNumber()
           
 void destroyRegions()
          Destroy regions.
 void hide()
          Unmap the plotter on the screen.
 void interact()
          Give control to the plotter GUI.
static void invokeOnSwingThread(Runnable run)
           
 boolean isShowing()
           
 IPlotterRegion next()
          Set current region to be the "next" one.
 int numberOfRegions()
           
 JPanel panel()
           
 String parameterValue(String parameterName)
          Get value of a parameter.
 void refresh()
          Refresh the screen window(s).
 IPlotterRegion region(int index)
           
 void setCurrentRegionNumber(int value)
          Set current region by giving its index [0,n-1]
 void setParameter(String name)
           
 void setParameter(String name, String value)
           
 void setStyle(IPlotterStyle style)
          Set the global plotter style.
 void setTitle(String str)
          Set the global title of the plotter (page).
 void setTitleStyle(ITitleStyle iTitleStyle)
          Set title style
 void show()
          Map the plotter on the screen.
 IPlotterStyle style()
          Get the global plotter style.
 String title()
          Get the global title of the plotter (page).
 ITitleStyle titleStyle()
          Get title style.
 void writeToFile(String file)
          Produce an output file.
 void writeToFile(String file, String type)
          Produce an output file.
 void writeToFile(String fileName, String fileType, Properties props)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

show

public void show()
Description copied from interface: IPlotter
Map the plotter on the screen.

Specified by:
show in interface IPlotter

hide

public void hide()
Description copied from interface: IPlotter
Unmap the plotter on the screen.

Specified by:
hide in interface IPlotter

refresh

public void refresh()
Description copied from interface: IPlotter
Refresh the screen window(s). Used when a plotted data analysis object received new data.

Specified by:
refresh in interface IPlotter

interact

public void interact()
Description copied from interface: IPlotter
Give control to the plotter GUI. The plotter must be able to return from this function from a user action in its GUI.

Specified by:
interact in interface IPlotter

next

public IPlotterRegion next()
Description copied from interface: IPlotter
Set current region to be the "next" one. If exceeding the number of regions, the current region index return to 0.

Specified by:
next in interface IPlotter
Returns:
The new current region.

createRegion

public IPlotterRegion createRegion(double x)
Description copied from interface: IPlotter
Create a new region.

Specified by:
createRegion in interface IPlotter
Returns:
The newly created region. Return null in case not failure. Note that the plotter manages the regions ; user does not have to delete a region object directly.

createRegion

public IPlotterRegion createRegion()
Description copied from interface: IPlotter
Create a new region. that is to say between 0 and 1. Then a region with (x=0,y=0,w=1,h=1) maps the full page. "x" goes left to right. "y" bottom to top.

Specified by:
createRegion in interface IPlotter
Returns:
The newly created region. Return null in case not failure. Note that the plotter manages the regions ; user does not have to delete a region object directly.

createRegion

public IPlotterRegion createRegion(double x,
                                   double y)
Description copied from interface: IPlotter
Create a new region.

Specified by:
createRegion in interface IPlotter
Returns:
The newly created region. Return null in case not failure. Note that the plotter manages the regions ; user does not have to delete a region object directly.

createRegion

public IPlotterRegion createRegion(double x,
                                   double y,
                                   double w)
Description copied from interface: IPlotter
Create a new region.

Specified by:
createRegion in interface IPlotter
Returns:
The newly created region. Return null in case not failure. Note that the plotter manages the regions ; user does not have to delete a region object directly.

createRegion

public IPlotterRegion createRegion(double x,
                                   double y,
                                   double w,
                                   double h)
Description copied from interface: IPlotter
Create a new region.

Specified by:
createRegion in interface IPlotter
Returns:
The newly created region. Return null in case not failure. Note that the plotter manages the regions ; user does not have to delete a region object directly.

currentRegion

public IPlotterRegion currentRegion()
Specified by:
currentRegion in interface IPlotter
Returns:
The current region.

createRegions

public void createRegions()
Description copied from interface: IPlotter
Create a grid of regions. By default the current region is the top left one (with index 0). Region are indexed from zero, with increasing order left to right, top to bottom.

Specified by:
createRegions in interface IPlotter

createRegions

public void createRegions(int columns)
Description copied from interface: IPlotter
Create a grid of regions. By default the current region is the top left one (with index 0). Region are indexed from zero, with increasing order left to right, top to bottom.

Specified by:
createRegions in interface IPlotter

createRegions

public void createRegions(int columns,
                          int rows)
Description copied from interface: IPlotter
Create a grid of regions. By default the current region is the top left one (with index 0). Region are indexed from zero, with increasing order left to right, top to bottom.

Specified by:
createRegions in interface IPlotter

createRegions

public void createRegions(int columns,
                          int rows,
                          int start)
Description copied from interface: IPlotter
Create a grid of regions. By default the current region is the top left one (with index 0). Region are indexed from zero, with increasing order left to right, top to bottom.

Specified by:
createRegions in interface IPlotter
start - Set the current region.

setCurrentRegionNumber

public void setCurrentRegionNumber(int value)
Description copied from interface: IPlotter
Set current region by giving its index [0,n-1]

Specified by:
setCurrentRegionNumber in interface IPlotter

currentRegionNumber

public int currentRegionNumber()
Specified by:
currentRegionNumber in interface IPlotter
Returns:
The current region index.

region

public IPlotterRegion region(int index)
Specified by:
region in interface IPlotter
Returns:
A region, knowing its index.

destroyRegions

public void destroyRegions()
Description copied from interface: IPlotter
Destroy regions.

Specified by:
destroyRegions in interface IPlotter

clearRegions

public void clearRegions()
Description copied from interface: IPlotter
Clear all regions. It does not reset the number and position of regions. This can be done through a destroyRegions.

Specified by:
clearRegions in interface IPlotter

availableParameterOptions

public String[] availableParameterOptions(String parameterName)
Specified by:
availableParameterOptions in interface IPlotter

availableParameters

public String[] availableParameters()
Specified by:
availableParameters in interface IPlotter

parameterValue

public String parameterValue(String parameterName)
Description copied from interface: IPlotter
Get value of a parameter.

Specified by:
parameterValue in interface IPlotter
Returns:
the value.

setParameter

public void setParameter(String name)
Specified by:
setParameter in interface IPlotter

setParameter

public void setParameter(String name,
                         String value)
Specified by:
setParameter in interface IPlotter

numberOfRegions

public int numberOfRegions()
Specified by:
numberOfRegions in interface IPlotter
Returns:
The number of regions.

setTitle

public void setTitle(String str)
Description copied from interface: IPlotter
Set the global title of the plotter (page).

Specified by:
setTitle in interface IPlotter

title

public String title()
Description copied from interface: IPlotter
Get the global title of the plotter (page).

Specified by:
title in interface IPlotter

titleStyle

public ITitleStyle titleStyle()
Description copied from interface: IPlotter
Get title style.

Specified by:
titleStyle in interface IPlotter

setTitleStyle

public void setTitleStyle(ITitleStyle iTitleStyle)
Description copied from interface: IPlotter
Set title style

Specified by:
setTitleStyle in interface IPlotter

style

public IPlotterStyle style()
Description copied from interface: IPlotter
Get the global plotter style.

Specified by:
style in interface IPlotter

setStyle

public void setStyle(IPlotterStyle style)
Description copied from interface: IPlotter
Set the global plotter style.

Specified by:
setStyle in interface IPlotter

writeToFile

public void writeToFile(String file)
                 throws IOException
Description copied from interface: IPlotter
Produce an output file.

Specified by:
writeToFile in interface IPlotter
Throws:
IOException

writeToFile

public void writeToFile(String file,
                        String type)
                 throws IOException
Description copied from interface: IPlotter
Produce an output file.

Specified by:
writeToFile in interface IPlotter
type - A string to describe the type of the output : "PS" or "PostScript" for PostScript, "JPEG" for JPEG. If nothing is given, the type is guessed from the given file name suffix (.ps for PostScript, .jpg for JPEG, etc...).
Throws:
IOException

writeToFile

public void writeToFile(String fileName,
                        String fileType,
                        Properties props)
                 throws IOException
Throws:
IOException

isShowing

public boolean isShowing()

panel

public JPanel panel()

invokeOnSwingThread

public static void invokeOnSwingThread(Runnable run)


jHepWork 3.2 © jWork.org