Package uk.ac.starlink.topcat.plot2

# Class SingleZoneLayer

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

public class SingleZoneLayer extends Object
Represents a PlotLayer and associated information when it is to be used within a single plot zone.

Since:
  18 Aug 2023
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`SingleZoneLayer(uk.ac.starlink.ttools.plot2.PlotLayer plotLayer, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel)`
Constructor for dataless layer.
`SingleZoneLayer(uk.ac.starlink.ttools.plot2.PlotLayer plotLayer, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel, TopcatModel tcModel, GuiCoordContent[] contents, RowSubset rset)`
General constructor.

## Method Summary

Modifier and Type
Method
Description
`LayerId`
`getLayerId()`
Returns the layer identifier.
`uk.ac.starlink.ttools.plot2.PlotLayer`
`getPlotLayer()`
Returns the plot layer.
`TopcatLayer`
`toGangLayer(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)`
Converts this single-zone layer to a TopcatLayer.

### Methods inherited from class java.lang.Object

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

## Constructor Details

### SingleZoneLayer

public SingleZoneLayer(uk.ac.starlink.ttools.plot2.PlotLayer plotLayer, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel, TopcatModel tcModel, GuiCoordContent[] contents, RowSubset rset)
General constructor.

Parameters:
  `plotLayer` - plot layer
  `config` - configuration items that generated this layer (superset is permitted)
  `leglabel` - label used in the legend; if null, excluded from the legend
  `tcModel` - topcat model producing layer, may be null
  `contents` - information about data columns used to construct plot (superset is not permitted)
  `rset` - row subset for which layer is plotted

### SingleZoneLayer

public SingleZoneLayer(uk.ac.starlink.ttools.plot2.PlotLayer plotLayer, uk.ac.starlink.ttools.plot2.config.ConfigMap config, String leglabel)
Constructor for dataless layer.

Parameters:
  `plotLayer` - plot layer
  `config` - configuration items that generated this layer (superset is permitted)
  `leglabel` - label used in the legend; if null, excluded from the legend

## Method Details

### getPlotLayer

public uk.ac.starlink.ttools.plot2.PlotLayer getPlotLayer()
Returns the plot layer.

Returns:
  plot layer

### getLayerId

public LayerId getLayerId()
Returns the layer identifier.

Returns:
  layer ID

### toGangLayer

public TopcatLayer toGangLayer(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)
Converts this single-zone layer to a TopcatLayer. If the supplied zone selector is non-null it will determine which zone the PlotLayer appears in, otherwise it will appear in the first (and presumably only) zone.

Parameters:
  `ganger` - ganger
  `zsel` - zone selector, may be null
Returns:
  topcat layer containing this layer