Class SimGraphics

java.lang.Object
PamView.PanelOverlayDraw
simulatedAcquisition.SimGraphics

public class SimGraphics extends PanelOverlayDraw
  • Field Details

    • defaultSymbol

      public static final SymbolData defaultSymbol
  • Constructor Details

    • SimGraphics

      public SimGraphics()
  • Method Details

    • canDraw

      public boolean canDraw(GeneralProjector.ParameterType[] parameterTypes, GeneralProjector.ParameterUnits[] parameterUnits)
      Specified by:
      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.
    • createKeyItem

      public PamKeyItem createKeyItem(GeneralProjector generalProjector, int keyType)
      Description copied from class: PanelOverlayDraw
      provide a graphics component (probably a JPanel) that can be incorporated into a key panel for maps, and anything else that uses overlay graphics.

      Since multiple keys may be created in various displays, new ones should normally be created each time this is called.

      The GeneralProjector reference is passed as a parameter since the type of symbol or shape drawn on a particular plot may depend on the type of coordinate system. For example, whistles are drawn as a contour on the spectrogram display, but as a point (PamSymbol) on the map.

      It is possible that some PanelOverlayDraw implementations will be rather complicated and the keys consequently quite large. The extendedKey parameter may therefore be used to draw a full or a cut down version of the key. It is expected that most implementations will ignore this parameter !

      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

      public Rectangle drawDataUnit(Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
      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.
    • drawDataUnitOnMap

      public Rectangle drawDataUnitOnMap(Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
    • getHoverText

      public String getHoverText(GeneralProjector generalProjector, PamDataUnit dataUnit, int side)
      Description copied from class: PanelOverlayDraw
      Provides text for popup hover windows on displays.
      Specified by:
      getHoverText in class PanelOverlayDraw
      Parameters:
      generalProjector - Projector associated with the display requiring the text
      dataUnit - Data unit the mouse hovered over
      Returns:
      Text to display
    • getPamSymbol

      public PamSymbol getPamSymbol()
    • getSymbolInfo

      public ManagedSymbolInfo getSymbolInfo()
    • setPamSymbol

      public void setPamSymbol(PamSymbol pamSymbol)
    • hasOptionsDialog

      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

      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: