|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart.JCDefaultChartLabelManager
JCDefaultChartLabelManager
provides the default implementation
for managing ChartLabels on a chart.
Field Summary | |
protected Hashtable |
autoLabelListHashtable
|
protected com.klg.jclass.chart.JCChartLabel |
currentDwellLabel
|
protected Vector |
dwellLabels
|
static String |
ERRMSG_INVALID_LABEL_INDEX
|
protected Vector |
labels
|
protected com.klg.jclass.chart.JCChart |
parentChart
|
Constructor Summary | |
JCDefaultChartLabelManager()
|
Method Summary | |
void |
addAutoLabels(com.klg.jclass.chart.ChartDataView cdv,
int addSeries,
int addPoint)
Adds some automatically created JCChartLabels . |
void |
addChartLabel(com.klg.jclass.chart.JCChartLabel label)
Adds a chart labelin the process, it forces a recalc and a redraw of the parent chart. |
void |
addToDwellLabels(com.klg.jclass.chart.JCChartLabel label)
Adds a new chart label to the list of dwell labels. |
protected void |
appendChartLabel(com.klg.jclass.chart.JCChartLabel label)
Adds a chart label quietly. |
void |
clearAutoLabels(com.klg.jclass.chart.ChartDataView cdv)
Clears the auto labels list for this data view. |
protected com.klg.jclass.chart.JCChartLabel |
createAutoLabel(String label,
com.klg.jclass.chart.ChartDataViewSeries srs,
int point)
Creates one automatically generated chart label. |
String |
createAutoLabelText(com.klg.jclass.chart.ChartDataView cdv,
int series,
int point)
Creates the text for an auto label given the series and point. |
protected void |
deleteChartLabel(com.klg.jclass.chart.JCChartLabel label)
Removes a chart label with no update. |
void |
generateAutoLabels(com.klg.jclass.chart.ChartDataView cdv)
Automatically creates JCChartLabels for every series and point,
if requested. |
com.klg.jclass.chart.JCChartLabel[][] |
getAutoLabelList(com.klg.jclass.chart.ChartDataView cdv)
Gets the AutoLabelList property for the
ChartDataView object. |
List |
getChartLabels()
Gets the value of the ChartLabels indexed property. |
com.klg.jclass.chart.JCChartLabel |
getChartLabels(int index)
Gets a value of the ChartLabels indexed property. |
com.klg.jclass.chart.JCChartLabel |
getCurrentDwellLabel()
Gets the current dwell label. |
Point |
getCurrentDwellLabelAttachPoint()
Gets the AttachPoint property of the current dwell label, if one
exists. |
JComponent |
getCurrentDwellLabelComponent()
Gets the Component property of the current dwell label. |
int |
getNumChartLabels()
Gets the current number of chart labels. |
com.klg.jclass.chart.JCChart |
getParentChart()
Gets the parent chart, whose chart labels are managed by this class. |
boolean |
locateCurrentDwellLabel(int x,
int y)
Locates the current dwell label (setting the currentDwellLabel
variable
in the process) that is associated with the given coordinates. |
void |
markAllChartLabelsForRecalc()
Marks all chart labels for later recalculation. |
void |
paintConnectors(Graphics gc)
Paints the connectors between the chart labels and the points they are connected to. |
void |
recalcChangedChartLabels()
Forces recalculation of any chart labels marked for a recalc. |
void |
removeAllChartLabels()
Removes all of the chart labels. |
void |
removeAutoLabels(com.klg.jclass.chart.ChartDataView cdv)
Removes all of the automatically created JCChartLabels . |
void |
removeAutoLabels(com.klg.jclass.chart.ChartDataView cdv,
int remSeries,
int remPoint)
Removes some of the automatically created JCChartLabels . |
void |
removeChartLabel(com.klg.jclass.chart.JCChartLabel label)
Removes a chart label, forcing a recalc of the label being removed and a redraw of the parent chart. |
void |
removeFromDwellLabels(com.klg.jclass.chart.JCChartLabel label)
Removes a chart label to the list of dwell labels. |
void |
setAutoLabelText(com.klg.jclass.chart.ChartDataView cdv,
int series,
int point)
Sets the text on an auto label given the series and point. |
void |
setChartLabels(int index,
com.klg.jclass.chart.JCChartLabel lbl)
Sets a value of the ChartLabels indexed property. |
void |
setChartLabels(List s)
Sets the value of the ChartLabels indexed property. |
void |
setParentChart(com.klg.jclass.chart.JCChart chart)
Sets the parent chart, whose chart labels are manged by this class. |
void |
updateParent(int cf)
Updates the parent chart based on the type of change made to the child chart label. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ERRMSG_INVALID_LABEL_INDEX
protected Vector labels
protected Vector dwellLabels
protected com.klg.jclass.chart.JCChartLabel currentDwellLabel
protected Hashtable autoLabelListHashtable
protected com.klg.jclass.chart.JCChart parentChart
Constructor Detail |
public JCDefaultChartLabelManager()
Method Detail |
public void setParentChart(com.klg.jclass.chart.JCChart chart)
setParentChart
in interface JCChartLabelManager
chart
- parent JCChart
instancepublic com.klg.jclass.chart.JCChart getParentChart()
getParentChart
in interface JCChartLabelManager
JCChart
instancepublic void paintConnectors(Graphics gc)
paintConnectors
in interface JCChartLabelManager
gc
- Graphics
object of parent chart; used for painting
connectorspublic void addChartLabel(com.klg.jclass.chart.JCChartLabel label)
addChartLabel
in interface JCChartLabelManager
label
- the JCChartLabel
instance to addprotected void appendChartLabel(com.klg.jclass.chart.JCChartLabel label)
label
- public void addToDwellLabels(com.klg.jclass.chart.JCChartLabel label)
addToDwellLabels
in interface JCChartLabelManager
label
- the JCChartLabel
instance being added to the dwell
label listpublic boolean locateCurrentDwellLabel(int x, int y)
currentDwellLabel
variable
in the process) that is associated with the given coordinates.
locateCurrentDwellLabel
in interface JCChartLabelManager
x
- the x coordinate within the JCChartArea
y
- the y coordinate within the JCChartArea
true
if dwell label found; false
otherwisepublic Point getCurrentDwellLabelAttachPoint()
AttachPoint
property of the current dwell label, if one
exists.
getCurrentDwellLabelAttachPoint
in interface JCChartLabelManager
AttachPoint
property of the current dwell label, an
instance of the Point
object, or null.public JComponent getCurrentDwellLabelComponent()
Component
property of the current dwell label.
getCurrentDwellLabelComponent
in interface JCChartLabelManager
JComponent
classpublic com.klg.jclass.chart.JCChartLabel getCurrentDwellLabel()
getCurrentDwellLabel
in interface JCChartLabelManager
JCChartLabel
classpublic void removeChartLabel(com.klg.jclass.chart.JCChartLabel label)
removeChartLabel
in interface JCChartLabelManager
label
- the JCChartLabel
instance to remove from the chart
label listprotected void deleteChartLabel(com.klg.jclass.chart.JCChartLabel label)
label
- the JCChartLabel
instance to remove from the chart
label listpublic void removeFromDwellLabels(com.klg.jclass.chart.JCChartLabel label)
removeFromDwellLabels
in interface JCChartLabelManager
label
- the JCChartLabel
instance to remove from the dwell
label listpublic int getNumChartLabels()
getNumChartLabels
in interface JCChartLabelManager
public void removeAllChartLabels()
AutoLabel
property has
been set on any of the Chart's DataViews, the property will be set to
false
and the list of auto labels nulled out.
removeAllChartLabels
in interface JCChartLabelManager
public com.klg.jclass.chart.JCChartLabel getChartLabels(int index)
ChartLabels
indexed property.
The ChartLabels
property controls a list of chart labels
managed by the chart.
getChartLabels
in interface JCChartLabelManager
index
- position at which to add the new object
public void setChartLabels(int index, com.klg.jclass.chart.JCChartLabel lbl)
ChartLabels
indexed property.
The ChartLabels
property controls a list of chart labels
managed by the chart.
setChartLabels
in interface JCChartLabelManager
index
- Position at which to add the new object. To add a new
item at the end, set the position to the current size of the labels
array.lbl
- new chart label to be added
IllegalArgumentException
- Thrown if the index is larger than
the size of the array.public List getChartLabels()
ChartLabels
indexed property.
The ChartLabels
property controls a list of chart labels
managed by the chart.
getChartLabels
in interface JCChartLabelManager
com.sun.java.util
class.public void setChartLabels(List s)
ChartLabels
indexed property.
The ChartLabels
property controls a list of chart labels
managed by the chart.
setChartLabels
in interface JCChartLabelManager
s
- list object containing chart labels to add to this JCChartcom.sun.java.util.collections.List
.public void markAllChartLabelsForRecalc()
markAllChartLabelsForRecalc
in interface JCChartLabelManager
public void recalcChangedChartLabels()
recalcChangedChartLabels
in interface JCChartLabelManager
public com.klg.jclass.chart.JCChartLabel[][] getAutoLabelList(com.klg.jclass.chart.ChartDataView cdv)
AutoLabelList
property for the
ChartDataView
object. The AutoLabelList
property is
a two-dimensional array of automatically-generated JCChartLabel
instances, one for every point and series. The inner array is indexed by
point; the outer array by series.
getAutoLabelList
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto
label list
JCChartLabel
objects representing the
automatically generated chart labelspublic void generateAutoLabels(com.klg.jclass.chart.ChartDataView cdv)
JCChartLabels
for every series and point,
if requested. The result is saved in the autoLabelList
hashtable.
generateAutoLabels
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto
label listprotected com.klg.jclass.chart.JCChartLabel createAutoLabel(String label, com.klg.jclass.chart.ChartDataViewSeries srs, int point)
srs
- point
- label
-
public String createAutoLabelText(com.klg.jclass.chart.ChartDataView cdv, int series, int point)
createAutoLabelText
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto label listseries
- the series numberpoint
- the point number within the series
public void setAutoLabelText(com.klg.jclass.chart.ChartDataView cdv, int series, int point)
setAutoLabelText
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto
label listseries
- the series numberpoint
- the point number within the seriespublic void addAutoLabels(com.klg.jclass.chart.ChartDataView cdv, int addSeries, int addPoint)
JCChartLabels
.
addAutoLabels
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto
label listaddSeries
- The series number to which auto labels are added. If -1,
add applies to all series.addPoint
- The point number within a series to which auto labels are
added. If -1, auto labels are added to all points within the given series.public void removeAutoLabels(com.klg.jclass.chart.ChartDataView cdv, int remSeries, int remPoint)
JCChartLabels
.
removeAutoLabels
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto
label listremSeries
- The series number to which auto labels are removed. If -1,
remove applies to all series.remPoint
- The point number within a series for which auto labels are
removed. If -1, auto labels are removed from all points within the given
series.public void removeAutoLabels(com.klg.jclass.chart.ChartDataView cdv)
JCChartLabels
.
removeAutoLabels
in interface JCChartLabelManager
cdv
- the ChartDataView
instance that defines the auto
label listpublic void clearAutoLabels(com.klg.jclass.chart.ChartDataView cdv)
clearAutoLabels
in interface JCChartLabelManager
cdv
- ChartDataView
instance from which the auto labels are
to be clearedpublic void updateParent(int cf)
updateParent
in interface JCChartLabelManager
cf
- the changed flag
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |