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:
  • 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, 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
      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
    • 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