public class MarkOverlayDraw extends java.lang.Object implements PanelOverlayDraw, ManagedSymbol
Constructor and Description |
---|
MarkOverlayDraw(MarkModule annotationModule) |
Modifier and Type | Method and Description |
---|---|
boolean |
canDraw(GeneralProjector generalProjector) |
PamKeyItem |
createKeyItem(GeneralProjector generalProjector,
int keyType)
provide a graphics component (probably a JPanel) that can be incorporated
into a key panel for maps, and anything else that uses overlay graphics.
|
java.awt.Rectangle |
drawDataUnit(java.awt.Graphics g,
PamDataUnit pamDataUnit,
GeneralProjector generalProjector) |
PamSymbol |
getDefaultSymbol() |
java.lang.String |
getHoverText(GeneralProjector generalProjector,
PamDataUnit dataUnit,
int iSide)
Provides text for popup hover windows on displays.
|
PamSymbol |
getPamSymbol() |
ManagedSymbolInfo |
getSymbolInfo() |
boolean |
hasOptionsDialog(GeneralProjector generalProjector) |
void |
setPamSymbol(PamSymbol pamSymbol) |
boolean |
showOptions(java.awt.Window parentWindow,
GeneralProjector generalProjector)
Show an options dialog for a particular projector.
|
public MarkOverlayDraw(MarkModule annotationModule)
public java.awt.Rectangle drawDataUnit(java.awt.Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector)
drawDataUnit
in interface PanelOverlayDraw
g
- Graphics handle to draw onpamDataUnit
- PamDataUnit to drawgeneralProjector
- Projector to use when drawing.public boolean canDraw(GeneralProjector generalProjector)
canDraw
in interface PanelOverlayDraw
public PamKeyItem createKeyItem(GeneralProjector generalProjector, int keyType)
PanelOverlayDraw
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 !
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.lang.String getHoverText(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide)
PanelOverlayDraw
getHoverText
in interface PanelOverlayDraw
generalProjector
- Projector associated with the display requiring the textdataUnit
- Data unit the mouse hovered overpublic 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
- projectorpublic PamSymbol getDefaultSymbol()
public PamSymbol getPamSymbol()
getPamSymbol
in interface ManagedSymbol
public void setPamSymbol(PamSymbol pamSymbol)
setPamSymbol
in interface ManagedSymbol
public ManagedSymbolInfo getSymbolInfo()
getSymbolInfo
in interface ManagedSymbol