Package uk.ac.starlink.ttools.plottask
Class HistogramPlotStateFactory
- java.lang.Object
-
- uk.ac.starlink.ttools.plottask.PlotStateFactory
-
- uk.ac.starlink.ttools.plottask.HistogramPlotStateFactory
-
public class HistogramPlotStateFactory extends PlotStateFactory
PlotStateFactory for a histogram plot.- Since:
- 15 Aug 2008
- Author:
- Mark Taylor
-
-
Field Summary
-
Fields inherited from class uk.ac.starlink.ttools.plottask.PlotStateFactory
AUX_VARIABLE, SUBSET_VARIABLE, TABLE_VARIABLE
-
-
Constructor Summary
Constructors Constructor Description HistogramPlotStateFactory()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureFromBounds(PlotState pstate, DataBounds bounds)
Updates a plot state generated by this factory with information generated from a first pass through the data.protected void
configurePlotState(PlotState pstate, uk.ac.starlink.task.Environment env)
Configures a PlotState object by examining parameter values in a given execution environment.protected TablePlotData
createPlotData(uk.ac.starlink.task.Environment env, java.lang.String tLabel, uk.ac.starlink.table.StarTable table, java.lang.String[] setExprs, java.lang.String[] setNames, Style[] setStyles, java.lang.String labelExpr, java.lang.String[] coordExprs, java.lang.String[] errExprs)
Constructs a PlotData object.protected PlotState
createPlotState()
Creates a new unconfigured PlotState object suitable for configuration by this factory.protected StyleFactory
createStyleFactory(java.lang.String prefix)
Constructs a style factory which can retrieve a plotting style suitable for use with this factory from the environment.uk.ac.starlink.task.Parameter<?>[]
getParameters()
Returns the parameters associated with this object.protected boolean
requiresConfigureFromBounds(PlotState state)
Indicates whether it is necessary to calculate the DataBounds for a given PlotState before it is ready to be used.-
Methods inherited from class uk.ac.starlink.ttools.plottask.PlotStateFactory
adjustFromData, calculateBounds, configureFromData, getPlotState, requiresAdjustFromData
-
-
-
-
Method Detail
-
getParameters
public uk.ac.starlink.task.Parameter<?>[] getParameters()
Description copied from class:PlotStateFactory
Returns the parameters associated with this object. The returned list is intended for external use in documentation; the parameter objects returned may or may not be those used for obtaining values from a particular execution environment. For this reason they may have names which are symbolic, that is, represent possible parameter names. Since actual parameter names are dynamically determined from other parameter names, it is not possible to return an exhaustive list.- Overrides:
getParameters
in classPlotStateFactory
- Returns:
- array of parameters to be used for documentation
-
createPlotState
protected PlotState createPlotState()
Description copied from class:PlotStateFactory
Creates a new unconfigured PlotState object suitable for configuration by this factory.- Overrides:
createPlotState
in classPlotStateFactory
- Returns:
- plot state
-
configurePlotState
protected void configurePlotState(PlotState pstate, uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
Description copied from class:PlotStateFactory
Configures a PlotState object by examining parameter values in a given execution environment. Such an object was presumably previously created by a call toPlotStateFactory.createPlotState()
.- Overrides:
configurePlotState
in classPlotStateFactory
- Parameters:
pstate
- plot state to configureenv
- execution environment- Throws:
uk.ac.starlink.task.TaskException
-
createPlotData
protected TablePlotData createPlotData(uk.ac.starlink.task.Environment env, java.lang.String tLabel, uk.ac.starlink.table.StarTable table, java.lang.String[] setExprs, java.lang.String[] setNames, Style[] setStyles, java.lang.String labelExpr, java.lang.String[] coordExprs, java.lang.String[] errExprs) throws uk.ac.starlink.task.TaskException, gnu.jel.CompilationException
Description copied from class:PlotStateFactory
Constructs a PlotData object. Called byPlotStateFactory.configurePlotState(uk.ac.starlink.ttools.plot.PlotState, uk.ac.starlink.task.Environment)
; may be overridden by subclasses.- Overrides:
createPlotData
in classPlotStateFactory
- Parameters:
env
- execution environmenttLabel
- table identifier suffixtable
- input tablesetExprs
- nset-element JEL boolean-valued expression array for set inclusionsetNames
- nset-element set name arraysetStyles
- nset-elemnt set style arraylabelExpr
- JEL expression for text labelcoordExprs
- ndim-element JEL double-valued expression array for coordinate valueserrExprs
- nerr-element expression(s) array for error values- Returns:
- new PlotData object based on parameters
- Throws:
uk.ac.starlink.task.TaskException
gnu.jel.CompilationException
-
createStyleFactory
protected StyleFactory createStyleFactory(java.lang.String prefix)
Description copied from class:PlotStateFactory
Constructs a style factory which can retrieve a plotting style suitable for use with this factory from the environment.- Overrides:
createStyleFactory
in classPlotStateFactory
- Parameters:
prefix
- prefix to use for all style-type variables
-
requiresConfigureFromBounds
protected boolean requiresConfigureFromBounds(PlotState state)
Description copied from class:PlotStateFactory
Indicates whether it is necessary to calculate the DataBounds for a given PlotState before it is ready to be used. Iff true is returned, thenPlotStateFactory.configureFromBounds(uk.ac.starlink.ttools.plot.PlotState, uk.ac.starlink.ttools.plot.DataBounds)
will be called later.- Overrides:
requiresConfigureFromBounds
in classPlotStateFactory
- Parameters:
state
- plot state- Returns:
- whether configureFromBounds should be called
-
configureFromBounds
protected void configureFromBounds(PlotState pstate, DataBounds bounds)
Description copied from class:PlotStateFactory
Updates a plot state generated by this factory with information generated from a first pass through the data.- Overrides:
configureFromBounds
in classPlotStateFactory
- Parameters:
pstate
- plot state to updatebounds
- data bounds calculated by a pass through the data
-
-