|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectbookExamples.ch27BusinessGraphics.charts.DoubleDataBean
public class DoubleDataBean
DoubleDataBean is the base class which is required in order to draw any graphs. It contains all the utility methods to calculate the necessary graphics.graph data for drawing. Constants include:
Constructor Summary | |
---|---|
DoubleDataBean(int w,
int h)
Default constructor, used particularly to instantiate an instance of DoubleDataBean by the LineGraph, PieGraph and BarGraph classes |
Method Summary | |
---|---|
int |
getHeight()
Gets image height. |
java.lang.String |
getTitle()
Gets title of all graphs. |
int |
getWidth()
Gets image width. |
java.lang.String |
getXLabel()
Gets x-axis label on bar graphs and line graphs. |
double[] |
getXVals()
Gets X data values - the only values which are set for pie graphs. |
java.lang.String |
getYLabel()
Gets y-axis label on bar graphs and line graphs. |
double[] |
getYVals()
Gets Y data values - indicate height of bars for bar graphics.graph. |
boolean |
isGridOn()
Gets whether or not a grid (lines the height and breadth of the image indicating increment size) should be drawn on line graphs and bar graphs. |
boolean |
isTicksOn()
Gets whether ticks (small marks on the x and y axis to indicate increment size) should be drawn on line graphs and bar graphs. |
void |
setGrid(boolean _isGridOn)
Sets whether or not a grid (lines the height and breadth of the image indicating increment size) should be drawn on line graphs and bar graphs. |
void |
setHeight(int _height)
Sets image height. |
void |
setTicks(boolean _isTicksOn)
Sets whether ticks (small marks on the x and y axis to indicate increment size) should be drawn on line graphs and bar graphs. |
void |
setTitle(java.lang.String _title)
Sets title of all graphs. |
void |
setWidth(int _width)
Sets image width. |
void |
setXLabel(java.lang.String _xLabel)
Sets x-axis label on bar graphs and line graphs. |
void |
setXVals(double[] _xVals)
|
void |
setYLabel(java.lang.String _yLabel)
Sets y-axis label on bar graphs and line graphs. |
void |
setYVals(double[] _yVals)
Sets Y data values - indicate height of bars for bar graphics.graph. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleDataBean(int w, int h)
Method Detail |
---|
public void setWidth(int _width)
_width
- image width (not frame width)public void setHeight(int _height)
_height
- image height (not frame height)public void setXLabel(java.lang.String _xLabel)
_xLabel
- x-axis labelpublic void setYLabel(java.lang.String _yLabel)
_yLabel
- y-axis labelpublic void setTitle(java.lang.String _title)
_title
- Graph titlepublic void setGrid(boolean _isGridOn)
_isGridOn
- whether a grid should be drawnpublic void setTicks(boolean _isTicksOn)
_isTicksOn
- whether ticks should be drawnpublic void setXVals(double[] _xVals)
_xVals
- array of x data valuespublic void setYVals(double[] _yVals)
_yVals
- array of y data valuespublic int getWidth()
public int getHeight()
public java.lang.String getXLabel()
public java.lang.String getYLabel()
public java.lang.String getTitle()
public boolean isGridOn()
public boolean isTicksOn()
public double[] getXVals()
public double[] getYVals()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |