FreeHEP API
Version 3.0

hep.aida
Interface IPlotter


public interface IPlotter

User level interface to plotter. This IPlotter interface assumes the handling of multiple plotting regions. Then the IPlotter should be seen as a "page" managing multiple drawing region. It assumes that a "current" region mechanism is used. The keyword "region" is borrowed from the OpenInventor terminology (viewing region). See also the IPlotterRegion for more comments.

Author:
The AIDA team (http://aida.freehep.org/)

Method Summary
 String[] availableParameterOptions(String parameter)
           
 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 index)
          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.
 IPlotterRegion next()
          Set current region to be the "next" one.
 int numberOfRegions()
           
 String parameterValue(String parameter)
          Get value of a parameter.
 void refresh()
          Refresh the screen window(s).
 IPlotterRegion region(int index)
           
 void setCurrentRegionNumber(int index)
          Set current region by giving its index [0,n-1]
 void setParameter(String parameter)
           
 void setParameter(String parameter, String options)
           
 void setTitle(String title)
          Set the global title of the plotter (page).
 void setTitleStyle(ITitleStyle style)
           
 void show()
          Map the plotter on the screen.
 ITitleStyle titleStyle()
          Get/set title style.
 void writeToFile(String filename)
          Produce an output file.
 void writeToFile(String filename, String type)
          Produce an output file.
 

Method Detail

createRegion

public IPlotterRegion createRegion()
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.

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)
Create a new region.

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)
Create a new region.

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)
Create a new region.

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)
Create a new region.

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.

createRegions

public void createRegions()
                   throws IllegalArgumentException
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.

IllegalArgumentException

createRegions

public void createRegions(int columns)
                   throws IllegalArgumentException
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.

IllegalArgumentException

createRegions

public void createRegions(int columns,
                          int rows)
                   throws IllegalArgumentException
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.

IllegalArgumentException

createRegions

public void createRegions(int columns,
                          int rows,
                          int index)
                   throws IllegalArgumentException
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.

Parameters:
index - Set the current region.
IllegalArgumentException

currentRegion

public IPlotterRegion currentRegion()
Returns:
The current region.

currentRegionNumber

public int currentRegionNumber()
Returns:
The current region index.

numberOfRegions

public int numberOfRegions()
Returns:
The number of regions.

setCurrentRegionNumber

public void setCurrentRegionNumber(int index)
                            throws IllegalArgumentException
Set current region by giving its index [0,n-1]

IllegalArgumentException

next

public IPlotterRegion next()
Set current region to be the "next" one. If exceeding the number of regions, the current region index return to 0.

Returns:
The new current region.

region

public IPlotterRegion region(int index)
Returns:
A region, knowing its index.

destroyRegions

public void destroyRegions()
Destroy regions.


clearRegions

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


setParameter

public void setParameter(String parameter)
                  throws IllegalArgumentException
IllegalArgumentException

setParameter

public void setParameter(String parameter,
                         String options)
                  throws IllegalArgumentException
IllegalArgumentException

parameterValue

public String parameterValue(String parameter)
Get value of a parameter.

Returns:
the value.

availableParameterOptions

public String[] availableParameterOptions(String parameter)

availableParameters

public String[] availableParameters()

show

public void show()
          throws RuntimeException
Map the plotter on the screen.

RuntimeException

refresh

public void refresh()
             throws RuntimeException
Refresh the screen window(s). Used when a plotted data analysis object received new data.

RuntimeException

hide

public void hide()
          throws RuntimeException
Unmap the plotter on the screen.

RuntimeException

interact

public void interact()
              throws RuntimeException
Give control to the plotter GUI. The plotter must be able to return from this function from a user action in its GUI.

RuntimeException

writeToFile

public void writeToFile(String filename)
                 throws IOException
Produce an output file.

IOException

writeToFile

public void writeToFile(String filename,
                        String type)
                 throws IOException
Produce an output file.

Parameters:
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...).
IOException

setTitle

public void setTitle(String title)
Set the global title of the plotter (page).


titleStyle

public ITitleStyle titleStyle()
Get/set title style.


setTitleStyle

public void setTitleStyle(ITitleStyle style)

FreeHEP API
Version 3.0

Copyright © 2000-2002 AIDA Team, All Rights Reserved.