Package com.inet.report.chart.dataset
Class StockOneGroupDataset
- java.lang.Object
-
- com.inet.report.chart.dataset.AbstractDataset
-
- com.inet.report.chart.dataset.StockForAllRecordsDataset
-
- com.inet.report.chart.dataset.StockForEachRecordDataset
-
- com.inet.report.chart.dataset.StockOneGroupDataset
-
- All Implemented Interfaces:
BaseDataset,StockDataset,java.io.Serializable
public class StockOneGroupDataset extends StockForEachRecordDataset
This is a dataset used by stock charts. This evaluates data sorted by one group for four data fields (open, close, high, low).- Since:
- 8.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.inet.report.chart.dataset.StockForAllRecordsDataset
FIELDS_COUNT
-
Fields inherited from interface com.inet.report.chart.dataset.BaseDataset
TOKEN_DATASET
-
-
Constructor Summary
Constructors Constructor Description StockOneGroupDataset(Chart2 chart)Creates a new empty dataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupgetCategoryGroup()Returns the category group.protected java.lang.StringgetName()FOR INTERNAL USE ONLYjava.util.ListgetReferencedObject()FOR INTERNAL USE ONLYvoidremoveCategoryGroup()Removes the category group.protected voidresetSummaryFields(Group group)Resets the group properties of summary fields.protected voidsaveGroups(java.io.PrintWriter out, int depth)voidsetCategoryGroup(Field field)Creates a category group on this field.java.lang.Stringverify(ChartStyle style)Verifies the group and sum properties of current dataset.-
Methods inherited from class com.inet.report.chart.dataset.StockForEachRecordDataset
getLabelProvider
-
Methods inherited from class com.inet.report.chart.dataset.StockForAllRecordsDataset
getChart, getCloseField, getDataField, getDataField, getDataFields, getHighField, getLowField, getOpenField, setCloseField, setHighField, setLowField, setOpenField, updateReferences
-
-
-
-
Constructor Detail
-
StockOneGroupDataset
public StockOneGroupDataset(Chart2 chart)
Creates a new empty dataset.- Parameters:
chart- the chart (nullnot permitted)- Since:
- 8.0
-
-
Method Detail
-
getCategoryGroup
public Group getCategoryGroup()
Returns the category group. The category group is the first group of chart.- Overrides:
getCategoryGroupin classStockForAllRecordsDataset- Returns:
- the group or
nullif 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, e.g. the x axis onPlotOrientation.VERTICALplots. To change the sort order of the data in this group get this withgetCategoryGroup()and use the Group properties.SummaryField,SpecialFieldandGroupFieldare unsupported field types.- Parameters:
field- the group field (nullnot permitted)- Throws:
java.lang.IllegalArgumentException- if field isnullor has an unsupported field type.- Since:
- 8.0
- See Also:
Group,getCategoryGroup(),removeCategoryGroup()
-
removeCategoryGroup
public void removeCategoryGroup()
Removes the category group. Note: this dataset is incomplete without a category group and cannot be used by the chart in this case.- Since:
- 8.0
- See Also:
setCategoryGroup(Field),getCategoryGroup()
-
resetSummaryFields
protected void resetSummaryFields(Group group)
Resets the group properties of summary fields.- Parameters:
group- the group- Since:
- 8.0
-
verify
public java.lang.String verify(ChartStyle style)
Verifies the group and sum properties of current dataset.- Specified by:
verifyin interfaceBaseDataset- Overrides:
verifyin classStockForAllRecordsDataset- 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- Specified by:
getReferencedObjectin interfaceBaseDataset- Overrides:
getReferencedObjectin classcom.inet.report.chart.dataset.AbstractDataset- Returns:
- FOR INTERNAL USE ONLY
-
saveGroups
protected void saveGroups(java.io.PrintWriter out, int depth)- Overrides:
saveGroupsin classcom.inet.report.chart.dataset.AbstractDataset
-
getName
protected java.lang.String getName()
FOR INTERNAL USE ONLY- Overrides:
getNamein classStockForEachRecordDataset- Returns:
- name name for this dataset
-
-