Class TDMarkerFX

All Implemented Interfaces:
MarkManager

public class TDMarkerFX extends StandardOverlayMarker
Handle mouse events from an FX display and send them off into the main panel marking thingamagig. This has the advantage over the TDMarkerStandard because it allows users to select individual data units as well as selecting groups.
Author:
Doug Gillespie
  • Field Details Link icon

  • Constructor Details Link icon

    • TDMarkerFX Link icon

      public TDMarkerFX(TDGraphFX tdGraphFX)
  • Method Details Link icon

    • isCanMark Link icon

      public boolean isCanMark(javafx.scene.input.MouseEvent e)
      Overrides:
      isCanMark in class StandardOverlayMarker
    • addDetectionGroupListener Link icon

      public void addDetectionGroupListener(DetectionGroupListener detectionGroupListener)
      Add the detection group listener.
      Parameters:
      detectionGroupListener - - the detection group listener
    • mousePressed Link icon

      public boolean mousePressed(javafx.scene.input.MouseEvent e)
      Override to allow a highlighting of selected data units.
      Overrides:
      mousePressed in class OverlayMarker
    • isMouseContained Link icon

      public boolean isMouseContained(javafx.scene.input.MouseEvent e)
      Check whether a mouse event is contained within the current mark shape
      Overrides:
      isMouseContained in class OverlayMarker
      Parameters:
      e - - the mouse event
      Returns:
      true if the mouse event is contained within the shape.
    • destroyCurrentMark Link icon

      public void destroyCurrentMark(javafx.scene.input.MouseEvent e)
      Destroy the current mark.
      Overrides:
      destroyCurrentMark in class OverlayMarker
    • findClosestUnit Link icon

      public FoundDataUnitFX findClosestUnit(Point pt)
      Find the closest data unit to a point on the graph.
      Parameters:
      pt - - point on the graph panel.
      Returns:
      the closest data unit.
    • getDataUnitPoint Link icon

      public Point getDataUnitPoint(TDDataInfoFX dataInfo, PamDataUnit dataUnit)
      Get the pixel location of a data unit on the graph.
      Parameters:
      dataInfo -
      dataUnit -
      Returns:
      point of the data unit in pixels- pixels represent pixels on the tdGraph, not the entire screen.
    • getSelectedMarkedDataUnits Link icon

      public List<PamDataUnit> getSelectedMarkedDataUnits(OverlayMark overlayMark, MarkDataSelector markDataSelector)
      Description copied from class: OverlayMarker
      Get a list of marked and selected data units. For now, work off the hover data within the projector, but feel free to override or use a totally different system of working out what's in the mark - that's the responsibility of whatever display has the mark. The MarkDataSelector comes from the Mark Observer, i.e. the thing that uses the data.
      Overrides:
      getSelectedMarkedDataUnits in class OverlayMarker
      Returns:
    • getCurrentDetectionGroup Link icon

      public DetectionGroupSummary getCurrentDetectionGroup()
      Get the currently selected detections
      Overrides:
      getCurrentDetectionGroup in class StandardOverlayMarker
      Returns:
      a class containing info on selected detections
    • showObserverPopups Link icon

      public boolean showObserverPopups(javafx.scene.input.MouseEvent e)
      Description copied from class: OverlayMarker
      Show any popup menus form the mark observers in response to the mouse going down with a right click.

      If a mark has been made, and is in existence, then

      Overrides:
      showObserverPopups in class OverlayMarker
      Parameters:
      e - Mouse event
      Returns:
      true if a menu was shown.
    • updateMarkedDisplay Link icon

      public void updateMarkedDisplay()
      Description copied from class: OverlayMarker
      Update the marked display. This can be called after the mark has been used to repaint the owner display. Forcing a repaint will generally make the mark disappear and may also recolour any changed dataunits.
      Overrides:
      updateMarkedDisplay in class OverlayMarker