Class TDProjectorFX

Direct Known Subclasses:
FFTScrollBarGraphics.AcousticScrollerProjector

public class TDProjectorFX extends TimeProjectorFX
Projector which handles all time to pixel conversions for the display.

This is essentially a wrapper for a time axis and a y axis.

Author:
Jamie Macaulay
  • Field Details

  • Constructor Details

    • TDProjectorFX

      public TDProjectorFX(TDGraphFX tdGraph)
    • TDProjectorFX

      public TDProjectorFX()
  • Method Details

    • getTimeAxis

      public PamAxisFX getTimeAxis()
      Get the time axis.
      Overrides:
      getTimeAxis in class TimeProjectorFX
      Returns:
      the time axis.
    • getYPix

      public double getYPix(double yVal)
      Get the pixel value for the y Co-Ordinate.
      Parameters:
      yVal -
      Returns:
    • getYAxis

      public PamAxisFX getYAxis()
      Get the time axis.
      Returns:
      the time axis.
    • getWindow

      public javafx.scene.shape.Rectangle getWindow(int iPlot)
      Get the dimensions of the TDGaph(); :
      Returns:
      the dimensions of the TDGraph.
    • getVisibleTime

      public double getVisibleTime()
      Get time range in milliseconds.
      Overrides:
      getVisibleTime in class TimeProjectorFX
      Returns:
      time range (max-min) in millis.
    • getMinTime

      public long getMinTime()
      Get the minimum time in milliseconds
      Returns:
      the minimjum time in milliseconds.
    • getGraphTimePixels

      public double getGraphTimePixels()
      Get the length of the time axis in pixels.
      Overrides:
      getGraphTimePixels in class TimeProjectorFX
      Returns:
      the length of the axis in pixel.
    • getTimePix

      public double getTimePix(double timeMillis)
      Get the location in pixels for a time in millis.
      Overrides:
      getTimePix in class TimeProjectorFX
      Parameters:
      timeMillis - - the time along the axis in millis (Note: the axis start at timeMillis=0).
      Returns:
      - the pixel location along the x axis (if horizontal)
    • getDataPosition

      public Coordinate3d getDataPosition(PamCoordinate screenPosition)
      Description copied from class: GeneralProjector
      Do the exact opposite of getCoord3d and turn a screen position back into a data coordinate (e.g. a time / freq, a lat long, etc)/.
      Specified by:
      getDataPosition in class GeneralProjector<PamCoordinate>
      Parameters:
      screenPosition - screen position
      Returns:
      data object.
    • getCoord3d

      public Coordinate3d getCoord3d(PamCoordinate dataObject)
      Description copied from class: GeneralProjector
      Same as getCoordinate3d but using the generic type
      Specified by:
      getCoord3d in class GeneralProjector<PamCoordinate>
      Parameters:
      dataObject - object extending PamCoordinate
      Returns:
      3d coordinate.
    • getCoord3d

      public Coordinate3d getCoord3d(double timeMillis, double dataValue, double d3)
      Description copied from class: GeneralProjector
      Function ultimately used by a PamDataBlock to convert it's own data, in whatever form that is in into screen coordinates.
      Specified by:
      getCoord3d in class GeneralProjector<PamCoordinate>
      Parameters:
      timeMillis - d2 and d3 are data representing whatever is appropriate for the concrete instance of the projector (e.g. Latitude, Longitude, depth, Time Frequency, etc)
      Returns:
      A 3 dimensional coordinate (realistically z is never currently used)
    • getYAxisName

      public String getYAxisName()
    • isWrap

      public boolean isWrap()
    • getUnitName

      public static String getUnitName(GeneralProjector.ParameterUnits axisType)
      Get the string name for axis.
      Parameters:
      axisType - - the axis type
      Returns:
      the axis type string.
    • getAxisName

      public static String getAxisName(GeneralProjector.ParameterType axisType)
      Get the string name for axis.
      Parameters:
      axisType - - the axis type
      Returns:
      the axis type string.
    • getOrientation

      public javafx.geometry.Orientation getOrientation()
    • getWidth

      public double getWidth()
      Get the width of the display.
      Returns:
      the width of the display in pixels.
    • getHeight

      public double getHeight()
      Get the height of the display.
      Returns:
      the height of the display in pixels.
    • getWindowRect

      public javafx.scene.shape.Rectangle getWindowRect()
      The window rectangle in pixels.
      Returns:
      the window rectangle in pixels.
    • getHoverDataList

      public List<HoverData> getHoverDataList()
      Description copied from class: GeneralProjector
      This should effectively be a list of everything that just got displayed on whatever was using this projector. Get's used when marking stuff out.
      Overrides:
      getHoverDataList in class GeneralProjector<PamCoordinate>
      Returns:
      the hoverData
    • clearHoverList

      public void clearHoverList()
      Description copied from class: GeneralProjector
      Any display that is using click hovering should call this at the start of their paintComponent(Graphics g) function. The list will be repopulated as data are drawn in the PanelOverlayDraw implementations.
      Overrides:
      clearHoverList in class GeneralProjector<PamCoordinate>
      See Also:
    • setWindowRect

      public void setWindowRect(javafx.scene.shape.Rectangle windowRect)