es.uv.robotica.gvsig.mobile.gps.gui
Class GPSSatCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended byes.uv.robotica.gvsig.mobile.gps.gui.GPSSatCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, GPSRelevantEventsListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class GPSSatCanvas
extends java.awt.Canvas
implements GPSRelevantEventsListener

This canvas shows the satellites being tracked by the GPS device, its elevation, orientation, and signal strength It is embedded in one of the tabs of GPSActivityDialog

Author:
juangui
See Also:
Serialized Form

Field Summary
 
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
GPSSatCanvas()
          Constructor
 
Method Summary
 void gpsNewAltitude(double altitude)
          The computation of a new value for altitude triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void gpsNewHeading(double heading)
          The computation of a new value for heading triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void gpsNewPDOP(double pdop)
          The computation of a new value for PDOP triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void gpsNewPosition(double longitude, double latitude)
          The computation of a new value for position triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void gpsNewQuality(int quality)
          The computation of a new value for GPS quality triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void gpsNewSatsUsed(int satUsed)
          The computation of a new value for satellites used triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void gpsNewStatus(int status)
          The computation of a new value for GPS status triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener
 void paint(java.awt.Graphics g)
          This method updates the canvas.
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GPSSatCanvas

public GPSSatCanvas()
Constructor

Method Detail

paint

public void paint(java.awt.Graphics g)
This method updates the canvas. Satellites being used are shown in blue, while others are shown in gray


gpsNewPosition

public void gpsNewPosition(double longitude,
                           double latitude)
The computation of a new value for position triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewPosition in interface GPSRelevantEventsListener
Parameters:
longitude - latitude in degrees
latitude - latitude in degrees

gpsNewAltitude

public void gpsNewAltitude(double altitude)
The computation of a new value for altitude triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewAltitude in interface GPSRelevantEventsListener
Parameters:
altitude - altitude in meters

gpsNewHeading

public void gpsNewHeading(double heading)
The computation of a new value for heading triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewHeading in interface GPSRelevantEventsListener
Parameters:
heading - heading in degrees

gpsNewSatsUsed

public void gpsNewSatsUsed(int satUsed)
The computation of a new value for satellites used triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewSatsUsed in interface GPSRelevantEventsListener
Parameters:
satUsed - number of satellites used

gpsNewPDOP

public void gpsNewPDOP(double pdop)
The computation of a new value for PDOP triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewPDOP in interface GPSRelevantEventsListener
Parameters:
pdop - position dillution of precision

gpsNewQuality

public void gpsNewQuality(int quality)
The computation of a new value for GPS quality triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewQuality in interface GPSRelevantEventsListener
Parameters:
quality - one of the following values: - FIX_QUALITY_INVALID if the fix is invalid - FIX_QUALITY_GPS if the fix is an autonomous GPS fix - FIX_QUALITY_DGPS if the fix is a differential GPS fix

gpsNewStatus

public void gpsNewStatus(int status)
The computation of a new value for GPS status triggers the update of the canvas Implements es.uv.robotica.gvsig.mobile.gps.listener.GPSRelevantEventsListener

Specified by:
gpsNewStatus in interface GPSRelevantEventsListener
Parameters:
status - one of the following values: - FIX_DIMENSIONS_INVALID if the GPS has not a valid fix (less than 3 valid satellites) - FIX_DIMENSIONS_2D if the GPS is in 2D mode (less than 4 valid satellites) - FIX_DIMENSIONS_3D if the GPS is in 3D mode