Package Map

Class MapPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, PamObserver, ColorManaged
Direct Known Subclasses:
DialogMapPanel3D

public class MapPanel extends JPanelWithPamKey implements PamObserver, ColorManaged
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:
  • Field Details Link icon

    • ship Link icon

      public Vessel ship
    • myCompass Link icon

      public Compass myCompass
    • DATASELECTNAME Link icon

      public static final String DATASELECTNAME
      String type name for map based data selectors.
      See Also:
  • Constructor Details Link icon

  • Method Details Link icon

    • getObserverObject Link icon

      public PamObserver getObserverObject()
      Specified by:
      getObserverObject in interface PamObserver
      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 Link icon

      public PamColors.PamColor getColorId()
      Description copied from interface: ColorManaged
      The components colour scheme.
      Specified by:
      getColorId in interface ColorManaged
      Overrides:
      getColorId in class PamPanel
      Returns:
      PamColor
    • newViewTime Link icon

      public void newViewTime(GpsDataUnit gpsDataUnit)
    • paintComponent Link icon

      public void paintComponent(Graphics g)
    • isFillSurface Link icon

      public boolean isFillSurface()
      Returns:
      true if the entire surface should be filled, not a rated rectangle.
    • getMinCornerLatLong Link icon

      public LatLong getMinCornerLatLong()
      Returns:
      the minCornerLatLong
    • getMaxCornerLatLong Link icon

      public LatLong getMaxCornerLatLong()
      Returns:
      the maxCornerLatLong
    • findEffortProvider Link icon

      public EffortProvider findEffortProvider()
    • repaintBaseDrawing Link icon

      public void repaintBaseDrawing()
      Instruct map to redraw it's base image next time anything is redrawn.
    • repaint Link icon

      public void repaint(boolean baseToo)
    • getMapRotationDegrees Link icon

      public double getMapRotationDegrees()
    • setMapRotationDegrees Link icon

      public void setMapRotationDegrees(double mapRotationDegrees)
    • getMapVerticalRotationDegrees Link icon

      public double getMapVerticalRotationDegrees()
    • getMapCentreDegrees Link icon

      public LatLong getMapCentreDegrees()
    • setMapCentreDegrees Link icon

      public void setMapCentreDegrees(LatLong mapCentreDegrees)
    • setMapCentreCoords Link icon

      public void setMapCentreCoords(Coordinate3d c)
    • getMapRangeMetres Link icon

      public int getMapRangeMetres()
    • setMapRangeMetres Link icon

      public void setMapRangeMetres(int mapRangeMetres)
    • getShipLLD Link icon

      public LatLong getShipLLD()
    • getShipGpsData Link icon

      public GpsData getShipGpsData(boolean predict)
    • newShipLLD Link icon

      public void newShipLLD()
    • getRectProj Link icon

      public MapRectProjector getRectProj()
    • setRectProj Link icon

      public void setRectProj(MapRectProjector rectProj)
    • addData Link icon

      public void addData(PamObservable o, PamDataUnit arg)
      Description copied from interface: PamObserver
      Informs the PamObserver that new data have been added to the Observable class
      Specified by:
      addData in interface PamObserver
    • updateData Link icon

      public void updateData(PamObservable observable, PamDataUnit pamDataUnit)
      Description copied from interface: PamObserver
      Informs the PamObserver that existing data have been updated
      Specified by:
      updateData in interface PamObserver
    • getObserverName Link icon

      public String getObserverName()
      Specified by:
      getObserverName in interface PamObserver
    • setSampleRate Link icon

      public void setSampleRate(float sampleRate, boolean notify)
      Description copied from interface: PamObserver
      New sample rate
      Specified by:
      setSampleRate in interface PamObserver
      Parameters:
      notify - Notify other PamObservers and PamObservables in the chain.
    • masterClockUpdate Link icon

      public void masterClockUpdate(long milliSeconds, long sampleNumber)
      Specified by:
      masterClockUpdate in interface PamObserver
    • receiveSourceNotification Link icon

      public void receiveSourceNotification(int type, Object object)
      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 interface PamObserver
      Parameters:
      type - the type of change
      object - generic object added here so that we can include anything in the future
    • getPixelsPerMetre Link icon

      public double getPixelsPerMetre()
    • setPixelsPerMetre Link icon

      public void setPixelsPerMetre(double pixelsPerMetre)
    • getRequiredDataHistory Link icon

      public long getRequiredDataHistory(PamObservable o, Object arg)
      Specified by:
      getRequiredDataHistory in interface PamObserver
      Parameters:
      arg - optional argument from PamObservable
      Returns:
      time in milliseconds required by data held in PamObservable
    • noteNewSettings Link icon

      public void noteNewSettings()
      Specified by:
      noteNewSettings in interface PamObserver
    • stepMapZoom Link icon

      public void stepMapZoom(int direction)
    • setMapZoom Link icon

      public void setMapZoom(float zoomFactor)
    • removeObservable Link icon

      public void removeObservable(PamObservable o)
      Description copied from interface: PamObserver
      called when an Observable (PamDataBlock) is removed from the system
      Specified by:
      removeObservable in interface PamObserver
    • getSimpleMapRef Link icon

      public SimpleMap getSimpleMapRef()
    • setSimpleMapRef Link icon

      public void setSimpleMapRef(SimpleMap simpleMapRef)
    • setBackground Link icon

      public void setBackground(Color bg)
      Overrides:
      setBackground in class PamPanel
    • addConstantOverlay Link icon

      public void addConstantOverlay(MarkOverlayDraw markOverlayDraw)
    • showPopupMenu Link icon

      public void showPopupMenu(MouseEvent e)
    • handleMarkedMapUnits Link icon

      public 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. Can use to annotate data units that have everything built into them using generic annotations.
      Parameters:
      markedDataUnits -
      Returns:
    • getMapController Link icon

      public MapController getMapController()
      Get the map controller.
      Returns:
      the map controller.
    • setMapController Link icon

      public void setMapController(MapController mapController)
    • getToolTipText Link icon

      public String getToolTipText(MouseEvent event)
      Overrides:
      getToolTipText in class JComponent
    • findEffortThing Link icon

      public EffortDataUnit findEffortThing(long timeMilliseconds)