Package clipgenerator
Class ClipOverlayGraphics
java.lang.Object
PamView.PanelOverlayDraw
PamView.PamDetectionOverlayGraphics
clipgenerator.ClipOverlayGraphics
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.createKeyItem
(GeneralProjector generalProjector, int keyType) Gets information for making up a key on various displays.drawDataUnit
(Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector) Draw a PamDataUnit on a display.getHoverImage
(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide) GEt an image for the data unit to include in overlay text.boolean
hasOptionsDialog
(GeneralProjector generalProjector) boolean
showOptions
(Window parentWindow, GeneralProjector generalProjector) Show an options dialog for a particular projector.Methods inherited from class PamView.PamDetectionOverlayGraphics
canDraw, getDefaultRange, getHoverText, getHoverTextWithoutWrap, getLineColor, getLineColour, getLocColour, getMenuKeyItem, getPamSymbol, getParentDataBlock, getPerspectiveSymbol, getSymbolInfo, isDetectionData, setDefaultRange, setDetectionData, setLineColor, setLineColour, setLocColour
Methods inherited from class PamView.PanelOverlayDraw
getDefaultSymbol, preDrawAnything, setDefaultSymbol
-
Field Details
-
defSymbol
-
-
Constructor Details
-
ClipOverlayGraphics
- Parameters:
clipControl
-
-
-
Method Details
-
canDraw
Description copied from class:PamDetectionOverlayGraphics
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 classPamDetectionOverlayGraphics
- 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
Description copied from class:PamDetectionOverlayGraphics
Gets information for making up a key on various displays. PamKeyItem is not yet implemented.- Overrides:
createKeyItem
in classPamDetectionOverlayGraphics
- Parameters:
generalProjector
- Reference to a GeneralProjector responsible for drawing with the PAnelOverlayDraw implementationkeyType
- 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) Description copied from class:PamDetectionOverlayGraphics
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.
- Overrides:
drawDataUnit
in classPamDetectionOverlayGraphics
- Parameters:
g
- Graphics handle to draw onpamDataUnit
- PamDataUnit to drawgeneralProjector
- Projector to use when drawing.- Returns:
- A rectangle surrouding whatever has just been drawn.
-
getHoverImage
public BufferedImage getHoverImage(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide) Description copied from class:PamDetectionOverlayGraphics
GEt an image for the data unit to include in overlay text.- Overrides:
getHoverImage
in classPamDetectionOverlayGraphics
- Parameters:
generalProjector
- projectordataUnit
- dataunitiSide
- left or right (0 or 1 I think, might be -1 or +1 though !)- Returns:
- a small image or null
-
hasOptionsDialog
- Overrides:
hasOptionsDialog
in classPamDetectionOverlayGraphics
- 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
Description copied from class:PanelOverlayDraw
Show an options dialog for a particular projector.- Overrides:
showOptions
in classPamDetectionOverlayGraphics
- Parameters:
parentWindow
- parent window or framegeneralProjector
- projector- Returns:
-