Class JFreeChartAsciiReader
java.lang.Object
net.simplace.core.io.AbstractDataReader
net.simplace.core.io.AbstractAsciiReader
net.simplace.ui.jfreechart.JFreeChartAsciiReader
public class JFreeChartAsciiReader
extends net.simplace.core.io.AbstractAsciiReader
Reads an ASCII file (see
AbstractAsciiReader) into a
JFreeChart dataset. The head column gives the row keys, every other column a series (or category).-
Field Summary
Fields inherited from class net.simplace.core.io.AbstractAsciiReader
iDefaultDateFormat, iSeperator, iSourceFile, iTabLenFields inherited from class net.simplace.core.io.AbstractDataReader
iColumnsData, iConfigData, iObservable -
Constructor Summary
ConstructorsConstructorDescriptionJFreeChartAsciiReader(File aSourceFile, org.jdom2.Element aConfigData, String aTabLen, String aSeperator, String aDefaultDateFormat, net.simplace.core.FWObservable aPObservable) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocessLineOfFile(String aOrientation, String aLine, int aRowIdx) Adds the values of a line to a category dataset: row key is the value of the head column (defaultRow+ index), column key the column name; with orientationhorizontalthe columns are the series, withverticalthe rows.org.jfree.data.category.CategoryDatasetorg.jfree.data.general.PieDataset<String> Reads the file into a pie dataset.org.jfree.data.xy.TableXYDatasetReads the file into an XY dataset.Methods inherited from class net.simplace.core.io.AbstractAsciiReader
getStringParameter, getTitle, initColumnHeads, initTitle, readData, setTitleMethods inherited from class net.simplace.core.io.AbstractDataReader
getIntegerValue
-
Constructor Details
-
JFreeChartAsciiReader
public JFreeChartAsciiReader(File aSourceFile, org.jdom2.Element aConfigData, String aTabLen, String aSeperator, String aDefaultDateFormat, net.simplace.core.FWObservable aPObservable) - Parameters:
aSourceFile- the ASCII fileaConfigData- the column definitionsaTabLen- tab length (for fixed-width files)aSeperator- column separatoraDefaultDateFormat- default date formataPObservable- provides the parameters
-
-
Method Details
-
readCategoryDatasetFromAsciiFile
-
readXYDatasetFromAsciiFile
-
readPieDatasetFromAsciiFile
-
processLineOfFile
Adds the values of a line to a category dataset: row key is the value of the head column (defaultRow+ index), column key the column name; with orientationhorizontalthe columns are the series, withverticalthe rows.- Specified by:
processLineOfFilein classnet.simplace.core.io.AbstractAsciiReader- Parameters:
aOrientation-horizontalorvertical, other values add nothingaLine- the lineaRowIdx- index of the line- Throws:
Exception- if a value is not numeric
-