Interface ZoneController<P,A>

All Superinterfaces:
Configger
All Known Implementing Classes:
AbstractZoneController, SingleAdapterZoneController

public interface ZoneController<P,A> extends Configger
Object which manages information about one zone of a multi-zone plot.
Since:
18 Aug 2023
Author:
Mark Taylor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears aspect constraints explicitly set by the user.
    Returns the plot aspect to use for setting up the plot surface.
    uk.ac.starlink.ttools.plot2.Navigator<A>
    Returns the navigator specified by this control.
    uk.ac.starlink.ttools.plot.Range[]
    Returns the current fixed data coordinate ranges.
    void
    setAspect(A aspect)
    Sets the plot aspect which defines the view on the data.
    void
    setLatestSurface(uk.ac.starlink.ttools.plot2.Surface surface)
    Accepts information about the latest plotting surface to be plotted by the panel associated with this controller.
    void
    setRanges(uk.ac.starlink.ttools.plot.Range[] ranges)
    Sets fixed data position coordinate ranges.
    void
    submitReports(Map<LayerId,uk.ac.starlink.ttools.plot2.ReportMap> reports)
    Accepts report information generated by plotting layers.
    void
    updateState(P profile, uk.ac.starlink.ttools.plot2.PlotLayer[] layers, boolean axisLock)
    Configures this controller for a given set of plot layers.

    Methods inherited from interface uk.ac.starlink.topcat.plot2.Configger

    getConfig
  • Method Details

    • setRanges

      void setRanges(uk.ac.starlink.ttools.plot.Range[] ranges)
      Sets fixed data position coordinate ranges. If these are not set then they may need to be calculated by examining the data to work out the plot aspect. Setting them to null ensures a re-range if required next time.
      Parameters:
      ranges - fixed data position coordinate ranges, or null to clear
    • getRanges

      uk.ac.starlink.ttools.plot.Range[] getRanges()
      Returns the current fixed data coordinate ranges. If not known, null is returned.
      Returns:
      fixed data position coordinate ranges, or null if not known
    • setAspect

      void setAspect(A aspect)
      Sets the plot aspect which defines the view on the data. If not set, it may have to be worked out from config and range inputs.
      Parameters:
      aspect - fixed aspect, or null to clear
    • getAspect

      A getAspect()
      Returns the plot aspect to use for setting up the plot surface. If not known, null is returned.
      Returns:
      fixed aspect, or null if none set
    • clearAspect

      void clearAspect()
      Clears aspect constraints explicitly set by the user.
    • updateState

      void updateState(P profile, uk.ac.starlink.ttools.plot2.PlotLayer[] layers, boolean axisLock)
      Configures this controller for a given set of plot layers. This may trigger a resetting of the aspect and ranges, generally if the new plot is sufficiently different from most recent one.

      This isn't perfect, since it only allows to clear the range or not. Sometimes you might want finer control, e.g. to clear the range in one dimension and retain it in others. It may be possible to fit that into the updateState API, but it would require more work.

      Parameters:
      profile - surface profile
      layers - layers which will be plotted
      axisLock - whether re-ranging is inhibited; normally, if true axes will not be reset by this method, but the implementation can override that if it needs to
    • submitReports

      void submitReports(Map<LayerId,uk.ac.starlink.ttools.plot2.ReportMap> reports)
      Accepts report information generated by plotting layers. Null map values are permitted, with the same meaning as an empty map.

      The default implementation does nothing, but subclasses may override it to enquire about plot results.

      Parameters:
      reports - per-layer plot reports for layers generated by the most recent plot
    • setLatestSurface

      void setLatestSurface(uk.ac.starlink.ttools.plot2.Surface surface)
      Accepts information about the latest plotting surface to be plotted by the panel associated with this controller. This method is intended for passing information back to this controller, which does not otherwise have access to the asynchronously constructed Surface object it has configured, it is not an instruction to adjust the current state.

      The default implementation does nothing, but subclasses may override it to acquire information about plot state.

      Parameters:
      surface - latest plotting surface.
    • getNavigator

      uk.ac.starlink.ttools.plot2.Navigator<A> getNavigator()
      Returns the navigator specified by this control.
      Returns:
      current navigator