|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.chart.model.AbstractDelegatingChartModel
com.jidesoft.chart.model.SummingChartModel
public class SummingChartModel
A chart model that gets its y values by summing the corresponding values of its delegate chart models. The delegate chart models should have the same number of points. Points with the same index will be summed.
The class assumes by default that you wish to sum the y values of the delegate models. If you wish to sum
the x values instead for a horizontal bar chart, you must set the orientation of the SummingChartModel.
(see the setOrientation() method).
| Constructor Summary | |
|---|---|
SummingChartModel()
Default Constructor |
|
SummingChartModel(ChartModel... delegates)
Creates a ChartModel that sums values in the supplied models |
|
SummingChartModel(Collection<ChartModel> delegates)
|
|
SummingChartModel(String modelName,
ChartModel... delegates)
Creates a ChartModel that sums values in the supplied models |
|
| Method Summary | |
|---|---|
void |
clear()
|
protected Chartable |
createChartable(Positionable xPos,
Positionable yPos)
|
Annotation |
getAnnotation(int n)
Currently unsupported, but may become supported in the future |
int |
getAnnotationCount()
Currently unsupported so always returns 0 |
Orientation |
getOrientation()
Returns the orientation in which the summing occurs (by default, vertical) |
Chartable |
getPoint(int n)
Returns the nth point in the model. |
int |
getPointCount()
Returns the number of points in the model |
Range<?> |
getXRange()
Returns the x range of the model (as a Numeric Range) |
AggregatedRange |
getXRange(Positionable pos)
|
Range<?> |
getYRange()
Returns the y range of the model (as a Numeric Range) |
AggregatedRange |
getYRange(Positionable pos)
|
boolean |
isAnnotationsVisible()
Use this method to discover whether annotations should be shown or hidden. |
boolean |
isConsiderDelegateRanges()
|
void |
setAnnotationsVisible(boolean visible)
Specify whether annotations should be shown |
void |
setConsiderDelegateRanges(boolean considerDelegateRanges)
Suppose you have two delegate models for which an x coordinate in one of those models has a value of 10 and the same x coordinate in the other model has a value of -10. |
void |
setOrientation(Orientation orientation)
Specify the direction in which the summing should occur. |
protected void |
update()
|
| Methods inherited from class com.jidesoft.chart.model.AbstractDelegatingChartModel |
|---|
addChartModelListener, chartModelChanged, equals, fireModelChanged, getDelegate, getDelegate, getDelegates, getName, hashCode, init, isCyclical, iterator, removeChartModelListener, setDelegate, setDelegates, setDelegates, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SummingChartModel()
public SummingChartModel(ChartModel... delegates)
delegates - the chart models that we wish to sum overpublic SummingChartModel(Collection<ChartModel> delegates)
public SummingChartModel(String modelName,
ChartModel... delegates)
modelName - the name of the constructed modeldelegates - the chart models that we wish to sum over| Method Detail |
|---|
public void clear()
public boolean isConsiderDelegateRanges()
public void setConsiderDelegateRanges(boolean considerDelegateRanges)
public Annotation getAnnotation(int n)
getAnnotation in interface AnnotationModelgetAnnotation in class AbstractDelegatingChartModeln - the index.
public int getAnnotationCount()
getAnnotationCount in interface AnnotationModelgetAnnotationCount in class AbstractDelegatingChartModelpublic boolean isAnnotationsVisible()
AnnotationModel
isAnnotationsVisible in interface AnnotationModelpublic void setAnnotationsVisible(boolean visible)
AnnotationModel
setAnnotationsVisible in interface AnnotationModelvisible - whether annotations should be shownpublic Orientation getOrientation()
public void setOrientation(Orientation orientation)
orientation - the orientation of the summingpublic Chartable getPoint(int n)
getPoint in interface ChartModelgetPoint in class AbstractDelegatingChartModeln - the index in the model
public int getPointCount()
getPointCount in interface ChartModelgetPointCount in class AbstractDelegatingChartModelpublic Range<?> getXRange()
getXRange in interface RangeProviderpublic AggregatedRange getXRange(Positionable pos)
public Range<?> getYRange()
getYRange in interface RangeProviderpublic AggregatedRange getYRange(Positionable pos)
protected Chartable createChartable(Positionable xPos,
Positionable yPos)
protected void update()
update in class AbstractDelegatingChartModel
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||