public class DrawOptions extends Plottable implements Serializable
Constructor and Description |
---|
DrawOptions()
Sets drawing options for all objects.
|
Modifier and Type | Method and Description |
---|---|
LinePars |
copyLinePars(LinePars old)
Copy drawing options.
|
double |
getBinWidth()
get the bin width.
|
Color |
getColor()
Get drawing color.
|
LinePars |
getDrawOption()
Get the drawing attributes
|
String |
getDrawOptions()
Get all drawing options in form of a string
|
Color |
getFillColor()
Get color of a drawing object.
|
boolean |
getLegend()
Returns true if this line style should draw the name in the legend of the
graph, false otherwise
|
LinePars |
getLineParm()
Get all drawing parameters.
|
int |
getLineStyle()
Get line style.
|
String |
getNameX()
Get the name of X-axis
|
String |
getNameY()
Get the title of Y-axis.
|
String |
getNameZ()
Get the title of Z-axis
|
float |
getPenWidth()
Return the width of the lines.
|
int |
getSymbol()
Get current symbol.
|
String |
getSymbolShape()
Return symbol shape as a string.
|
double |
getSymbolSize()
Get the size of the symbols
|
String |
getTitle()
Get the title of an object.
|
int |
getType()
Get the type of the object.
|
boolean |
isBars()
Return true if histogram is shown using bars.
|
boolean |
isErrX()
is error shown on X?
|
boolean |
isErrY()
is error shown on Y?
|
boolean |
isFilled()
Fill or not histogram or function.
|
void |
printDrawOptions()
print all drawing options
|
void |
printDrawOptions(PrintStream out)
Get all drawing options as PrintStream
|
void |
setBars(boolean cfill)
Draw a histogram using bars (default is using lines).
|
void |
setBinWidth(double w)
Set the bin width.
|
void |
setColor(Color color)
Set color for lines
|
void |
setDrawLine(boolean w)
Draw lines connecting points or not.
|
void |
setDrawLineKey(boolean w)
Draw histogram key with line or not
|
void |
setDrawOption(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(Color color)
Set color for 1st level errors for X and Y
|
void |
setErrColor(Color color,
double transperency)
Set color for 1st level errors for X and Y
|
void |
setErrColorX(Color color)
Set color for 1st level errors in X
|
void |
setErrColorY(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(Color c)
Fill color area between lower and upper 1st-level errors.
|
void |
setErrFillColor(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(Color c)
Fill color area between lower and upper 1st-level errors
|
void |
setErrSysFillColor(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 |
setErrTicSize(double w)
Set the size of small tics shown at the end of error bars.
|
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 cfill)
Fill or not histogram or function.
|
void |
setFillColor(Color color)
Fill color of a drawing object.
|
void |
setFillColorTransparency(double ff)
Set color transparency used to fill an object.
|
void |
setGraphStyle(int w)
Set the style of the graph
|
void |
setLegend(boolean b)
Sets whether or not this line style should draw the name in the legend of
the graph.
|
void |
setLineStyle(int style)
Set line styles (important for functions).
|
void |
setNameX(String name)
Set the name for X-axis.
|
void |
setNameY(String name)
Sets the name for Y-axis.
|
void |
setNameZ(String name)
Sets the title for Z-axis
|
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(String type)
Sets the style.
|
void |
setSymbol(int shape)
Set symbol types.
|
void |
setSymbol(String shape)
Set symbol types using a string.
|
void |
setSymbolSize(int w)
Set the size of the symbols
|
void |
setTitle(String title)
Sets the title.
|
void |
setType(int type)
Set type of the object Should be: LinePars.H1D, LineParsF1D, LineParsF1D
|
public void setTitle(String title)
public LinePars copyLinePars(LinePars old)
old
- LinePars to be copiedpublic String getTitle()
public void setNameX(String name)
name
- Name for X axispublic String getNameX()
public void setNameY(String name)
name
- text for the title of X-axispublic String getNameY()
public void setNameZ(String name)
name
- Title of Z-axispublic String getNameZ()
public LinePars getDrawOption()
public void setDrawOption(LinePars lp)
lp
- LinePars attributespublic void setLegend(boolean b)
b
- true if the name should be shownpublic boolean getLegend()
public void setStyle(String type)
type
- string representing the style. public void setFill(boolean cfill)
cfill
- true if a drawing object should be filledpublic boolean isFilled()
cfill
- true if a drawing object should be filledpublic void setBars(boolean cfill)
cfill
- true if a histogram is shown using bar.public boolean isBars()
public void setFillColor(Color color)
color
- Color to be used to fill a drawing objectpublic Color getFillColor()
public void setFillColorTransparency(double ff)
ff
- transparency, from 0 (transparent) to 1 (not transparent)public void setErrY(boolean sho)
sho
- if true, should be shownpublic void setErrSysY(boolean sho)
sho
- if true, should be shownpublic void setErrSys(boolean sho)
sho
- if true, should be shownpublic void setErrX(boolean sho)
sho
- if true, should be shownpublic void setErr(boolean sho)
sho
- if true, should be shownpublic boolean isErrX()
public boolean isErrY()
public void setErrSysX(boolean sho)
sho
- if true, should be shownpublic void setErrColorY(Color color)
color
- Colorpublic void setErrColorX(Color color)
color
- Colorpublic void setErrColor(Color color)
color
- Colorpublic void setErrColor(Color color, double transperency)
color
- Colortransperency
- Transparency level (0-1)public void setSymbol(int shape)
shape
- public void setSymbol(String shape)
shape
- that takes this value:
"Circle" or "o": not filled circle
"Dot" or ".": dot
"Square": not filled square
"Diamond": not filled diamond
"Triangle": not filled triangle
"+": plus (+)
"x": cross as (x)
"*": star (*)
public String getSymbolShape()
public void setLineStyle(int style)
style
- 0 - solid; 1- dashed; 2-dot-dashed line; 3: dottedpublic int getLineStyle()
public int getSymbol()
public void setColor(Color color)
color
- Color of lines.public Color getColor()
public void setPenWidth(int w)
w
- Width of the linespublic float getPenWidth()
public void setPenDash()
public void setPenDash(int lenght)
lenght
- dash lengthpublic void setType(int type)
type
- public int getType()
public void setPenWidthErrSys(int w)
w
- width of linespublic void setPenWidthErr(int w)
w
- width of linespublic void setErrAll(boolean w)
w
- true, if errors are shownpublic void setErrFill(boolean w)
w
- true, if area is filledpublic void setErrFillColor(Color c)
c
- what color to usepublic void setErrFillColor(Color c, double transp)
c
- what color to usetransp
- transparency level (between 0 and 1)public void setErrSysFillColor(Color c)
c
- color to be usedpublic void setErrSysFillColor(Color c, double transp)
c
- what color to usetransp
- transparency level (between 0 and 1)public void setErrSysFill(boolean w)
w
- true, if area is filledpublic void setErrTicSize(double w)
size
- size of the small tic at ends of error barspublic void setSymbolSize(int w)
w
- Size of the symbolspublic double getSymbolSize()
public void setGraphStyle(int w)
w
- if 0: lines or points if 1: histogramspublic void setDrawSymbol(boolean w)
w
- if true, should be shownpublic void setDrawLineKey(boolean w)
w
- set to false if no histogram key in form of line is shownpublic void setDrawLine(boolean w)
w
- true, if are drawnpublic void setBinWidth(double w)
w
- Bin widthpublic double getBinWidth()
public LinePars getLineParm()
public String getDrawOptions()
public void printDrawOptions()
public void printDrawOptions(PrintStream out)
out
- input PrintStreamJas4pp 1.5 © Java Analysis Studio for Particle Physics