i-net Clear Reports

com.inet.report.chart.plot
Class StandardPlot

java.lang.Object
  extended by com.inet.report.chart.plot.AbstractPlot
      extended by com.inet.report.chart.plot.StandardPlot
All Implemented Interfaces:
ChartPlot, java.io.Serializable
Direct Known Subclasses:
com.inet.report.chart.plot.AbstractLinePlot, AreaPlot, BarPlot, Chart3DPlot, ContinuousAreaPlot, ContinuousBarPlot, PolarPlot

public abstract class StandardPlot
extends AbstractPlot

A general plotting class that uses BaseAxis as category axis, DiscreteNumberAxis as data axis and StandardDataset as data source.

Since:
8.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.inet.report.chart.plot.AbstractPlot
AbstractPlot.GradientSetting
 
Field Summary
static int ITEM_LABEL_POSITION_BASE
          The label position over the bottom of the item.
static int ITEM_LABEL_POSITION_CENTER
          The label position in the center of the item.
static int ITEM_LABEL_POSITION_INSIDE_OF_MAX
          The label position inside the max of the item.
static int ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
          The label position outside the max of the item.
 
Fields inherited from class com.inet.report.chart.plot.AbstractPlot
DEFAULT_COLOR_SEQUENCE, DEFAULT_FOREGROUND_ALPHA, DEFAULT_ITEM_LABEL_COLOR, DEFAULT_ITEM_LABEL_FONT, DEFAULT_OUTLINE_COLOR, DEFAULT_OUTLINE_STYLE, DEFAULT_OUTLINE_WIDTH, TOKEN_PLOT
 
Method Summary
 BaseAxis getCategoryAxis()
          Returns the category axis.
 DiscreteNumberAxis getDataAxis()
          Returns the data axis of this plot.
 StandardDataset getDataset()
          Returns the data container of this plot.
 int getItemLabelPosition()
          Returns the item label position on the chart item.
abstract  ChartStyle getStyle()
          Returns the style of this chart, ie. the general category this plot belongs to.
protected  java.lang.StringBuffer getSubProperties(int depth)
          Returns the serialized simple properties of subclasses.
 boolean isShowCumulativeValues()
          Returns the flag that controls whether or not the item label labels shows cumulative or absolute values.
 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.
protected  void saveSubProperties(java.io.PrintWriter out, int depth)
          Writes the intern properties to output.
 void setCategoryAxis(BaseAxis categoryAxis)
          Sets the category axis for this plot.
 void setDataAxis(DiscreteNumberAxis dataAxis)
          Sets the data axis for this plot.
 void setDataset(StandardDataset dataset)
          Sets the data container for this plot.
 void setItemLabelPosition(int itemLabelPosition)
          Sets the item label position on the chart item.
 void setShowCumulativeValues(boolean showCumulativeValues)
          Sets the flag that controls whether or not the item labels shows cumulative or absolute values.
 
Methods inherited from class com.inet.report.chart.plot.AbstractPlot
getBackColor, getColorFormula, getColorSequence, getForegroundAlpha, getGradientSetting, getItemLabelColor, getItemLabelFont, getItemLabelFormat, getItemShape, getOutlineColor, getOutlineStyle, getOutlineWidth, getReferencedObject, isColorBySeries, isDrawOutline, isSameColorsForSameGroups, isShowLabel, isShowValue, saveProperties, setBackColor, setColorBySeries, setColorFormula, setColorSequence, setDrawOutline, setForegroundAlpha, setGradientSetting, setItemLabelColor, setItemLabelFont, setItemLabelFormat, setItemShape, setOutlineColor, setOutlineStyle, setOutlineWidth, setSameColorsForSameGroups, setShowLabel, setShowValue
 

Field Detail

ITEM_LABEL_POSITION_OUTSIDE_OF_MAX

public static final int ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
The label position outside the max of the item.

See Also:
Constant Field Values

ITEM_LABEL_POSITION_INSIDE_OF_MAX

public static final int ITEM_LABEL_POSITION_INSIDE_OF_MAX
The label position inside the max of the item.

See Also:
Constant Field Values

ITEM_LABEL_POSITION_CENTER

public static final int ITEM_LABEL_POSITION_CENTER
The label position in the center of the item.

See Also:
Constant Field Values

ITEM_LABEL_POSITION_BASE

public static final int ITEM_LABEL_POSITION_BASE
The label position over the bottom of the item.

See Also:
Constant Field Values
Method Detail

getDataset

public StandardDataset getDataset()
Returns the data container of this plot.

Returns:
the dataset.
Since:
8.0
See Also:
setDataset(StandardDataset), ForAllRecordsDataset, ForEachRecordDataset, OneGroupDataset, TwoGroupsDataset

setDataset

public void setDataset(StandardDataset dataset)
Sets the data container for this plot.

Parameters:
dataset - the dataset (null not permitted)
Since:
8.0
See Also:
getDataset(), StandardDataset, ForAllRecordsDataset, ForEachRecordDataset, OneGroupDataset, TwoGroupsDataset

getCategoryAxis

public BaseAxis getCategoryAxis()
Returns the category axis. The category axis shows the values of the first group field.

Returns:
the categoryAxis
Since:
8.0
See Also:
setCategoryAxis(BaseAxis), BaseAxis

setCategoryAxis

public void setCategoryAxis(BaseAxis categoryAxis)
Sets the category axis for this plot. The category axis shows the values of the first group field.

Parameters:
categoryAxis - the category axis (null not permitted)
Since:
8.0
See Also:
getCategoryAxis(), BaseAxis

getDataAxis

public DiscreteNumberAxis getDataAxis()
Returns the data axis of this plot. The data axis shows the summarized values of the data fields.

Returns:
the dataAxis
Since:
8.0
See Also:
setDataAxis(DiscreteNumberAxis), DiscreteNumberAxis

setDataAxis

public void setDataAxis(DiscreteNumberAxis dataAxis)
Sets the data axis for this plot. The data axis shows the summarized values of the data fields.

Parameters:
dataAxis - the data axis (null not permitted)
Since:
8.0
See Also:
getDataAxis(), DiscreteNumberAxis

isShowCumulativeValues

public boolean isShowCumulativeValues()
Returns the flag that controls whether or not the item label labels shows cumulative or absolute values.

Returns:
the flag true for cumulative false for absolute values.
Since:
8.0
See Also:
setShowCumulativeValues(boolean)

setShowCumulativeValues

public void setShowCumulativeValues(boolean showCumulativeValues)
Sets the flag that controls whether or not the item labels shows cumulative or absolute values.

Parameters:
showCumulativeValues - the flag true for cumulative false for absolute values
Since:
8.0
See Also:
isShowCumulativeValues()

getItemLabelPosition

public int getItemLabelPosition()
Returns the item label position on the chart item.

Returns:
the item label position.
Since:
8.0
See Also:
setItemLabelPosition(int), ITEM_LABEL_POSITION_BASE, ITEM_LABEL_POSITION_CENTER, ITEM_LABEL_POSITION_INSIDE_OF_MAX, ITEM_LABEL_POSITION_OUTSIDE_OF_MAX

setItemLabelPosition

public void setItemLabelPosition(int itemLabelPosition)
Sets the item label position on the chart item. Note this property works for bar, line, area charts only. An item label is a label with name and value on each chart item. Default position is ITEM_LABEL_POSITION_OUTSIDE_OF_MAX.

Parameters:
itemLabelPosition - the itemLabelPosition to set
Throws:
java.lang.IllegalArgumentException - by unknown position.
Since:
8.0
See Also:
setItemLabelPosition(int), ITEM_LABEL_POSITION_BASE, ITEM_LABEL_POSITION_CENTER, ITEM_LABEL_POSITION_INSIDE_OF_MAX, ITEM_LABEL_POSITION_OUTSIDE_OF_MAX

refreshAutoTitles

public void refreshAutoTitles(Chart2 chart)
Reads out the data column names from dataset and refreshes the chart labels. Please use this function to refresh the chart labels if the data was be changed.

Specified by:
refreshAutoTitles in interface ChartPlot
Specified by:
refreshAutoTitles in class AbstractPlot
Parameters:
chart - the chart

getStyle

public abstract ChartStyle getStyle()
Returns the style of this chart, ie. the general category this plot belongs to.

Specified by:
getStyle in class AbstractPlot
Returns:
the style
See Also:
BarStyle.BAR2D, LineStyle.LINE_MARKER, AreaStyle.AREA2D_STACKED

saveSubProperties

protected void saveSubProperties(java.io.PrintWriter out,
                                 int depth)
Writes the intern properties to output. Overwrites this to save intern properties direct to PrintWriter without building a StringBuffer.

Overrides:
saveSubProperties in class AbstractPlot
Parameters:
out - the output
depth - the depth of XML indent

getSubProperties

protected java.lang.StringBuffer getSubProperties(int depth)
Returns the serialized simple properties of subclasses.

Overrides:
getSubProperties in class AbstractPlot
Parameters:
depth - the depth of XML indent
Returns:
the properties.

readProperties

public void readProperties(org.w3c.dom.Element element,
                           Chart2 chart)
Reads the chart properties from the DOMParser Element.

Specified by:
readProperties in interface ChartPlot
Overrides:
readProperties in class AbstractPlot
Parameters:
element - the DOMParser Element
chart - the chart

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH