Class SingleZoneLayerControl

All Implemented Interfaces:
Configger, Control, LayerControl
Direct Known Subclasses:
BasicCoordLayerControl, DatalessLayerControl, FunctionLayerControl

public abstract class SingleZoneLayerControl extends ConfigControl implements LayerControl
Partial LayerControl implementation for single-zone plots.
Since:
18 Aug 2023
Author:
Mark Taylor
  • Constructor Details

    • SingleZoneLayerControl

      protected SingleZoneLayerControl(String label, Icon icon, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)
      Constructor.
      Parameters:
      label - control label
      icon - control icon
      zsel - zone selector, may be null
  • Method Details

    • getSingleZoneLayer

      protected abstract SingleZoneLayer getSingleZoneLayer()
      Returns the layer produced by this control.
      Returns:
      single zone layer, or null if none is active
    • hasLayers

      public boolean hasLayers()
      Description copied from interface: LayerControl
      Indicates whether this control will yield any layers in its current state. It returns true if getLayers will return a non-empty array. False positives are best avoided, but permitted.
      Specified by:
      hasLayers in interface LayerControl
      Returns:
      true if there is a non-zero number of layers
    • getLayers

      public TopcatLayer[] getLayers(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger)
      Description copied from interface: LayerControl
      Returns the layers contributed by this control.
      Specified by:
      getLayers in interface LayerControl
      Parameters:
      ganger - ganger within which layers will be used
      Returns:
      layers
    • submitReports

      public void submitReports(Map<LayerId,uk.ac.starlink.ttools.plot2.ReportMap> reports, uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger)
      Description copied from interface: LayerControl
      Accepts report information generated by plotting layers. The submitted map may contain entries unrelated to this layer. Null map values are permitted, with the same meaning as an empty map.
      Specified by:
      submitReports in interface LayerControl
      Parameters:
      reports - per-layer plot reports for layers generated on behalf of this and possibly other controls
      ganger - ganger within which layers will be used