Package PamView

Class PamDetectionOverlayGraphics

java.lang.Object
PamView.PanelOverlayDraw
PamView.PamDetectionOverlayGraphics
Direct Known Subclasses:
AISGraphics, ClickTrainGraphics, ClipOverlayGraphics, CROverlayGraphics, CTDataUnitGraphics, DetectionGroupGraphics, DifarOverlayGraphics, DLDetectionGraphics, DLGraphics, GeneratorOverlayGraphics, GPLOverlayGraphics, Group3DOverlayDraw, IshOverlayGraphics, MapCommentOverlayGraphics, MarkOverlayDraw, NewClickOverlayGraphics, OfflineEventGraphics, RavenGraphics, RoccaGraphics, RWEOverlayGraphics, TowedArray3DOverlayGraphics, TrackedClickGraphics, TrackedGroupOverlayGraphics, UserInputOverlayGraphics, WhistleEventGraphics, WhistleGraphics, WhistleLocalisationGraphics, WhistleToneLocalisationGraphics

public class PamDetectionOverlayGraphics extends PanelOverlayDraw
  • Constructor Details Link icon

    • PamDetectionOverlayGraphics Link icon

      public PamDetectionOverlayGraphics(PamDataBlock parentDataBlock, PamSymbol defaultSymbol)
      Constructor for standard overlay graphics class. Requires parent data block as a parameter.
      Parameters:
      parentDataBlock -
  • Method Details Link icon

    • getParentDataBlock Link icon

      public PamDataBlock<PamDataUnit> getParentDataBlock()
      Returns:
      parent PamDataBlock for this PanelOverlayDraw.
    • canDraw Link icon

      public boolean canDraw(GeneralProjector generalProjector)
      Used to tell the various displays whether or not the data in the parentDataBlock can be drawn on each of those displays. This is based purely on the axis types of the displays and whether or not the parentDataBlock's data untits are likely to have data which can transform into those axis types.

      For simplicity I've broken it up into the three main display types currently existing in Pamguard.

      Overrides:
      canDraw in class PanelOverlayDraw
      Returns:
      Returns whether or not the object can be drawn using the given projector. The implementation of CanDraw should examine the parameter types in GeneralProjector and check that it will know how to prvide those parameters before returning true, or false otherwise.
    • canDraw Link icon

      public boolean canDraw(GeneralProjector.ParameterType[] parameterTypes, GeneralProjector.ParameterUnits[] parameterUnits)
      Used to tell the various displays whether or not the data in the parentDataBlock can be drawn on each of those displays. This is based purely on the axis types of the displays and whether or not the parentDataBlock's data untits are likely to have data which can transform into those axis types.
      Specified by:
      canDraw in class PanelOverlayDraw
      Parameters:
      parameterTypes - parameter types
      parameterUnits - parameter units.
      Returns:
      true if the data can be (probably) drawn using this projector.
    • createKeyItem Link icon

      public PamKeyItem createKeyItem(GeneralProjector generalProjector, int keyType)
      Gets information for making up a key on various displays. PamKeyItem is not yet implemented.
      Specified by:
      createKeyItem in class PanelOverlayDraw
      Parameters:
      generalProjector - Reference to a GeneralProjector responsible for drawing with the PAnelOverlayDraw implementation
      keyType - Draw a more complicated key, giving more detail
      Returns:
      java.awt compnent (usually a JPanel).
      See Also:
    • drawDataUnit Link icon

      public Rectangle drawDataUnit(Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
      Draw a PamDataUnit on a display.

      This is split into separate routines for the three main display types for simplicity both of reading this code and for overriding the various functions.

      If display types are added to PAMGUARD, these functions will need to be added to.

      Specified by:
      drawDataUnit in class PanelOverlayDraw
      Parameters:
      g - Graphics handle to draw on
      pamDataUnit - PamDataUnit to draw
      generalProjector - Projector to use when drawing.
      Returns:
      A rectangle surrouding whatever has just been drawn.
    • getHoverText Link icon

      public String getHoverText(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
      Get tool tip content for the data unit for this projector.
      Specified by:
      getHoverText in class PanelOverlayDraw
      Parameters:
      generalProjector - projector
      dataUnit - dataunit
      iSide - left or right (0 or 1 I think, might be -1 or +1 though !)
      Returns:
      tooltip content consisting of text and / or an image.
    • getHoverImage Link icon

      public BufferedImage getHoverImage(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
      GEt an image for the data unit to include in overlay text.
      Parameters:
      generalProjector - projector
      dataUnit - dataunit
      iSide - left or right (0 or 1 I think, might be -1 or +1 though !)
      Returns:
      a small image or null
    • getHoverTextWithoutWrap Link icon

      public String getHoverTextWithoutWrap(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
    • getLineColour Link icon

      public Color getLineColour()
    • setLineColour Link icon

      public void setLineColour(Color lineColour)
    • getPamSymbol Link icon

      public PamSymbol getPamSymbol(PamDataUnit pamDataUnit, GeneralProjector projector)
      Overrides:
      getPamSymbol in class PanelOverlayDraw
      Parameters:
      pamDataUnit -
      Returns:
      PamSymbol to use in plotting. Generally this is just the set symbol for the overlay, but can be overridden if a detector has some complicated way of using different symbols for different dataUnits.
    • getPerspectiveSymbol Link icon

      public PamSymbol getPerspectiveSymbol(PamDataUnit pamDataUnit, GeneralProjector projector, Coordinate3d screenCoordinate)
      Get the symbol.
      Parameters:
      pamDataUnit -
      projector -
      screenCoordinate -
      Returns:
    • getDefaultRange Link icon

      public double getDefaultRange(GeneralProjector generalProjector)
    • setDefaultRange Link icon

      public void setDefaultRange(double defaultRange)
    • isDetectionData Link icon

      public boolean isDetectionData()
      Returns:
      true if the datablock associated with this overlay contians data units subclassed from PamDetection - in which case they might have Localisation information.
    • setDetectionData Link icon

      public void setDetectionData(boolean isDetectionData)
    • getSymbolInfo Link icon

      public ManagedSymbolInfo getSymbolInfo()
    • getMenuKeyItem Link icon

      public PamKeyItem getMenuKeyItem()
    • setLineColor Link icon

      public void setLineColor(Color c)
    • getLineColor Link icon

      public Color getLineColor()
    • hasOptionsDialog Link icon

      public boolean hasOptionsDialog(GeneralProjector generalProjector)
      Overrides:
      hasOptionsDialog in class PanelOverlayDraw
      Parameters:
      generalProjector - projector
      Returns:
      true if the drawing methods have options relevant to this projection which can be shown in a dialog of some sort (see showOptions)
    • showOptions Link icon

      public boolean showOptions(Window parentWindow, GeneralProjector generalProjector)
      Description copied from class: PanelOverlayDraw
      Show an options dialog for a particular projector.
      Overrides:
      showOptions in class PanelOverlayDraw
      Parameters:
      parentWindow - parent window or frame
      generalProjector - projector
      Returns:
    • getLocColour Link icon

      public Color getLocColour()
      Get the colour for localisation symbols on the map
      Returns:
      the colour of localisation symbols
    • setLocColour Link icon

      public void setLocColour(Color locColour)
      Set the colour of localisation symbols on the map.
      Parameters:
      locColour -