hep.aida
Interface IPlotter

All Known Implementing Classes:
DummyPlotter, Plotter

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.


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 setStyle(IPlotterStyle style)
          Set the global plotter style.
 void setTitle(String title)
          Set the global title of the plotter (page).
 void setTitleStyle(ITitleStyle style)
          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 filename)
          Produce an output file.
 void writeToFile(String filename, String type)
          Produce an output file.
 

Method Detail

createRegion

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

IPlotterRegion createRegion(double x)
Create a new region.

Parameters:
x, - y, w, h Position and size in normal coordinates 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

IPlotterRegion createRegion(double x,
                            double y)
Create a new region.

Parameters:
x, - y, w, h Position and size in normal coordinates 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

IPlotterRegion createRegion(double x,
                            double y,
                            double w)
Create a new region.

Parameters:
x, - y, w, h Position and size in normal coordinates 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

IPlotterRegion createRegion(double x,
                            double y,
                            double w,
                            double h)
Create a new region.

Parameters:
x, - y, w, h Position and size in normal coordinates 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.

createRegions

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.

Throws:
IllegalArgumentException

createRegions

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.

Parameters:
index - Set the current region.
Throws:
IllegalArgumentException

createRegions

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.

Parameters:
index - Set the current region.
Throws:
IllegalArgumentException

createRegions

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.
Throws:
IllegalArgumentException

currentRegion

IPlotterRegion currentRegion()
Returns:
The current region.

currentRegionNumber

int currentRegionNumber()
Returns:
The current region index.

numberOfRegions

int numberOfRegions()
Returns:
The number of regions.

setCurrentRegionNumber

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

Throws:
IllegalArgumentException

next

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

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

destroyRegions

void destroyRegions()
Destroy regions.


clearRegions

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


setParameter

void setParameter(String parameter)
                  throws IllegalArgumentException
Throws:
IllegalArgumentException

setParameter

void setParameter(String parameter,
                  String options)
                  throws IllegalArgumentException
Throws:
IllegalArgumentException

parameterValue

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

Parameters:
paramName - Name of the parameter.
Returns:
the value.

availableParameterOptions

String[] availableParameterOptions(String parameter)

availableParameters

String[] availableParameters()

show

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

Throws:
RuntimeException

refresh

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

Throws:
RuntimeException

hide

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

Throws:
RuntimeException

interact

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.

Throws:
RuntimeException

writeToFile

void writeToFile(String filename)
                 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...).
Throws:
IOException

writeToFile

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

setTitle

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


title

String title()
Get the global title of the plotter (page).


titleStyle

ITitleStyle titleStyle()
Get title style.


setTitleStyle

void setTitleStyle(ITitleStyle style)
Set title style


style

IPlotterStyle style()
Get the global plotter style.


setStyle

void setStyle(IPlotterStyle style)
Set the global plotter style.



jHepWork 3.2 © jWork.org