Class TopcatLayer

java.lang.Object
uk.ac.starlink.topcat.plot2.TopcatLayer

public class TopcatLayer extends Object
Aggregates information about gang of PlotLayers and some additional information about how it was configured. The plot layer array has one entry per plot zone, but some entries may be null.

The resulting object is able to come up with a suitable LayerSpec.

Since:
14 Jul 2017
Author:
Mark Taylor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer
     
    static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer
     
    static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer
     
    static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TopcatLayer(uk.ac.starlink.ttools.plot2.PlotLayer[] plotLayers, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel)
    Constructs a layer with no table data.
    TopcatLayer(uk.ac.starlink.ttools.plot2.PlotLayer[] plotLayers, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel, TopcatModel tcModel, GuiCoordContent[] contents, RowSubset rset)
    Constructs a layer based on a table.
  • Method Summary

    Modifier and Type
    Method
    Description
    uk.ac.starlink.ttools.plot2.DataGeom
    Returns the DataGeom used by this layer.
    uk.ac.starlink.ttools.plot2.task.LayerSpec
    Returns a layer specification for this layer placed within a given zone.
    static uk.ac.starlink.ttools.task.TableNamer[]
    Returns a list of TableNamer objects that give the user options for referencing TopcatModels by a text string in generated stilts commands.
    uk.ac.starlink.ttools.plot2.PlotLayer[]
    Returns the plot layers stored by this object.
    uk.ac.starlink.ttools.plot2.Plotter<?>
    Returns the plotter used by this layer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PATHNAME_NAMER

      public static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer PATHNAME_NAMER
    • FILENAME_NAMER

      public static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer FILENAME_NAMER
    • LABEL_NAMER

      public static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer LABEL_NAMER
    • TNUM_NAMER

      public static final uk.ac.starlink.topcat.plot2.TopcatLayer.TopcatNamer TNUM_NAMER
  • Constructor Details

    • TopcatLayer

      public TopcatLayer(uk.ac.starlink.ttools.plot2.PlotLayer[] plotLayers, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel, TopcatModel tcModel, GuiCoordContent[] contents, RowSubset rset)
      Constructs a layer based on a table.
      Parameters:
      plotLayers - per-zone array of plot layers, at least one non-null member
      config - configuration used to set up the plot layers (superset is permitted)
      leglabel - label used in the legend; if null, excluded from the legend
      tcModel - TopcatModel containing the table
      contents - information about data columns used to construct plot (superset is not permitted)
      rset - row subset for which layer is plotted
    • TopcatLayer

      public TopcatLayer(uk.ac.starlink.ttools.plot2.PlotLayer[] plotLayers, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel)
      Constructs a layer with no table data.
      Parameters:
      plotLayers - per-zone array of plot layers, at least one non-null member
      config - configuration used to set up the plot layer (superset is permitted)
      leglabel - label used in the legend; if null, excluded from the legend
  • Method Details

    • getPlotter

      public uk.ac.starlink.ttools.plot2.Plotter<?> getPlotter()
      Returns the plotter used by this layer.
      Returns:
      plotter
    • getDataGeom

      public uk.ac.starlink.ttools.plot2.DataGeom getDataGeom()
      Returns the DataGeom used by this layer.
      Returns:
      dataGeom, may be null
    • getPlotLayers

      public uk.ac.starlink.ttools.plot2.PlotLayer[] getPlotLayers()
      Returns the plot layers stored by this object.
      Returns:
      per-zone array of plot layers, at least one non-null member
    • getLayerSpec

      public uk.ac.starlink.ttools.plot2.task.LayerSpec getLayerSpec()
      Returns a layer specification for this layer placed within a given zone.

      It shouldn't be null, unless it was impossible to write the specification for some reason??

      Returns:
      layer specification, hopefully not null??
    • getLayerTableNamers

      public static uk.ac.starlink.ttools.task.TableNamer[] getLayerTableNamers()
      Returns a list of TableNamer objects that give the user options for referencing TopcatModels by a text string in generated stilts commands. The stilts commands are assumed to have been specified using methods in this class.
      Returns:
      table namer user options