clickDetector
Class NewClickOverlayGraphics

java.lang.Object
  extended by PamView.PamDetectionOverlayGraphics
      extended by clickDetector.NewClickOverlayGraphics
All Implemented Interfaces:
ManagedSymbol, PanelOverlayDraw
Direct Known Subclasses:
ClickGroupGraphics

public class NewClickOverlayGraphics
extends PamDetectionOverlayGraphics

Author:
Douglas Gillespie Overlay graphics for clicks from clickDetector.

Field Summary
(package private)  ClickControl clickControl
           
(package private)  int drawTypes
           
private  java.lang.String name
           
static int SHOW_MAP
           
static int SHOW_RADAR
           
static int SHOW_SPECTROGRAM
           
private  PamSymbol specSymbol
           
private static int specSymbolSize
           
 
Fields inherited from class PamView.PamDetectionOverlayGraphics
lineColour
 
Constructor Summary
NewClickOverlayGraphics(ClickControl clickControl, PamDataBlock parentDataBlock, int drawTypes, java.lang.String name)
           
 
Method Summary
protected  boolean canDrawOnMap()
           
protected  boolean canDrawOnSpectrogram()
           
 PamKeyItem createKeyItem(GeneralProjector projector, int keyType)
          Gets information for making up a key on various displays.
protected  PamKeyItem createMapKey(int keyType)
          Create a key item specific to the map
protected  PamKeyItem createRadarKey(int keyType)
          create a key item specific to the radar
protected  PamKeyItem createSpectrogramKey(int keyType)
           
protected  java.awt.Rectangle drawAmplitudeOnRadar(java.awt.Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
           
protected  java.awt.Rectangle drawOnMap(java.awt.Graphics g, PamDataUnit pamDetection, GeneralProjector generalProjector)
           
protected  java.awt.Rectangle drawOnSpectrogram(java.awt.Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
          Draw little triangles at top and bottom of spectrogram - better than the boxes for clicks.
 double getDefaultRange()
           
 PamSymbol getDefPamSymbol(int whaleId)
           
 java.lang.String getName()
           
 PamSymbol getPamSymbol(PamDataUnit pamDataUnit)
           
protected  java.awt.Component makeMultiColourIcon(int iconStyle)
          Makes a multi coloured icon for use in key items.
protected  java.awt.Component makeMultiColourIcon(int iconStyle, PamSymbol forceSymbolType)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class PamView.PamDetectionOverlayGraphics
canDraw, canDrawOnRadar, drawDataUnit, drawLineAndSymbol, drawLineAndSymbol, drawLineOnly, drawRangeOnRadar, getHoverText, getHydrophones, getLineColor, getLineColour, getMenuKeyItem, getPamSymbol, getParentDataBlock, getSymbolInfo, isDetectionData, isDrawLineToLocations, setDefaultRange, setDetectionData, setDrawLineToLocations, setLineColor, setLineColour, setPamSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHOW_MAP

public static final int SHOW_MAP
See Also:
Constant Field Values

SHOW_SPECTROGRAM

public static final int SHOW_SPECTROGRAM
See Also:
Constant Field Values

SHOW_RADAR

public static final int SHOW_RADAR
See Also:
Constant Field Values

drawTypes

int drawTypes

clickControl

ClickControl clickControl

name

private java.lang.String name

specSymbolSize

private static int specSymbolSize

specSymbol

private PamSymbol specSymbol
Constructor Detail

NewClickOverlayGraphics

public NewClickOverlayGraphics(ClickControl clickControl,
                               PamDataBlock parentDataBlock,
                               int drawTypes,
                               java.lang.String name)
Method Detail

canDrawOnMap

protected boolean canDrawOnMap()
Overrides:
canDrawOnMap in class PamDetectionOverlayGraphics
Returns:
true if these data can be drawn on the map.

Thsi shoudl always be true, since it's always possible to draw a symbol at the hydrophone location even if no range or bearing information are available.


canDrawOnSpectrogram

protected boolean canDrawOnSpectrogram()
Overrides:
canDrawOnSpectrogram in class PamDetectionOverlayGraphics
Returns:
true if these data can be drawn on the spectrogram.

Generally, this is always true since it will just draw a rectangle with the time and frequency limits of the sound. If it is not the case, then override this function and return false.


getPamSymbol

public PamSymbol getPamSymbol(PamDataUnit pamDataUnit)
Overrides:
getPamSymbol in class PamDetectionOverlayGraphics
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.

drawAmplitudeOnRadar

protected java.awt.Rectangle drawAmplitudeOnRadar(java.awt.Graphics g,
                                                  PamDataUnit pamDataUnit,
                                                  GeneralProjector generalProjector)
Overrides:
drawAmplitudeOnRadar in class PamDetectionOverlayGraphics

createKeyItem

public PamKeyItem createKeyItem(GeneralProjector projector,
                                int keyType)
Description copied from class: PamDetectionOverlayGraphics
Gets information for making up a key on various displays. PamKeyItem is not yet implemented.

Specified by:
createKeyItem in interface PanelOverlayDraw
Overrides:
createKeyItem in class PamDetectionOverlayGraphics
Parameters:
projector - 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:
WhistleGraphics, PamSymbol

makeMultiColourIcon

protected java.awt.Component makeMultiColourIcon(int iconStyle)
Makes a multi coloured icon for use in key items.

Parameters:
iconStyle - full or concise icon
Returns:
a multi coloured icon with lots of coloured circles.

makeMultiColourIcon

protected java.awt.Component makeMultiColourIcon(int iconStyle,
                                                 PamSymbol forceSymbolType)
Parameters:
iconStyle - full or concise icon
forceSymbolType - force a particular symbol type
Returns:
multi coloured icon

getDefPamSymbol

public PamSymbol getDefPamSymbol(int whaleId)

createMapKey

protected PamKeyItem createMapKey(int keyType)
Create a key item specific to the map

Parameters:
keyType -
Returns:
key item

createRadarKey

protected PamKeyItem createRadarKey(int keyType)
create a key item specific to the radar

Parameters:
keyType - type of key to draw
Returns:
key item

drawOnSpectrogram

protected java.awt.Rectangle drawOnSpectrogram(java.awt.Graphics g,
                                               PamDataUnit pamDataUnit,
                                               GeneralProjector generalProjector)
Draw little triangles at top and bottom of spectrogram - better than the boxes for clicks.

Overrides:
drawOnSpectrogram in class PamDetectionOverlayGraphics
Returns:

createSpectrogramKey

protected PamKeyItem createSpectrogramKey(int keyType)

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getDefaultRange

public double getDefaultRange()
Overrides:
getDefaultRange in class PamDetectionOverlayGraphics

drawOnMap

protected java.awt.Rectangle drawOnMap(java.awt.Graphics g,
                                       PamDataUnit pamDetection,
                                       GeneralProjector generalProjector)
Overrides:
drawOnMap in class PamDetectionOverlayGraphics