Package Map
Class MapPanel
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,PamObserver
,ColorManaged
- Direct Known Subclasses:
DialogMapPanel3D
This is the actual map display, with the bluebackground, the gps track, etc.
IT sits inside the SimpleMap along with the right hand controls.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
String type name for map based data selectors.Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConstantOverlay
(MarkOverlayDraw markOverlayDraw) void
addData
(PamObservable o, PamDataUnit arg) Informs the PamObserver that new data have been added to the Observable classfindEffortThing
(long timeMilliseconds) The components colour scheme.Get the map controller.int
double
double
double
long
getShipGpsData
(boolean predict) getToolTipText
(MouseEvent event) boolean
handleMarkedMapUnits
(List<PamDataUnit> markedDataUnits) This gets called when there are no other markes being used on the map, but some data have been marked out.boolean
void
masterClockUpdate
(long milliSeconds, long sampleNumber) void
void
newViewTime
(GpsDataUnit gpsDataUnit) void
void
void
receiveSourceNotification
(int type, Object object) Receive a notification from the data source - typically a change in DAQ status.void
called when an Observable (PamDataBlock) is removed from the systemvoid
repaint
(boolean baseToo) void
Instruct map to redraw it's base image next time anything is redrawn.void
setBackground
(Color bg) void
void
setMapCentreDegrees
(LatLong mapCentreDegrees) void
setMapController
(MapController mapController) void
setMapRangeMetres
(int mapRangeMetres) void
setMapRotationDegrees
(double mapRotationDegrees) void
setMapZoom
(float zoomFactor) void
setPixelsPerMetre
(double pixelsPerMetre) void
setRectProj
(MapRectProjector rectProj) void
setSampleRate
(float sampleRate, boolean notify) New sample ratevoid
setSimpleMapRef
(SimpleMap simpleMapRef) void
void
stepMapZoom
(int direction) void
updateData
(PamObservable observable, PamDataUnit pamDataUnit) Informs the PamObserver that existing data have been updatedMethods inherited from class PamView.panel.JPanelWithPamKey
getKeyPanel, getKeyPosition, setKeyPanel, setKeyPosition, setLayout
Methods inherited from class PamView.panel.PamPanel
addComponent, getDefaultColor, getFrame, getPreferredBorderColours, layoutGrid, setDefaultColor
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
ship
-
myCompass
-
DATASELECTNAME
String type name for map based data selectors.- See Also:
-
-
Constructor Details
-
MapPanel
-
-
Method Details
-
getObserverObject
- Specified by:
getObserverObject
in interfacePamObserver
- Returns:
- the actual observer. In most cases concrete classes will just return 'this' in response. The exception is the Threaded observer, which will return the single thread observer.
-
getColorId
Description copied from interface:ColorManaged
The components colour scheme.- Specified by:
getColorId
in interfaceColorManaged
- Overrides:
getColorId
in classPamPanel
- Returns:
- PamColor
-
newViewTime
-
paintComponent
-
isFillSurface
public boolean isFillSurface()- Returns:
- true if the entire surface should be filled, not a rated rectangle.
-
getMinCornerLatLong
- Returns:
- the minCornerLatLong
-
getMaxCornerLatLong
- Returns:
- the maxCornerLatLong
-
findEffortProvider
-
repaintBaseDrawing
public void repaintBaseDrawing()Instruct map to redraw it's base image next time anything is redrawn. -
repaint
public void repaint(boolean baseToo) -
getMapRotationDegrees
public double getMapRotationDegrees() -
setMapRotationDegrees
public void setMapRotationDegrees(double mapRotationDegrees) -
getMapVerticalRotationDegrees
public double getMapVerticalRotationDegrees() -
getMapCentreDegrees
-
setMapCentreDegrees
-
setMapCentreCoords
-
getMapRangeMetres
public int getMapRangeMetres() -
setMapRangeMetres
public void setMapRangeMetres(int mapRangeMetres) -
getShipLLD
-
getShipGpsData
-
newShipLLD
public void newShipLLD() -
getRectProj
-
setRectProj
-
addData
Description copied from interface:PamObserver
Informs the PamObserver that new data have been added to the Observable class- Specified by:
addData
in interfacePamObserver
-
updateData
Description copied from interface:PamObserver
Informs the PamObserver that existing data have been updated- Specified by:
updateData
in interfacePamObserver
-
getObserverName
- Specified by:
getObserverName
in interfacePamObserver
-
setSampleRate
public void setSampleRate(float sampleRate, boolean notify) Description copied from interface:PamObserver
New sample rate- Specified by:
setSampleRate
in interfacePamObserver
- Parameters:
notify
- Notify other PamObservers and PamObservables in the chain.
-
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
masterClockUpdate
in interfacePamObserver
-
receiveSourceNotification
Description copied from interface:PamObserver
Receive a notification from the data source - typically a change in DAQ status. See the constants listed in AcquisitionProcess for potential change types.- Specified by:
receiveSourceNotification
in interfacePamObserver
- Parameters:
type
- the type of changeobject
- generic object added here so that we can include anything in the future
-
getPixelsPerMetre
public double getPixelsPerMetre() -
setPixelsPerMetre
public void setPixelsPerMetre(double pixelsPerMetre) -
getRequiredDataHistory
- Specified by:
getRequiredDataHistory
in interfacePamObserver
- Parameters:
arg
- optional argument from PamObservable- Returns:
- time in milliseconds required by data held in PamObservable
-
noteNewSettings
public void noteNewSettings()- Specified by:
noteNewSettings
in interfacePamObserver
-
stepMapZoom
public void stepMapZoom(int direction) -
setMapZoom
public void setMapZoom(float zoomFactor) -
removeObservable
Description copied from interface:PamObserver
called when an Observable (PamDataBlock) is removed from the system- Specified by:
removeObservable
in interfacePamObserver
-
getSimpleMapRef
-
setSimpleMapRef
-
setBackground
- Overrides:
setBackground
in classPamPanel
-
addConstantOverlay
-
showPopupMenu
-
handleMarkedMapUnits
This gets called when there are no other markes being used on the map, but some data have been marked out. Can use to annotate data units that have everything built into them using generic annotations.- Parameters:
markedDataUnits
-- Returns:
-
getMapController
Get the map controller.- Returns:
- the map controller.
-
setMapController
-
getToolTipText
- Overrides:
getToolTipText
in classJComponent
-
findEffortThing
-