Package uk.ac.starlink.ttools.plot2.task
Class LayerSpec
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.task.LayerSpec
-
public class LayerSpec extends java.lang.Object
Specifies a plot layer in sufficient detail to recreate it as part of a STILTS plotting command.- Since:
- 17 Jul 2017
- Author:
- Mark Taylor
- See Also:
PlotSpec
-
-
Constructor Summary
Constructors Constructor Description LayerSpec(Plotter plotter, ConfigMap config, java.lang.String leglabel, int izone)
Constructs a layer specification for a layer with no table data.LayerSpec(Plotter plotter, ConfigMap config, java.lang.String leglabel, int izone, uk.ac.starlink.table.StarTable table, java.util.Map<java.lang.String,java.lang.String> coordMap, CredibleString selectExpr)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigMap
getConfig()
Returns this layer's configuration options.java.util.Map<java.lang.String,java.lang.String>
getCoordMap()
Returns the name-value map for coordinate values used by this layer; values are strings to be evaluated in the context of the table.java.lang.String
getLegendLabel()
Returns the legend label associated with this layer.Plotter
getPlotter()
Returns this layer's plotter.CredibleString
getSelectExpr()
Returns an expression that indicates row inclusion for the table.uk.ac.starlink.table.StarTable
getTable()
Returns the table supplying this layer's data.int
getZoneIndex()
Returns the index of the zone in which this layer is placed.
-
-
-
Constructor Detail
-
LayerSpec
public LayerSpec(Plotter plotter, ConfigMap config, java.lang.String leglabel, int izone)
Constructs a layer specification for a layer with no table data.- Parameters:
plotter
- plotterconfig
- per-layer configuration; superset is permittedleglabel
- legend label, or null to exclude from legendizone
- zone index
-
LayerSpec
public LayerSpec(Plotter plotter, ConfigMap config, java.lang.String leglabel, int izone, uk.ac.starlink.table.StarTable table, java.util.Map<java.lang.String,java.lang.String> coordMap, CredibleString selectExpr)
Constructor.- Parameters:
plotter
- plotterconfig
- per-layer configuration; superset is permittedleglabel
- legend label, or null to exclude from legendizone
- zone indextable
- table supplying data points; where a string representation of the table is required, itsgetName
method will generally be usedcoordMap
- name-value pairs giving data coordinates; values are expressions to be evaluated in the context of the supplied tableselectExpr
- boolean expression evaluated in the context of the supplied table; if non-null, only true rows are included
-
-
Method Detail
-
getPlotter
public Plotter getPlotter()
Returns this layer's plotter.- Returns:
- plotter
-
getConfig
public ConfigMap getConfig()
Returns this layer's configuration options.- Returns:
- config
-
getLegendLabel
public java.lang.String getLegendLabel()
Returns the legend label associated with this layer. If the return value is null, then this layer should not be represented in a legend, even if the legend is displayed.- Returns:
- legend label
-
getZoneIndex
public int getZoneIndex()
Returns the index of the zone in which this layer is placed.- Returns:
- zone index
-
getTable
public uk.ac.starlink.table.StarTable getTable()
Returns the table supplying this layer's data.- Returns:
- table, may be null
-
getCoordMap
public java.util.Map<java.lang.String,java.lang.String> getCoordMap()
Returns the name-value map for coordinate values used by this layer; values are strings to be evaluated in the context of the table.- Returns:
- coordinate value map, may be null
-
getSelectExpr
public CredibleString getSelectExpr()
Returns an expression that indicates row inclusion for the table. This is an expression to be evaluated in the context of the supplied data table. If null, all rows are considered to be included.- Returns:
- row selection expression
-
-