jhplot
Class DrawOptions

java.lang.Object
  extended by jhplot.DrawOptions
Direct Known Subclasses:
F1D, F2D, H1D, H2D, P1D

public class DrawOptions
extends java.lang.Object

Main class which sets graphics attributes for H1D, F1D, P1D classes.


Constructor Summary
DrawOptions()
          Sets drawing options
 
Method Summary
 double getBinWidth()
          get the bin width.
 jplot.LinePars getDrawOption()
          Get the drawing attributes
 java.lang.String getDrawOptions()
          Get all drawing options in form of a string
 boolean getLegend()
          Returns true if this linestyle should draw the name in the legend of the graph, false otherwise
 java.lang.String getNameX()
          Get the name in X
 java.lang.String getNameY()
          Get the title in Y
 java.lang.String getNameZ()
          Get the title for Z axis
 java.lang.String getTitle()
          Get the title
 int getType()
          Get the type of the object
 void printDrawOptions()
          print all drawing options
 void printDrawOptions(java.io.PrintStream out)
          Get all drawing options as PrintStream
 void setBinWidth(double w)
          Set the bin width.
 void setColor(java.awt.Color color)
          Set color for lines
 void setDrawLine(boolean w)
          Draw lines connecting points or not
 void setDrawOption(jplot.LinePars lp)
          Sets drawing attributes
 void setDrawSymbol(boolean w)
          Draw or not symbols
 void setErr(boolean sho)
          Set or not the 1st level errors on X and Y
 void setErrAll(boolean w)
          Show or not all errors (1st and 2nd level).
 void setErrColor(java.awt.Color color)
          Set color for 1st level errors for X and Y
 void setErrColorX(java.awt.Color color)
          Set color for 1st level errors in X
 void setErrColorY(java.awt.Color color)
          Set color for 1st level errors in Y
 void setErrFill(boolean w)
          Fill area between lower and upper 1st-level errors
 void setErrFillColor(java.awt.Color c)
          Fill color area between lower and upper 1st-level errors.
 void setErrFillColor(java.awt.Color c, double transp)
          Fill color area between lower and upper 1st-level errors and set transparency level
 void setErrSys(boolean sho)
          Show or not the 2nd level errors for X and Y values
 void setErrSysFill(boolean w)
          Fill area between lower and upper 2st-level errors
 void setErrSysFillColor(java.awt.Color c)
          Fill color area between lower and upper 1st-level errors
 void setErrSysFillColor(java.awt.Color c, double transp)
          Fill color area between lower and upper 2nd-level errors and set transparency level
 void setErrSysX(boolean sho)
          Set or not the 2nd level errors in X
 void setErrSysY(boolean sho)
          Show or not the 2nd level errors for Y values
 void setErrX(boolean sho)
          Set or not the 1st level errors in X
 void setErrY(boolean sho)
          Show or not the 1st level errors for Y values
 void setFill(boolean sho)
          Fill or not histogram/function
 void setFillColor(java.awt.Color color)
          Fill color
 void setFillColorTransparency(double ff)
          Cet color transparency
 void setGraphStyle(int w)
          Set the style of the graph
 void setLegend(boolean b)
          Sets whether or not this linestyle should draw the name in the legend of the graph.
 void setNameX(java.lang.String name)
          Set the name in X
 void setNameY(java.lang.String name)
          Sets the label in Y
 void setNameZ(java.lang.String name)
          Sets the title in X
 void setPenDash()
          Set dashed style with default length
 void setPenDash(int lenght)
          Set dashed style with default length
 void setPenWidth(int w)
          Set width of the lines
 void setPenWidthErr(int w)
          Set width of the lines used to show 1st level errors
 void setPenWidthErrSys(int w)
          Set width of the lines used to show 2nd level errors
 void setStyle(java.lang.String type)
          Sets the style:
 void setSymbol(int shape)
          Set symbol types
 void setSymbolSize(int w)
          Set the size of the symbols
 void setTitle(java.lang.String title)
          Sets the title
 void setType(int type)
          Set type of the object Should be: LinePars.H1D, LineParsF1D, LineParsF1D
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawOptions

public DrawOptions()
Sets drawing options

Method Detail

setTitle

public void setTitle(java.lang.String title)
Sets the title

Parameters:
title - Title

getTitle

public java.lang.String getTitle()
Get the title

Returns:
Title

setNameX

public void setNameX(java.lang.String name)
Set the name in X

Parameters:
name - Name in X

getNameX

public java.lang.String getNameX()
Get the name in X

Returns:
Name of the lable in X

setNameY

public void setNameY(java.lang.String name)
Sets the label in Y

Parameters:
name - Label title

getNameY

public java.lang.String getNameY()
Get the title in Y

Returns:
Title in Y

setNameZ

public void setNameZ(java.lang.String name)
Sets the title in X

Parameters:
name - Title for Z axis

getNameZ

public java.lang.String getNameZ()
Get the title for Z axis

Returns:
Title the Z axis

getDrawOption

public jplot.LinePars getDrawOption()
Get the drawing attributes

Returns:
LinePars object

setDrawOption

public void setDrawOption(jplot.LinePars lp)
Sets drawing attributes

Parameters:
lp - LinePars attributes

setLegend

public void setLegend(boolean b)
Sets whether or not this linestyle should draw the name in the legend of the graph.

Parameters:
b - boolean, true if the name should be shown

getLegend

public boolean getLegend()
Returns true if this linestyle should draw the name in the legend of the graph, false otherwise

Returns:
true if the name should be shown

setStyle

public void setStyle(java.lang.String type)
Sets the style:

Parameters:
type - Style type "l" : line style "p": symbol type "h": histogram type, "lp" lines connects symbols

setFill

public void setFill(boolean sho)
Fill or not histogram/function

Parameters:
sho - true if it should be filled

setFillColor

public void setFillColor(java.awt.Color color)
Fill color

Parameters:
color - Color

setFillColorTransparency

public void setFillColorTransparency(double ff)
Cet color transparency

Parameters:
ff - transparancy, from 0 (transparent) to 1 (not transparent)

setErrY

public void setErrY(boolean sho)
Show or not the 1st level errors for Y values

Parameters:
sho - if true, should be shown

setErrSysY

public void setErrSysY(boolean sho)
Show or not the 2nd level errors for Y values

Parameters:
sho - if true, should be shown

setErrSys

public void setErrSys(boolean sho)
Show or not the 2nd level errors for X and Y values

Parameters:
sho - if true, should be shown

setErrX

public void setErrX(boolean sho)
Set or not the 1st level errors in X

Parameters:
sho - if true, should be shown

setErr

public void setErr(boolean sho)
Set or not the 1st level errors on X and Y

Parameters:
sho - if true, should be shown

setErrSysX

public void setErrSysX(boolean sho)
Set or not the 2nd level errors in X

Parameters:
sho - if true, should be shown

setErrColorY

public void setErrColorY(java.awt.Color color)
Set color for 1st level errors in Y

Parameters:
color - Color

setErrColorX

public void setErrColorX(java.awt.Color color)
Set color for 1st level errors in X

Parameters:
color - Color

setErrColor

public void setErrColor(java.awt.Color color)
Set color for 1st level errors for X and Y

Parameters:
color - Color

setSymbol

public void setSymbol(int shape)
Set symbol types

Parameters:
shape - 0 : not filled cicle 1: not filled square 2: not filed diamond 3: not filled triangle 4: filled cicle 5: filled square 6: filed diamond 7: filled triagle 8: plus (+) 9: cross as (x) 10: star (*) 11: litle dot (.) 12: bold plus (+)

setColor

public void setColor(java.awt.Color color)
Set color for lines

Parameters:
color - Color

setPenWidth

public void setPenWidth(int w)
Set width of the lines

Parameters:
w - Width of the lines

setPenDash

public void setPenDash()
Set dashed style with default length


setPenDash

public void setPenDash(int lenght)
Set dashed style with default length

Parameters:
lenght - dash lenght

setType

public void setType(int type)
Set type of the object Should be: LinePars.H1D, LineParsF1D, LineParsF1D

Parameters:
type -

getType

public int getType()
Get the type of the object


setPenWidthErrSys

public void setPenWidthErrSys(int w)
Set width of the lines used to show 2nd level errors

Parameters:
w - width of lines

setPenWidthErr

public void setPenWidthErr(int w)
Set width of the lines used to show 1st level errors

Parameters:
w - width of lines

setErrAll

public void setErrAll(boolean w)
Show or not all errors (1st and 2nd level). Errors are shown using lines. You can also fill area between errors using fill methods

Parameters:
w - true, if errors are shown

setErrFill

public void setErrFill(boolean w)
Fill area between lower and upper 1st-level errors

Parameters:
w - true, if area is filled

setErrFillColor

public void setErrFillColor(java.awt.Color c)
Fill color area between lower and upper 1st-level errors.

Parameters:
c - what color to use

setErrFillColor

public void setErrFillColor(java.awt.Color c,
                            double transp)
Fill color area between lower and upper 1st-level errors and set transparency level

Parameters:
c - what color to use
transp - tranparancy level (between 0 and 1)

setErrSysFillColor

public void setErrSysFillColor(java.awt.Color c)
Fill color area between lower and upper 1st-level errors

Parameters:
c - color to be used

setErrSysFillColor

public void setErrSysFillColor(java.awt.Color c,
                               double transp)
Fill color area between lower and upper 2nd-level errors and set transparency level

Parameters:
c - what color to use
transp - tranparancy level (between 0 and 1)

setErrSysFill

public void setErrSysFill(boolean w)
Fill area between lower and upper 2st-level errors

Parameters:
w - true, if area is filled

setSymbolSize

public void setSymbolSize(int w)
Set the size of the symbols

Parameters:
w - Size of the symbols

setGraphStyle

public void setGraphStyle(int w)
Set the style of the graph

Parameters:
w - if 0: lines or points if 1: histograms

setDrawSymbol

public void setDrawSymbol(boolean w)
Draw or not symbols

Parameters:
w - if true, should be shown

setDrawLine

public void setDrawLine(boolean w)
Draw lines connecting points or not

Parameters:
w - true, if are drawn

setBinWidth

public void setBinWidth(double w)
Set the bin width. Not used at this moment

Parameters:
w - Bin width

getBinWidth

public double getBinWidth()
get the bin width. Not used at this moment

Returns:
Bin width

getDrawOptions

public java.lang.String getDrawOptions()
Get all drawing options in form of a string

Returns:
string representing drawing options

printDrawOptions

public void printDrawOptions()
print all drawing options


printDrawOptions

public void printDrawOptions(java.io.PrintStream out)
Get all drawing options as PrintStream

Parameters:
out - input PrintStream


jHepWork 1.1 (C) Chekanov