public class PamDetectionOverlayGraphics extends java.lang.Object implements PanelOverlayDraw, ManagedSymbol
Constructor and Description |
---|
PamDetectionOverlayGraphics(PamDataBlock parentDataBlock)
Constructor for standard overlay graphics class.
|
Modifier and Type | Method and Description |
---|---|
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.
|
PamKeyItem |
createKeyItem(GeneralProjector generalProjector,
int keyType)
Gets information for making up a key on various displays.
|
java.awt.Rectangle |
drawDataUnit(java.awt.Graphics g,
PamDataUnit pamDataUnit,
GeneralProjector generalProjector)
Draw a PamDataUnit on a display.
|
double |
getDefaultRange() |
java.awt.image.BufferedImage |
getHoverImage(GeneralProjector generalProjector,
PamDataUnit dataUnit,
int iSide)
GEt an image for the data unit to include in overlay text.
|
java.lang.String |
getHoverText(GeneralProjector generalProjector,
PamDataUnit dataUnit,
int iSide)
Get tool tip content for the data unit for this projector.
|
java.lang.String |
getHoverTextWithoutWrap(GeneralProjector generalProjector,
PamDataUnit dataUnit,
int iSide) |
java.awt.Color |
getLineColor() |
java.awt.Color |
getLineColour() |
PamKeyItem |
getMenuKeyItem() |
PamSymbol |
getPamSymbol() |
PamSymbol |
getPamSymbol(PamDataUnit pamDataUnit) |
PamDataBlock<PamDataUnit> |
getParentDataBlock() |
ManagedSymbolInfo |
getSymbolInfo() |
boolean |
hasOptionsDialog(GeneralProjector generalProjector) |
boolean |
isDetectionData() |
boolean |
isDrawLineToLocations() |
void |
setDefaultRange(double defaultRange) |
void |
setDetectionData(boolean isDetectionData) |
void |
setDrawLineToLocations(boolean drawLineToLocations) |
void |
setLineColor(java.awt.Color c) |
void |
setLineColour(java.awt.Color lineColour) |
void |
setPamSymbol(PamSymbol pamSymbol) |
boolean |
showOptions(java.awt.Window parentWindow,
GeneralProjector generalProjector)
Show an options dialog for a particular projector.
|
public PamDetectionOverlayGraphics(PamDataBlock parentDataBlock)
parentDataBlock
- public PamDataBlock<PamDataUnit> getParentDataBlock()
public boolean canDraw(GeneralProjector generalProjector)
For simplicity I've broken it up into the three main display types currently existing in Pamguard.
canDraw
in interface PanelOverlayDraw
public PamKeyItem createKeyItem(GeneralProjector generalProjector, int keyType)
createKeyItem
in interface PanelOverlayDraw
generalProjector
- Reference to a GeneralProjector responsible
for drawing with the PAnelOverlayDraw implementationkeyType
- Draw a more complicated key, giving more detailWhistleGraphics
,
PamSymbol
public java.awt.Rectangle drawDataUnit(java.awt.Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
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.
drawDataUnit
in interface PanelOverlayDraw
g
- Graphics handle to draw onpamDataUnit
- PamDataUnit to drawgeneralProjector
- Projector to use when drawing.public java.lang.String getHoverText(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
getHoverText
in interface PanelOverlayDraw
generalProjector
- projectordataUnit
- dataunitiSide
- left or right (0 or 1 I think, might be -1 or +1 though !)public java.awt.image.BufferedImage getHoverImage(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
generalProjector
- projectordataUnit
- dataunitiSide
- left or right (0 or 1 I think, might be -1 or +1 though !)public java.lang.String getHoverTextWithoutWrap(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
public java.awt.Color getLineColour()
public void setLineColour(java.awt.Color lineColour)
public PamSymbol getPamSymbol(PamDataUnit pamDataUnit)
pamDataUnit
- public PamSymbol getPamSymbol()
getPamSymbol
in interface ManagedSymbol
public void setPamSymbol(PamSymbol pamSymbol)
setPamSymbol
in interface ManagedSymbol
public double getDefaultRange()
public void setDefaultRange(double defaultRange)
public boolean isDetectionData()
public void setDetectionData(boolean isDetectionData)
public boolean isDrawLineToLocations()
public void setDrawLineToLocations(boolean drawLineToLocations)
public ManagedSymbolInfo getSymbolInfo()
getSymbolInfo
in interface ManagedSymbol
public PamKeyItem getMenuKeyItem()
public void setLineColor(java.awt.Color c)
public java.awt.Color getLineColor()
public boolean hasOptionsDialog(GeneralProjector generalProjector)
hasOptionsDialog
in interface PanelOverlayDraw
generalProjector
- projectorpublic boolean showOptions(java.awt.Window parentWindow, GeneralProjector generalProjector)
PanelOverlayDraw
showOptions
in interface PanelOverlayDraw
parentWindow
- parent window or framegeneralProjector
- projector