Package networkTransfer.receive
Class NetworkGPSDrawing
java.lang.Object
PamView.PanelOverlayDraw
networkTransfer.receive.NetworkGPSDrawing
Class for drawing buoy positions on the map.
- Author:
- Doug Gillespie
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canDraw
(GeneralProjector.ParameterType[] parameterTypes, GeneralProjector.ParameterUnits[] parameterUnits) 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.drawDataUnit
(Graphics g, PamDataUnit pamDataUnit, GeneralProjector generalProjector) getHoverText
(GeneralProjector generalProjector, PamDataUnit dataUnit, int iSide) Provides text for popup hover windows on displays.boolean
hasOptionsDialog
(GeneralProjector generalProjector) boolean
showOptions
(Window parentWindow, GeneralProjector generalProjector) Show an options dialog for a particular projector.Methods inherited from class PamView.PanelOverlayDraw
canDraw, getDefaultSymbol, getPamSymbol, preDrawAnything, setDefaultSymbol
-
Field Details
-
defaultSymbol
-
-
Constructor Details
-
NetworkGPSDrawing
- Parameters:
networkReceiver
-
-
-
Method Details
-
canDraw
public boolean canDraw(GeneralProjector.ParameterType[] parameterTypes, GeneralProjector.ParameterUnits[] parameterUnits) - Specified by:
canDraw
in classPanelOverlayDraw
- 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: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 classPanelOverlayDraw
- 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) - Specified by:
drawDataUnit
in classPanelOverlayDraw
- Parameters:
g
- Graphics handle to draw onpamDataUnit
- PamDataUnit to drawgeneralProjector
- Projector to use when drawing.- Returns:
- A rectangle surrouding whatever has just been drawn.
-
getHoverText
Description copied from class:PanelOverlayDraw
Provides text for popup hover windows on displays.- Specified by:
getHoverText
in classPanelOverlayDraw
- Parameters:
generalProjector
- Projector associated with the display requiring the textdataUnit
- Data unit the mouse hovered over- Returns:
- Text to display
-
hasOptionsDialog
- Overrides:
hasOptionsDialog
in classPanelOverlayDraw
- 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 classPanelOverlayDraw
- Parameters:
parentWindow
- parent window or framegeneralProjector
- projector- Returns:
-