public class MapPanel extends JPanelWithPamKey implements PamObserver, ColorManaged
Modifier and Type | Field and Description |
---|---|
Compass |
myCompass |
Vessel |
ship |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
MapPanel(MapController mapController,
SimpleMap simpleMap) |
Modifier and Type | Method and Description |
---|---|
PamColors.PamColor |
getColorId()
The components colour scheme.
|
LatLong |
getMapCentreDegrees() |
int |
getMapRangeMetres() |
double |
getMapRotationDegrees() |
java.lang.String |
getObserverName() |
PamObserver |
getObserverObject() |
double |
getPixelsPerMetre() |
MapRectProjector |
getRectProj() |
long |
getRequiredDataHistory(PamObservable o,
java.lang.Object arg) |
GpsData |
getShipGpsData(boolean predict) |
LatLong |
getShipLLD() |
SimpleMap |
getSimpleMapRef() |
void |
masterClockUpdate(long milliSeconds,
long sampleNumber) |
void |
newShipLLD() |
void |
newViewTime(GpsDataUnit gpsDataUnit) |
void |
noteNewSettings() |
void |
paintComponent(java.awt.Graphics g) |
void |
removeObservable(PamObservable o)
called when an Observable (PamDataBlock) is removed from the system
|
void |
repaint(boolean baseToo) |
void |
repaintBaseDrawing()
Instruct map to redraw it's base image next time
anything is redrawn.
|
void |
setBackground(java.awt.Color bg) |
void |
setMapCentreCoords(Coordinate3d c) |
void |
setMapCentreDegrees(LatLong mapCentreDegrees) |
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 rate
|
void |
setSimpleMapRef(SimpleMap simpleMapRef) |
void |
update(PamObservable o,
PamDataUnit arg)
Informs the PamObserver that new data have been added to the Observable
class
|
getKeyPanel, getKeyPosition, setKeyPanel, setKeyPosition, setLayout
addComponent, getDefaultColor, getFrame, getPreferredBorderColours, layoutGrid, setDefaultColor, setPreferredBorderColour
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, 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
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
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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public MapPanel(MapController mapController, SimpleMap simpleMap)
public PamObserver getObserverObject()
getObserverObject
in interface PamObserver
public PamColors.PamColor getColorId()
ColorManaged
getColorId
in interface ColorManaged
getColorId
in class PamPanel
public void newViewTime(GpsDataUnit gpsDataUnit)
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void repaintBaseDrawing()
public void repaint(boolean baseToo)
public double getMapRotationDegrees()
public void setMapRotationDegrees(double mapRotationDegrees)
public LatLong getMapCentreDegrees()
public void setMapCentreDegrees(LatLong mapCentreDegrees)
public void setMapCentreCoords(Coordinate3d c)
public int getMapRangeMetres()
public void setMapRangeMetres(int mapRangeMetres)
public LatLong getShipLLD()
public GpsData getShipGpsData(boolean predict)
public void newShipLLD()
public MapRectProjector getRectProj()
public void setRectProj(MapRectProjector rectProj)
public void update(PamObservable o, PamDataUnit arg)
PamObserver
update
in interface PamObserver
o
- Reference to the Observable (a PamDataBlock)arg
- Reference to the new PamDataUnitpublic java.lang.String getObserverName()
getObserverName
in interface PamObserver
public void setSampleRate(float sampleRate, boolean notify)
PamObserver
setSampleRate
in interface PamObserver
notify
- Notify other PamObservers and PamObservables in the chain.public void masterClockUpdate(long milliSeconds, long sampleNumber)
masterClockUpdate
in interface PamObserver
public double getPixelsPerMetre()
public void setPixelsPerMetre(double pixelsPerMetre)
public long getRequiredDataHistory(PamObservable o, java.lang.Object arg)
getRequiredDataHistory
in interface PamObserver
o
- PamObservable class requiring the dataarg
- optional argument from PamObservablepublic void noteNewSettings()
noteNewSettings
in interface PamObserver
public void setMapZoom(float zoomFactor)
public void removeObservable(PamObservable o)
PamObserver
removeObservable
in interface PamObserver
public SimpleMap getSimpleMapRef()
public void setSimpleMapRef(SimpleMap simpleMapRef)
public void setBackground(java.awt.Color bg)
setBackground
in class PamPanel