Package uk.ac.starlink.ttools.plottask
Class TablePlotData
java.lang.Object
uk.ac.starlink.ttools.plottask.TablePlotData
- All Implemented Interfaces:
PlotData
- Direct Known Subclasses:
CartesianTablePlotData
Abstract superclass for PlotData implementation representing
the data from a single table with associated expressions describing
coordinate selections etc.
Concrete subclasses must see to provision of coordinate and error data.
- Since:
- 22 Apr 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTablePlotData(uk.ac.starlink.table.StarTable table, String[] setExprs, String[] setNames, Style[] setStyles, String labelExpr) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks that any JEL expressions used by the data for this object compile correctly.protected abstract PointSequenceConstructs a point sequence suitable for dispensing by this plot data.Returns an iterator over the data points in this object.intReturns the number of subsets in this object.getSetName(int iset) Returns the name for a given subset.getSetStyle(int iset) Returns the plotting style for a given subset.booleanIndicates whether there are or may be text labels associated with the data points in this object.
-
Constructor Details
-
TablePlotData
protected TablePlotData(uk.ac.starlink.table.StarTable table, String[] setExprs, String[] setNames, Style[] setStyles, String labelExpr) Constructor.- Parameters:
table- table this data is based onsetExprs- nset-element array of JEL boolean expressions for subset inclusion criteriasetNames- nset-element array of subset namessetStyles- nset-element array of subset plot styleslabelExpr- JEL String expression for text label
-
-
Method Details
-
createPointSequence
protected abstract PointSequence createPointSequence(SequentialJELRowReader rseq) throws gnu.jel.CompilationException Constructs a point sequence suitable for dispensing by this plot data.- Parameters:
rseq- row reader representing this data's table- Returns:
- new point sequence for plotting
- Throws:
gnu.jel.CompilationException
-
getSetCount
public int getSetCount()Description copied from interface:PlotDataReturns the number of subsets in this object.- Specified by:
getSetCountin interfacePlotData- Returns:
- subset count
-
getSetName
Description copied from interface:PlotDataReturns the name for a given subset.- Specified by:
getSetNamein interfacePlotData- Parameters:
iset- subset index- Returns:
- subset name
-
getSetStyle
Description copied from interface:PlotDataReturns the plotting style for a given subset.- Specified by:
getSetStylein interfacePlotData- Parameters:
iset- subset index- Returns:
- subset style
-
hasLabels
public boolean hasLabels()Description copied from interface:PlotDataIndicates whether there are or may be text labels associated with the data points in this object.- Specified by:
hasLabelsin interfacePlotData- Returns:
- true if
PointSequence.getLabel()may have non-null returns
-
getPointSequence
Description copied from interface:PlotDataReturns an iterator over the data points in this object.- Specified by:
getPointSequencein interfacePlotData- Returns:
- new point iterator
-
checkExpressions
public void checkExpressions() throws gnu.jel.CompilationExceptionChecks that any JEL expressions used by the data for this object compile correctly. A dummy call ofcreatePointSequence(uk.ac.starlink.ttools.jel.SequentialJELRowReader)is made.- Throws:
gnu.jel.CompilationException- if one is thrown by createPointSequence
-