Class PlotZoomerAdapter

java.lang.Object
dataPlots.mouse.PlotZoomerAdapter

public class PlotZoomerAdapter extends Object
This is a class designed to act as an adapter between the zoomer class and the TDGraph class. Basicaly it adds an instance of the desired zoomer to each panel in the class and deals with changing number of panels etc. Maybe expanded to introduce a new sub class of zoomer or for other extra functionality.
Author:
Jamie Macaulay
  • Constructor Details

    • PlotZoomerAdapter

      public PlotZoomerAdapter(TDGraph tdGraph)
  • Method Details

    • dataUnitInMarkArea

      public boolean dataUnitInMarkArea(TDDataInfo dataInfo, PamDataUnit dataUnit, int iPanel)
      Test whether or not a pamdetection is within a marked area on the screen
      Parameters:
      dataUnit - - data unit to test whether
      Returns:
      true if no mark or click is within the mark.
    • createNewZoomable

      public AbstractTDZoomable createNewZoomable(int iPanel)
      Create a new zoomable. Sub class this to use a different zoomable.
      Returns:
    • getZoomer

      public Zoomer getZoomer(int iPanel)
      Get the zoomer for a specific panel
      Parameters:
      iPanel - the panel number
      Returns:
      zoomer for the panel
    • getZoomable

      public AbstractTDZoomable getZoomable(int iPanel)
      Get the zoomable for a panel
      Parameters:
      iPanel - the panel number
      Returns:
      zoomable for the panel
    • addZoomables

      public void addZoomables()
      Clear any existing zoomables and add new zoomables to each plot panel. A zoomable is a legacy name for a class which alows users to mark out multiple detections on a display.
    • zoomShapeComplete

      public void zoomShapeComplete(int iPanel)
      Called whenever a panels zoom shape is completed.
      Parameters:
      iPanel - - the panel within the tdGraph.
    • zoomShapeCleared

      public void zoomShapeCleared(int iPanel)
      Called whenever there is an attempt to clear a zoom shape. We must clear zoom shape on all panels.
    • newZoomShapeStarted

      public void newZoomShapeStarted(int iPanel)
      Called whenever a new zoom shape is started. Needs to clear other zoom shapes if other panels are present in this graph.