i-net Clear Reports

com.inet.report.chart.dataset
Class OneGroupDataset

java.lang.Object
  extended by com.inet.report.chart.dataset.AbstractDataset
      extended by com.inet.report.chart.dataset.ForAllRecordsDataset
          extended by com.inet.report.chart.dataset.OneGroupDataset
All Implemented Interfaces:
BaseDataset, PieDataset, StandardDataset, java.io.Serializable

public class OneGroupDataset
extends ForAllRecordsDataset
implements StandardDataset, PieDataset

This is a dataset used by standard (bar, line, area) and pie charts. This evaluates data sorted by one group for several data fields.

Since:
8.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.inet.report.chart.dataset.BaseDataset
TOKEN_DATASET
 
Constructor Summary
OneGroupDataset(Chart2 chart)
          Creates a new empty data set.
 
Method Summary
 Group getCategoryGroup()
          Returns the category group.
 com.inet.report.chart.dataset.LabelProvider getLabelProvider()
          Returns the LabelProvider responsible for providing the title, footnote, and axis labels
protected  java.lang.String getName()
          FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.
 java.util.List getReferencedObject()
          FOR INTERNAL USE ONLY
 void removeCategoryGroup()
          Removes the category group.
protected  void saveGroups(java.io.PrintWriter out, int depth)
          Writes the groups properties to output.
 void setCategoryGroup(Field field)
          Creates a category group on this field.
 java.lang.String verify(ChartStyle style)
          Verifies the group and sum properties of current dataset.
 
Methods inherited from class com.inet.report.chart.dataset.ForAllRecordsDataset
addDataField, getChart, getDataField, getDataField, getDataFields, getDataFieldsCount, removeAllDataFields, removeDataField
 
Methods inherited from interface com.inet.report.chart.dataset.BaseDataset
getChart, getDataField, getDataFields
 

Constructor Detail

OneGroupDataset

public OneGroupDataset(Chart2 chart)
Creates a new empty data set.

Parameters:
chart - the chart (null not permitted)
Since:
8.0
Method Detail

getCategoryGroup

public Group getCategoryGroup()
Returns the category group. The category group is the first group of chart.

Overrides:
getCategoryGroup in class ForAllRecordsDataset
Returns:
the group or null if this group was not initialized.
Since:
8.0
See Also:
setCategoryGroup(Field), removeCategoryGroup()

setCategoryGroup

public void setCategoryGroup(Field field)
Creates a category group on this field. This group is for sorting and consolidating records with same values on the group axis, i.e. the x axis by PlotOrientation.VERTICAL. To change the sort order of the data in this group, get this with getCategoryGroup() and use the Group properties. SummaryField, SpecialField and GroupField are unsupported field types.

Parameters:
field - the group field (null not permitted)
Throws:
java.lang.IllegalArgumentException - if field is null or has an unsupported field type.
Since:
8.0
See Also:
Group, getCategoryGroup(), removeCategoryGroup()

removeCategoryGroup

public void removeCategoryGroup()
Removes the category group. Note: this data set is incomplete without a category groupand cannot be used by the chart.

Since:
8.0
See Also:
setCategoryGroup(Field), getCategoryGroup()

verify

public java.lang.String verify(ChartStyle style)
Verifies the group and sum properties of current dataset.

Specified by:
verify in interface BaseDataset
Overrides:
verify in class ForAllRecordsDataset
Parameters:
style - the chart style
Returns:
the error message or empty string if all properties are correct.

getReferencedObject

public java.util.List getReferencedObject()
FOR INTERNAL USE ONLY

Overrides:
getReferencedObject in class com.inet.report.chart.dataset.AbstractDataset
Returns:
FOR INTERNAL USE ONLY

saveGroups

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

Overrides:
saveGroups in class com.inet.report.chart.dataset.AbstractDataset
Parameters:
out - the output
depth - the depth of XML indent

getName

protected java.lang.String getName()
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.

Returns:
name of the XML attribute for this dataset

getLabelProvider

public com.inet.report.chart.dataset.LabelProvider getLabelProvider()
Returns the LabelProvider responsible for providing the title, footnote, and axis labels

Specified by:
getLabelProvider in interface BaseDataset
Overrides:
getLabelProvider in class ForAllRecordsDataset
Returns:
the LabelProvider responsible for providing the title, footnote, and axis labels

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH