hep.aida
Interface IPlotter
-
- All Known Implementing Classes:
- DummyPlotter, Plotter
public interface IPlotterUser 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
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.String[]availableParameterOptions(java.lang.String parameter)java.lang.String[]availableParameters()voidclearRegions()Clear all regions.IPlotterRegioncreateRegion()Create a new region.IPlotterRegioncreateRegion(double x)Create a new region.IPlotterRegioncreateRegion(double x, double y)Create a new region.IPlotterRegioncreateRegion(double x, double y, double w)Create a new region.IPlotterRegioncreateRegion(double x, double y, double w, double h)Create a new region.voidcreateRegions()Create a grid of regions.voidcreateRegions(int columns)Create a grid of regions.voidcreateRegions(int columns, int rows)Create a grid of regions.voidcreateRegions(int columns, int rows, int index)Create a grid of regions.IPlotterRegioncurrentRegion()intcurrentRegionNumber()voiddestroyRegions()Destroy regions.voidhide()Unmap the plotter on the screen.voidinteract()Give control to the plotter GUI.IPlotterRegionnext()Set current region to be the "next" one.intnumberOfRegions()java.lang.StringparameterValue(java.lang.String parameter)Get value of a parameter.voidrefresh()Refresh the screen window(s).IPlotterRegionregion(int index)voidsetCurrentRegionNumber(int index)Set current region by giving its index [0,n-1]voidsetParameter(java.lang.String parameter)voidsetParameter(java.lang.String parameter, java.lang.String options)voidsetStyle(IPlotterStyle style)Set the global plotter style.voidsetTitle(java.lang.String title)Set the global title of the plotter (page).voidsetTitleStyle(ITitleStyle style)Set title stylevoidshow()Map the plotter on the screen.IPlotterStylestyle()Get the global plotter style.java.lang.Stringtitle()Get the global title of the plotter (page).ITitleStyletitleStyle()Get title style.voidwriteToFile(java.lang.String filename)Produce an output file.voidwriteToFile(java.lang.String filename, java.lang.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 java.lang.IllegalArgumentExceptionCreate 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:
java.lang.IllegalArgumentException
-
createRegions
void createRegions(int columns) throws java.lang.IllegalArgumentExceptionCreate 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:
java.lang.IllegalArgumentException
-
createRegions
void createRegions(int columns, int rows) throws java.lang.IllegalArgumentExceptionCreate 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:
java.lang.IllegalArgumentException
-
createRegions
void createRegions(int columns, int rows, int index) throws java.lang.IllegalArgumentExceptionCreate 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:
java.lang.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 java.lang.IllegalArgumentExceptionSet current region by giving its index [0,n-1]- Throws:
java.lang.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(java.lang.String parameter) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
setParameter
void setParameter(java.lang.String parameter, java.lang.String options) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
parameterValue
java.lang.String parameterValue(java.lang.String parameter)
Get value of a parameter.- Parameters:
paramName- Name of the parameter.- Returns:
- the value.
-
availableParameterOptions
java.lang.String[] availableParameterOptions(java.lang.String parameter)
-
availableParameters
java.lang.String[] availableParameters()
-
show
void show() throws java.lang.RuntimeException
Map the plotter on the screen.- Throws:
java.lang.RuntimeException
-
refresh
void refresh() throws java.lang.RuntimeExceptionRefresh the screen window(s). Used when a plotted data analysis object received new data.- Throws:
java.lang.RuntimeException
-
hide
void hide() throws java.lang.RuntimeException
Unmap the plotter on the screen.- Throws:
java.lang.RuntimeException
-
interact
void interact() throws java.lang.RuntimeExceptionGive control to the plotter GUI. The plotter must be able to return from this function from a user action in its GUI.- Throws:
java.lang.RuntimeException
-
writeToFile
void writeToFile(java.lang.String filename) throws java.io.IOExceptionProduce 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:
java.io.IOException
-
writeToFile
void writeToFile(java.lang.String filename, java.lang.String type) throws java.io.IOExceptionProduce 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:
java.io.IOException
-
setTitle
void setTitle(java.lang.String title)
Set the global title of the plotter (page).
-
title
java.lang.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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG