|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.model.AbstractDelegatingChartModel com.jidesoft.chart.model.WaterfallModelAdapter
public class WaterfallModelAdapter
This class converts a waterfall model to a conventional chart model. A waterfall model is one in which the first and last points of the model are absolute values, whereas the (y) values in between are interpreted as differences, each y value being a difference from the previous y value.
Field Summary | |
---|---|
static Highlight |
FALLING
|
static Highlight |
FIRST
|
static Highlight |
LAST
|
static Highlight |
RISING
|
Constructor Summary | |
---|---|
WaterfallModelAdapter(ChartModel waterfallModel)
Constructs a conventional ChartModel out of a waterfall model. |
Method Summary | |
---|---|
Annotation |
getAnnotation(int n)
Gets the nth annotation. |
int |
getAnnotationCount()
Returns the number of annotations |
Chartable |
getPoint(int n)
Gets the nth point. |
int |
getPointCount()
Gets the number of points in the data set |
boolean |
isAnnotationsVisible()
Use this method to discover whether annotations should be shown or hidden. |
boolean |
isCyclical()
Cyclical models are quite rare so we return a value of false here as a default. |
Iterator<Chartable> |
iterator()
|
void |
setAnnotationsVisible(boolean visible)
Specify whether annotations should be shown |
protected void |
update()
Updates the points of this model based on the points of its delegate model |
Methods inherited from class com.jidesoft.chart.model.AbstractDelegatingChartModel |
---|
addChartModelListener, chartModelChanged, equals, fireModelChanged, getDelegate, getDelegate, getDelegates, getName, hashCode, init, removeChartModelListener, setDelegate, setDelegates, setDelegates, setName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Highlight FIRST
public static final Highlight RISING
public static final Highlight FALLING
public static final Highlight LAST
Constructor Detail |
---|
public WaterfallModelAdapter(ChartModel waterfallModel)
waterfallModel
- a chart model in which the values are interpreted as waterfall valuesMethod Detail |
---|
protected void update()
update
in class AbstractDelegatingChartModel
public int getAnnotationCount()
getAnnotationCount
in interface AnnotationModel
getAnnotationCount
in class AbstractDelegatingChartModel
public Annotation getAnnotation(int n)
getAnnotation
in interface AnnotationModel
getAnnotation
in class AbstractDelegatingChartModel
n
- the index.
public boolean isAnnotationsVisible()
public void setAnnotationsVisible(boolean visible)
visible
- whether annotations should be shownpublic Chartable getPoint(int n)
getPoint
in interface ChartModel
getPoint
in class AbstractDelegatingChartModel
n
- the index
ChartModel
.public int getPointCount()
getPointCount
in interface ChartModel
getPointCount
in class AbstractDelegatingChartModel
public boolean isCyclical()
isCyclical
in interface ChartModel
isCyclical
in class AbstractDelegatingChartModel
public Iterator<Chartable> iterator()
iterator
in interface Iterable<Chartable>
iterator
in class AbstractDelegatingChartModel
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |