public class CombinedPlot extends java.lang.Object implements ChartPlot
Modifier and Type | Field and Description |
---|---|
static int |
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_DATA_AXIS
This combine type allows show several charts side by side.
|
static int |
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_GROUP_AXIS
This combine type allows show several charts side by side.
|
static int |
COMBINE_ONE_PLOT_WITH_COMMON_DATA_AXIS
This combine type allows show several charts in same plot.
|
static int |
COMBINE_ONE_PLOT_WITH_COMMON_GROUP_AXIS
This combine type allows show several charts in same plot.
|
static java.lang.String |
TOKEN_COMBINED_PLOT
XML token for a combined plot element.
|
Constructor and Description |
---|
CombinedPlot()
Creates a empty CombinedPlot.
|
CombinedPlot(int combineType)
Creates a empty CombinedPlot.
|
Modifier and Type | Method and Description |
---|---|
void |
addPlot(AbstractPlot plot)
The list of plots contains either only one unspecified plot or more combinable plots.
|
int |
getCombineType()
Returns the combine type.
|
BaseDataset |
getDataset()
Returns nothing (
null ). |
AbstractPlot |
getPlot(int index)
Returns the chart plot at the specified position in this list.
|
java.util.List |
getReferencedObject()
|
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Reads the chart properties from the DOMParser Element.
|
void |
refreshAutoTitles(Chart2 chart)
Reads out the data column names from dataset and refreshes the chart labels.
|
AbstractPlot |
removePlot(int index)
Removes the chart plot at the specified position in this list.
|
void |
saveProperties(java.io.PrintWriter out,
int depth)
Writes the properties of this chart plot to
PrintWriter . |
void |
setCombineType(int combineType)
Sets the combine type.
|
int |
size()
Returns the number of chart plots in this list.
|
public static final java.lang.String TOKEN_COMBINED_PLOT
public static final int COMBINE_ONE_PLOT_WITH_COMMON_GROUP_AXIS
public static final int COMBINE_ONE_PLOT_WITH_COMMON_DATA_AXIS
public static final int COMBINE_MULTIPLE_PLOTS_WITH_COMMON_GROUP_AXIS
public static final int COMBINE_MULTIPLE_PLOTS_WITH_COMMON_DATA_AXIS
public CombinedPlot()
setCombineType(int)
public CombinedPlot(int combineType)
combineType
- the type of combiningjava.lang.IllegalArgumentException
- by unknown combine typesetCombineType(int)
,
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_GROUP_AXIS
,
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_DATA_AXIS
,
COMBINE_ONE_PLOT_WITH_COMMON_GROUP_AXIS
,
COMBINE_ONE_PLOT_WITH_COMMON_DATA_AXIS
public void addPlot(AbstractPlot plot)
BarPlot
, LinePlot
, AreaPlot
or ContinuousAreaPlot
, ContinuousBarPlot
, ContinuousLinePlot
.plot
- the plot to be appended to this listjava.lang.IllegalArgumentException
- if this plot is not combinable or by unsupported combination of plots.getPlot(int)
,
removePlot(int)
,
size()
,
AbstractPlot
public AbstractPlot removePlot(int index)
index
- the index of the plot to removedjava.lang.IndexOutOfBoundsException
- if index out of range (index
< 0 || index >= size()).addPlot(AbstractPlot)
,
getPlot(int)
,
size()
,
AbstractPlot
public AbstractPlot getPlot(int index)
index
- index of plot to returnjava.lang.IndexOutOfBoundsException
- if index is out of range (index
< 0 || index >= size()).addPlot(AbstractPlot)
,
removePlot(int)
,
size()
,
AbstractPlot
public int size()
addPlot(AbstractPlot)
,
removePlot(int)
,
getPlot(int)
public int getCombineType()
setCombineType(int)
,
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_GROUP_AXIS
,
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_DATA_AXIS
,
COMBINE_ONE_PLOT_WITH_COMMON_GROUP_AXIS
,
COMBINE_ONE_PLOT_WITH_COMMON_DATA_AXIS
public void setCombineType(int combineType)
combineType
- the type.java.lang.IllegalArgumentException
- if unsupported combination of plots.getCombineType()
,
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_GROUP_AXIS
,
COMBINE_MULTIPLE_PLOTS_WITH_COMMON_DATA_AXIS
,
COMBINE_ONE_PLOT_WITH_COMMON_GROUP_AXIS
,
COMBINE_ONE_PLOT_WITH_COMMON_DATA_AXIS
public void refreshAutoTitles(Chart2 chart)
refreshAutoTitles
in interface ChartPlot
chart
- the chartpublic void saveProperties(java.io.PrintWriter out, int depth)
PrintWriter
.saveProperties
in interface ChartPlot
out
- the outputdepth
- the depth of XML indentpublic java.util.List getReferencedObject()
getReferencedObject
in interface ChartPlot
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
readProperties
in interface ChartPlot
element
- the DOMParser Elementchart
- the chartpublic BaseDataset getDataset()
null
).
To gets the datasets of this chart use getPlot(int)
abd ChartPlot.getDataset()
of each plot.getDataset
in interface ChartPlot
ChartPlot.getDataset()
Copyright © 1999-2020 by i-net software GmbH