# Class LayerSpec

java.lang.Object
uk.ac.starlink.ttools.plot2.task.LayerSpec

public class LayerSpec extends 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, String leglabel, int izone)`
Constructs a layer specification for a layer with no table data.
`LayerSpec(Plotter<?> plotter, ConfigMap config, String leglabel, int izone, uk.ac.starlink.table.StarTable table, CoordSpec[] coordSpecs, DataGeom dataGeom, CredibleString selectExpr)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`ConfigMap`
`getConfig()`
Returns this layer's configuration options.
`CoordSpec[]`
`getCoordSpecs()`
Coordinate specifications used by this layer.
`DataGeom`
`getDataGeom()`
Returns the data geom used by this layer.
`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.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LayerSpec

public LayerSpec(Plotter<?> plotter, ConfigMap config, String leglabel, int izone)
Constructs a layer specification for a layer with no table data.

Parameters:
  `plotter` - plotter
  `config` - per-layer configuration; superset is permitted
  `leglabel` - legend label, or null to exclude from legend
  `izone` - zone index

### LayerSpec

public LayerSpec(Plotter<?> plotter, ConfigMap config, String leglabel, int izone, uk.ac.starlink.table.StarTable table, CoordSpec[] coordSpecs, DataGeom dataGeom, CredibleString selectExpr)
Constructor.

Parameters:
  `plotter` - plotter
  `config` - per-layer configuration; superset is permitted
  `leglabel` - legend label, or null to exclude from legend
  `izone` - zone index
  `table` - table supplying data points; where a string representation of the table is required, its `getName` method will generally be used
  `coordSpecs` - list of coordinate specifications
  `dataGeom` - data geom
  `selectExpr` - boolean expression evaluated in the context of the supplied table; if non-null, only true rows are included

## Method Details

### 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 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

### getCoordSpecs

public CoordSpec[] getCoordSpecs()
Coordinate specifications used by this layer.

Returns:
  coordinate specification list, not null

### getDataGeom

public DataGeom getDataGeom()
Returns the data geom used by this layer.

Returns:
  data geom

### 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