|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--khartzToolz.KhartzBaseChart
|
+--khartzToolz.KhartzElectionBar
| Field Summary | |
BarSegment[] |
barSegments
|
| Constructor Summary | |
KhartzElectionBar(double[] values,
java.lang.String[] labels,
java.util.Date[] dates,
java.awt.Rectangle size,
java.lang.String title,
java.awt.Color[] colorArray)
Standard constructor of an Election Bar Chart |
|
| Method Summary | |
int |
calcBarHeight(double converter,
double value)
Calculates the height of a bar segment in pixels. |
void |
calcBarLayout()
Calculates barSpacing between bar segments, the
barWidth of each bar and the barHeightConverter based
on the array of values that have been passed. |
void |
calcIncrement()
Calculates the value of xTickIncrement - the spacing of tick marks on the y axis of the chart |
boolean |
contains(java.awt.Point p)
Scans the available segments within the chart in sequence, to see if the Point p is contained within the area of one of those segments. |
void |
createSegments()
Creates the array of individual bar segments. |
double |
getAxisMinValue()
Calculates the minimum value that should be displayed at the bottom of the x axis scale on the left hand side of the chart. |
double |
getBarHeightConverter()
Access method for the barHeightConverter property. |
int |
getBarSpacing()
Access method for the barSpacing property. |
int |
getBarWidth()
Access method for the barWidth property. |
java.awt.Font |
getFont()
Returns the current chart font |
java.lang.String |
getLabel(int i)
Fetches a text label from the the array of labels held by the chart |
double |
getRelativeTextSize()
Gets the current text size setting for the chart. |
java.awt.Dimension |
getSize()
|
double |
getValue(int i)
Fetches a value from the array of values contained within the chart. |
int |
getXTickIncrement()
Access method for the xTickIncrement property. |
int |
getXTickIncrementNumber()
Access method for the xTickIncrementNumber property. |
int |
getXTickPixelIncrement()
Access method for the xTickPixelIncrement property. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Used to send a mouse event to the chart for action when a mouse is moved |
void |
mouseReleased(java.awt.event.MouseEvent e)
An action that is performed by the chart when the mouse button is released within the applet window. |
void |
paint(java.awt.Graphics g)
Does the work of painting the chart area and calls the individual bar segments to paint themselves using their own paint() commands. |
void |
setBarHeightConverter(double aBarHeightConverter)
Sets the value of the barHeightConverter property. |
void |
setBarSpacing(int aBarSpacing)
Sets the value of the barSpacing property. |
void |
setBarWidth(int aBarWidth)
Sets the value of the barWidth property. |
void |
setColorArray(java.awt.Color[] colorArray)
Sets the current range of values associated with the segments in the Chart |
void |
setFont(java.awt.Font f)
Sets the font for the current chart |
void |
setRelativeTextSize(double size)
Sets the relative size of the text to be displayed on the chart. |
void |
setXTickIncrement(int aXTickIncrement)
Sets the value of the xTickIncrement property. |
void |
setXTickIncrementNumber(int aXTickIncrementNumber)
Sets the value of the xTickIncrementNumber property. |
void |
setXTickPixelIncrement(int aXTickPixelIncrement)
Sets the value of the xTickPixelIncrement property. |
java.lang.String |
toString()
Returns a string representation of the chart containing key information. |
| Methods inherited from class khartzToolz.KhartzBaseChart |
getBottomMargin, getChartMargin, getChartSize, getChartTitle, getColorArray, getLabels, getLeftMargin, getMaxValue, getMinValue, getRightMargin, getTextFont, getTopMargin, getValues, getVersionMessage, setBottomMargin, setChartMargin, setChartSize, setChartTitle, setLabels, setLeftMargin, setRightMargin, setTextFont, setTopMargin, setValues, setVersionMessage |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface khartzToolz.KhartzChart |
getChartSize |
| Field Detail |
public BarSegment[] barSegments
| Constructor Detail |
public KhartzElectionBar(double[] values,
java.lang.String[] labels,
java.util.Date[] dates,
java.awt.Rectangle size,
java.lang.String title,
java.awt.Color[] colorArray)
values[] - The range of values to be chartedvalues[] - The labels to be displayed for each chartchart - The containing chart instancelabels[] - An array containing the text labelsdates[] - An array containing dates associated with the datatitle - The title to be displayedsize - The size of the chart areacolorArray[] - An array of colors that define the segment colors| Method Detail |
public int getXTickIncrement()
public void setXTickIncrement(int aXTickIncrement)
aXTickIncrement - the new value of the xTickIncrement propertypublic int getBarSpacing()
public void setBarSpacing(int aBarSpacing)
aBarSpacing - the new value of the barSpacing propertypublic int getBarWidth()
public void setBarWidth(int aBarWidth)
aBarWidth - the new value of the barWidth propertypublic double getBarHeightConverter()
public void setBarHeightConverter(double aBarHeightConverter)
aBarHeightConverter - the new value of the barHeightConverter propertypublic int getXTickPixelIncrement()
public void setXTickPixelIncrement(int aXTickPixelIncrement)
aXTickPixelIncrement - the new value of the xTickPixelIncrement propertypublic int getXTickIncrementNumber()
public void setXTickIncrementNumber(int aXTickIncrementNumber)
aXTickIncrementNumber - the new value of the xTickIncrementNumber propertypublic void paint(java.awt.Graphics g)
paint() commands.paint in interface KhartzChartg - public boolean contains(java.awt.Point p)
KhartzChartcontains in interface KhartzChartp - public java.awt.Dimension getSize()
getSize in interface KhartzChartpublic java.lang.String toString()
KhartzCharttoString in interface KhartzCharttoString in class java.lang.Objectpublic double getValue(int i)
KhartzChartgetValue in interface KhartzChartgetValue in class KhartzBaseCharti - public java.lang.String getLabel(int i)
KhartzChartgetLabel in interface KhartzChartgetLabel in class KhartzBaseCharti - public void mouseMoved(java.awt.event.MouseEvent e)
KhartzChartmouseMoved in interface KhartzCharte - public void mouseReleased(java.awt.event.MouseEvent e)
KhartzChartmouseReleased in interface KhartzCharte - public void setRelativeTextSize(double size)
KhartzChartsetRelativeTextSize in interface KhartzChartsize - public double getRelativeTextSize()
KhartzChartgetRelativeTextSize in interface KhartzChartpublic void calcIncrement()
public java.awt.Font getFont()
KhartzChartgetFont in interface KhartzChartpublic void setFont(java.awt.Font f)
KhartzChartsetFont in interface KhartzChartf - public void setColorArray(java.awt.Color[] colorArray)
KhartzChartsetColorArray in interface KhartzChartsetColorArray in class KhartzBaseChartcolorArray[] - public void calcBarLayout()
barSpacing between bar segments, the
barWidth of each bar and the barHeightConverter based
on the array of values that have been passed.public double getAxisMinValue()
public void createSegments()
public int calcBarHeight(double converter,
double value)
converter - Is the barHeightConverter valuevalue - The value that the bar segment represents in the chart
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||