|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--khartzToolz.ChartSegment
|
+--khartzToolz.BarSegment
The basic class for creating a bar chart segment
| Field Summary | |
khartzToolz.KhartzLabel |
segValLabel
|
java.awt.Label |
theLabel
|
| Constructor Summary | |
BarSegment(KhartzChart k,
int seq,
double value,
java.lang.String label,
java.awt.Rectangle layout,
java.awt.Color barColor)
Standard constructor for a bar chart segment |
|
| Method Summary | |
void |
calcClickArea()
Calculates the area that can be clicked on with a mouse to perform an action. |
int |
compareTo(java.lang.Object o)
This method attempts to determine a logical ordering between objects using the segment characteristics to determine this. |
boolean |
contains(java.awt.Point p)
|
boolean |
equals(khartzToolz.ChartSegment cs)
|
java.awt.Rectangle |
getBarArea()
Access method for the barArea property. |
java.awt.Point |
getCentre()
Access method for the centre property. |
KhartzChart |
getChart()
Returns the current containing chart |
java.awt.Color |
getColor()
Fetches the current chart segment's colour |
java.util.Date |
getDate()
Returns the date associated with the current segment |
boolean |
getHighlight()
|
java.lang.String |
getLabel()
Returns the current label |
java.awt.Polygon |
getSegArea()
Returns the current segment area |
int |
getSequence()
Fetches the segment's current sequence within the chart. |
java.awt.Rectangle |
getSize()
Returns the dimensions of the current chart segment |
java.awt.Color |
getTextColor()
Returns the current selected text color for the segment |
double |
getValue()
|
khartzToolz.KhartzLabel |
getXLabel()
Access method for the xLabel property. |
void |
initialisePoly(java.awt.Rectangle r)
The common initialisation for the Polygon area contained by the chart segment |
void |
paint(java.awt.Graphics g)
This is the standard drawing routine for the segment and must be overridden |
void |
setBarArea(java.awt.Rectangle aBarArea)
Sets the value of the barArea property. |
void |
setCentre(java.awt.Point aCentre)
Sets the value of the centre property. |
void |
setColor(java.awt.Color c)
Sets the current colour for the chart segment |
void |
setDate(java.util.Date d)
|
void |
setHighlight(boolean b)
|
void |
setLabel(java.lang.String s)
Sets the label for the segment |
void |
setSegArea(java.awt.Polygon p)
|
void |
setTextColor(java.awt.Color c)
Sets the text color for the current chart segment |
void |
setValue(double val)
Sets the current value for the segment |
void |
setXLabel(khartzToolz.KhartzLabel aXLabel)
Sets the value of the xLabel property. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.awt.Label theLabel
public khartzToolz.KhartzLabel segValLabel
| Constructor Detail |
public BarSegment(KhartzChart k,
int seq,
double value,
java.lang.String label,
java.awt.Rectangle layout,
java.awt.Color barColor)
k - An instance of the containing chartseq - An integer representing this segments position within the sequence
of segments in the chart.value - The value that this segment is displayinglabel - The text label for this segmentlayout - A rectangle that contains the position and the height and width
of the rectangle.barColor - The display color for this segment| Method Detail |
public java.awt.Rectangle getBarArea()
public void setBarArea(java.awt.Rectangle aBarArea)
aBarArea - the new value of the barArea propertypublic khartzToolz.KhartzLabel getXLabel()
public void setXLabel(khartzToolz.KhartzLabel aXLabel)
aXLabel - the new value of the xLabel propertypublic java.lang.String toString()
toString in class khartzToolz.ChartSegmentpublic boolean equals(khartzToolz.ChartSegment cs)
equals in class khartzToolz.ChartSegmentcs - public boolean contains(java.awt.Point p)
contains in class khartzToolz.ChartSegmentp - public void paint(java.awt.Graphics g)
khartzToolz.ChartSegmentpaint in class khartzToolz.ChartSegmentg - public void calcClickArea()
khartzToolz.ChartSegmentcalcClickArea in class khartzToolz.ChartSegmentpublic int compareTo(java.lang.Object o)
khartzToolz.ChartSegmentcompareTo in class khartzToolz.ChartSegmento - public java.awt.Point getCentre()
public void setCentre(java.awt.Point aCentre)
aCentre - the new value of the centre propertypublic double getValue()
public void setValue(double val)
val - public void setLabel(java.lang.String s)
s - A String containing the text to be displayed as a labelpublic void setDate(java.util.Date d)
d - public void setColor(java.awt.Color c)
c - public java.awt.Color getColor()
public void initialisePoly(java.awt.Rectangle r)
r - A Rectangle representing the chart segment display areapublic void setTextColor(java.awt.Color c)
c - public java.awt.Color getTextColor()
public int getSequence()
public boolean getHighlight()
public void setHighlight(boolean b)
b - public java.awt.Rectangle getSize()
public java.lang.String getLabel()
public java.util.Date getDate()
public KhartzChart getChart()
public java.awt.Polygon getSegArea()
public void setSegArea(java.awt.Polygon p)
p -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||