Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dinopolis.gpstool
Class GPSMap  view GPSMap download GPSMap.java

java.lang.Object
  extended byorg.dinopolis.gpstool.GPSMap
All Implemented Interfaces:
java.util.EventListener, GPSMapKeyConstants, MapNavigationHook, Positionable, java.beans.PropertyChangeListener, StatusHook

public class GPSMap
extends java.lang.Object
implements java.beans.PropertyChangeListener, GPSMapKeyConstants, MapNavigationHook, StatusHook, Positionable

This is an application that shows maps, tracks, gps position, etc. It heavily depends on its resources, as all default values are stored there. The information is organized and painted in layers.

Version:
$Revision: 1.44 $

Nested Class Summary
(package private)  class GPSMap.CenterMapAction
          The Action that triggers center map event
(package private)  class GPSMap.EditResourcesAction
          The Action that triggers for "edit_resources" events.
(package private)  class GPSMap.GuiPluginOnOffAction
          The Action for switching a layer on or off
(package private)  class GPSMap.ImportGpsDriveAction
          The Action that imports data from gpsdrive.
(package private)  class GPSMap.PanAction
          The Action that pans left/right/up/down for the given factors.
(package private)  class GPSMap.PrintMapAction
          The Action that prints the map.
(package private)  class GPSMap.QuitAction
          The Action that triggers for "quit" events.
(package private)  class GPSMap.ResetTachometerAction
          The Action that triggers follow me mode.
(package private)  class GPSMap.SaveAsImagePluginAction
          The Action for saving the image.
(package private)  class GPSMap.ScaleAction
          The Action that sets the scale to the given factor.
(package private)  class GPSMap.SetScaleAction
          The Action that triggers the setting of the scale.
(package private)  class GPSMap.SimulationModeAction
          The Action that triggers simulation mode.
(package private)  class GPSMap.Tachometer
           
(package private)  class GPSMap.ZoomInAction
          The Action that triggers zoom in event.
(package private)  class GPSMap.ZoomOutAction
          The Action that triggers zoom out event.
 
Field Summary
static java.lang.String ACTION_CENTER_MAP
           
static java.lang.String ACTION_CLEAR_TRACK
           
static java.lang.String ACTION_DATABASE_MANAGER
           
static java.lang.String ACTION_DISPLAY_TRACK_MODE
           
static java.lang.String ACTION_DOWNLOAD_MAP_AREA
           
static java.lang.String ACTION_DOWNLOAD_MAP_POSITION
           
static java.lang.String ACTION_EDIT_RESOURCES
          the name of the edit properties action
static java.lang.String ACTION_EXPORT_LOCATION_MARKER
           
static java.lang.String ACTION_FOLLOW_ME_MODE
           
static java.lang.String ACTION_GRATICULE_LAYER_ACTIVATE
           
static java.lang.String ACTION_IMPORT_GPSDRIVE
           
static java.lang.String ACTION_IMPORT_LOCATION_MARKER
           
static java.lang.String ACTION_LEVEL_OF_DETAIL_DECREASE
           
static java.lang.String ACTION_LEVEL_OF_DETAIL_INCREASE
           
static java.lang.String ACTION_LOAD_LOCATION_MARKER
           
static java.lang.String ACTION_LOAD_SHAPE
           
static java.lang.String ACTION_LOAD_TRACK
           
static java.lang.String ACTION_LOCATION_LAYER_ACTIVATE
           
static java.lang.String ACTION_MAP_LAYER_ACTIVATE
           
static java.lang.String ACTION_MOUSE_DISTANCE_MODE
           
static java.lang.String ACTION_MOUSE_NAVIGATION_MODE
           
static java.lang.String ACTION_MOUSE_POSITION_MODE
           
static java.lang.String ACTION_PAN_EAST
           
static java.lang.String ACTION_PAN_NORTH
           
static java.lang.String ACTION_PAN_QUICK_EAST
           
static java.lang.String ACTION_PAN_QUICK_NORTH
           
static java.lang.String ACTION_PAN_QUICK_SOUTH
           
static java.lang.String ACTION_PAN_QUICK_WEST
           
static java.lang.String ACTION_PAN_SOUTH
           
static java.lang.String ACTION_PAN_WEST
           
static java.lang.String ACTION_POSITION_LAYER_ACTIVATE
           
static java.lang.String ACTION_PRINT_MAP
           
static java.lang.String ACTION_QUIT
          the name of the quit action
static java.lang.String ACTION_RESET_TACHOMETER
           
static java.lang.String ACTION_SAVE_AS_IMAGE_PLUGIN
           
static java.lang.String ACTION_SAVE_TRACK_MODE
           
static java.lang.String ACTION_SCALE_1000
           
static java.lang.String ACTION_SCALE_10000
           
static java.lang.String ACTION_SCALE_100000
           
static java.lang.String ACTION_SCALE_1000000
           
static java.lang.String ACTION_SCALE_2000
           
static java.lang.String ACTION_SCALE_200000
           
static java.lang.String ACTION_SCALE_2000000
           
static java.lang.String ACTION_SCALE_25000
           
static java.lang.String ACTION_SCALE_5000
           
static java.lang.String ACTION_SCALE_50000
           
static java.lang.String ACTION_SCALE_500000
           
static java.lang.String ACTION_SCALE_5000000
           
static java.lang.String ACTION_SCALE_LAYER_ACTIVATE
           
static java.lang.String ACTION_SEARCH_MARKER
           
static java.lang.String ACTION_SELECT_MARKER_CATEGORIES
           
static java.lang.String ACTION_SET_MARKER_GPS_POS
           
static java.lang.String ACTION_SET_SCALE
           
static java.lang.String ACTION_SHAPE_LAYER_ACTIVATE
           
static java.lang.String ACTION_SHOW_MARKER_NAMES
           
static java.lang.String ACTION_SIMULATION_MODE
           
private  org.dinopolis.util.gui.ActionStore action_store_
          the action store
static java.lang.String ACTION_STORE_ID
          the identifier used in the action store
static java.lang.String ACTION_TEST_LAYER_ACTIVATE
           
static java.lang.String ACTION_TESTACTION
           
static java.lang.String ACTION_TRACK_LAYER_ACTIVATE
           
static java.lang.String ACTION_ZOOM_IN
           
static java.lang.String ACTION_ZOOM_OUT
           
protected  LatLonPoint current_gps_position_
          the default center point
protected  LatLonPoint current_map_position_
           
protected  LatLonPoint destination_position_
          destination for gps track
private  org.dinopolis.gpstool.gpsinput.GPSDataProcessor gps_data_processor_
          GPS processor
private static java.lang.String GPSMAP_CVS_VERSION
           
static java.lang.String GPSMAP_VERSION
           
protected  org.dinopolis.gpstool.gui.layer.GraticuleLayer graticule_layer_
           
protected  java.util.Vector gui_plugins_
           
protected  HookManager hook_manager_
           
static float KM2MILES
           
static float KM2NAUTIC
           
protected  org.dinopolis.gpstool.gui.layer.LocationLayer location_layer_
           
static org.apache.log4j.Logger logger_
          the log4j logger
protected  javax.swing.JFrame main_frame_
           
protected  MapBean map_bean_
           
private  javax.swing.JPopupMenu map_entry_menu_
           
protected  org.dinopolis.gpstool.gui.layer.MultiMapLayer map_layer_
          the layer to display the maps
protected  MapManager map_manager_
           
protected  javax.swing.JMenuBar menu_bar_
           
static float METER2FEET
           
protected  org.dinopolis.gpstool.gui.MouseModeManager mouse_mode_manager_
           
protected  org.dinopolis.gpstool.gui.layer.PositionLayer position_layer_
           
protected  boolean print_gps_device_properties_warning_
          print warning to restart GPSMap if gps properties were changed
protected  java.beans.PropertyChangeSupport property_change_support_
           
static java.lang.String PROPERTY_KEY_CURRENT_HEADING
          the key for the heading either from the gps device or calculated from the last and the current location.
static java.lang.String PROPERTY_KEY_CURRENT_SPEED
          the key for the speed either from the gps device or calculated from the last and the current location.
static java.lang.String PROPERTY_KEY_GPS_ALTITUDE
          the key for the altitude from the gps device.
static java.lang.String PROPERTY_KEY_GPS_HEADING
          the key for the heading from the gps device.
static java.lang.String PROPERTY_KEY_GPS_LOCATION
          the key for the current location from the gps device.
static java.lang.String PROPERTY_KEY_GPS_POS_ERROR
          the key for the info of the gps position error.
static java.lang.String PROPERTY_KEY_GPS_SATELLITE_INFO
          the key for the info of the gps satellites from the gps device.
static java.lang.String PROPERTY_KEY_GPS_SPEED
          the key for the speed from the gps device.
static java.lang.String PROPERTY_KEY_ROUTE_DESTINATION
           
static java.lang.String PROPERTY_KEY_ROUTE_DESTINATION_DISTANCE
           
static java.lang.String PROPERTY_KEY_TOTAL_DISTANCE
           
static org.dinopolis.util.servicediscovery.RepositoryClassLoader repository_class_loader_
           
private static java.lang.String RESOURCE_BOUNDLE_NAME
          the name of the resource file
private  org.dinopolis.util.gui.ResourceEditorFrame resource_editor_
          the Resource editor
protected  org.dinopolis.util.Resources resources_
          the resource bundle (configuration)
protected  org.dinopolis.gpstool.gui.layer.ScaleLayer scale_layer_
           
static org.dinopolis.util.servicediscovery.ServiceDiscovery service_discovery_
          the service discoverer (for plugin functionality)
protected  org.dinopolis.gpstool.gui.layer.ShapeLayer shape_layer_
           
protected  boolean simulation_mode_
           
protected  org.dinopolis.gpstool.gui.StatusBar status_bar_
           
static java.lang.String STD_PLUGINS_DIR_NAME
           
protected  GPSMap.Tachometer tacho_meter_
           
protected  TrackManagerImpl track_manager_
           
protected static org.dinopolis.gpstool.util.UnitHelper unit_helper_
           
static java.lang.String USER_RESOURCE_DIR_NAME
          the name of the directory containing the resources
 
Fields inherited from interface org.dinopolis.gpstool.GPSMapKeyConstants
KEY_ALARM_FILE, KEY_ANGLE_FORMAT_HEADING, KEY_ANGLE_FORMAT_LATLON, KEY_ANGLE_FORMAT_VALID_FORMATS, KEY_CURRENT_GPS_POSITION_LATITUDE, KEY_CURRENT_GPS_POSITION_LONGITUDE, KEY_CURRENT_GPS_POSITION_REMEMBER_CURRENT_GPS_POSITION, KEY_CURRENT_MAP_POSITION_LATITUDE, KEY_CURRENT_MAP_POSITION_LONGITUDE, KEY_CURRENT_MAP_POSITION_REMEMBER_CURRENT_MAP_POSITION, KEY_CURSOR_PAN_ICON, KEY_CURSOR_ZOOM_IN_ICON, KEY_CURSOR_ZOOM_OUT_ICON, KEY_DEVELOPMENT_PLUGINS_CLASSLOADER_USE_DEFAULT_CLASSLOADER, KEY_FILE_LOCATION_DIR, KEY_FILE_LOCATION_FILENAME, KEY_FILE_MAINDIR, KEY_FILE_MAP_DESCRIPTION_FILE, KEY_FILE_MAP_DESCRIPTION_FILE_DETECT_CHANGES, KEY_FILE_MAP_DIR, KEY_FILE_MAP_FILENAME_PATTERN, KEY_FILE_MAP_FILENAME_PREFIX, KEY_FILE_PLUGIN_DIRS, KEY_FILE_TRACK_DIR, KEY_GPS_DEVICE_DATA_FILENAME, KEY_GPS_DEVICE_GPSD_HOST, KEY_GPS_DEVICE_GPSD_PORT, KEY_GPS_DEVICE_MODE, KEY_GPS_DEVICE_NMEA_DELAY, KEY_GPS_DEVICE_NMEA_IGNORE_CHECKSUM, KEY_GPS_DEVICE_NMEALOGFILE, KEY_GPS_DEVICE_PREFIX, KEY_GPS_DEVICE_PROTOCOL, KEY_GPS_DEVICE_SERIAL_PORT, KEY_GPS_DEVICE_SERIAL_SPEED, KEY_GPS_DEVICE_SERIAL_SPEED_DEFAULT_GARMIN, KEY_GPS_DEVICE_SERIAL_SPEED_DEFAULT_NMEA, KEY_GPS_DEVICE_SERIAL_SPEED_DEFAULT_SIRF2, KEY_GRATICULE_COLOR_FIVE_LINES, KEY_GRATICULE_COLOR_ONE_LINES, KEY_GRATICULE_COLOR_TEN_LINES, KEY_GRATICULE_DRAW_TEXT, KEY_GRATICULE_LAYER_ACTIVE, KEY_GRATICULE_LINES_THRESHOLD, KEY_HTTP_PROXY_AUTHENTICATION_PASSWORD, KEY_HTTP_PROXY_AUTHENTICATION_USE, KEY_HTTP_PROXY_AUTHENTICATION_USERNAME, KEY_HTTP_PROXY_HOST, KEY_HTTP_PROXY_PORT, KEY_HTTP_PROXY_PREFIX, KEY_HTTP_PROXY_USE, KEY_LOCALIZE_ALL, KEY_LOCALIZE_ALTITUDE, KEY_LOCALIZE_APPLY_BUTTON, KEY_LOCALIZE_BYTES, KEY_LOCALIZE_CANCEL_BUTTON, KEY_LOCALIZE_CATEGORY, KEY_LOCALIZE_CENTER_MAP_DIALOG_TITLE, KEY_LOCALIZE_CLEAR_BUTTON, KEY_LOCALIZE_CLICK_TO_CHANGE_POS_MESSAGE, KEY_LOCALIZE_CLOSE_BUTTON, KEY_LOCALIZE_CONTINUE_BUTTON, KEY_LOCALIZE_DELETELOCK_BUTTON, KEY_LOCALIZE_DISPLAY, KEY_LOCALIZE_DISTANCE, KEY_LOCALIZE_EMPTY_MARKER_NAME, KEY_LOCALIZE_EXPORT_LOCATION_DIALOG_TITLE, KEY_LOCALIZE_FILENAME, KEY_LOCALIZE_GOTO_BUTTON, KEY_LOCALIZE_HEIGHT, KEY_LOCALIZE_IGNORE_BUTTON, KEY_LOCALIZE_IMAGES, KEY_LOCALIZE_INFO, KEY_LOCALIZE_LATITUDE, KEY_LOCALIZE_LEVEL_OF_DETAIL, KEY_LOCALIZE_LOAD_LOCATION_DIALOG_TITLE, KEY_LOCALIZE_LOAD_PROGRESS, KEY_LOCALIZE_LOAD_SHAPE_DIALOG_TITLE, KEY_LOCALIZE_LOCATION_MARKER_CATEGORY_ID_PREFIX, KEY_LOCALIZE_LONGITUDE, KEY_LOCALIZE_MAPS, KEY_LOCALIZE_MESSAGE_CREATE_DATABASE_MESSAGE, KEY_LOCALIZE_MESSAGE_ERROR_TITLE, KEY_LOCALIZE_MESSAGE_EXPORT_ERROR_MESSAGE, KEY_LOCALIZE_MESSAGE_FILE_NOT_FOUND_MESSAGE, KEY_LOCALIZE_MESSAGE_GPS_PROPERTIES_EFFECT_ON_RESTART, KEY_LOCALIZE_MESSAGE_INFO_TITLE, KEY_LOCALIZE_MESSAGE_LATITUDE_OR_LONGITUDE_WRONG_FORMAT, KEY_LOCALIZE_MESSAGE_LATITUDE_WRONG_FORMAT, KEY_LOCALIZE_MESSAGE_LINES_READ_MESSAGE, KEY_LOCALIZE_MESSAGE_LOCK_EXISTS_TEXT, KEY_LOCALIZE_MESSAGE_LOCK_EXISTS_TITLE, KEY_LOCALIZE_MESSAGE_LONGITUDE_WRONG_FORMAT, KEY_LOCALIZE_MESSAGE_OPTIMIZE_DATABASE_MESSAGE, KEY_LOCALIZE_MESSAGE_WARNING_TITLE, KEY_LOCALIZE_NAME, KEY_LOCALIZE_NEW_LOCATION_MARKER_TITLE, KEY_LOCALIZE_NONE, KEY_LOCALIZE_NOTHING_FOUND, KEY_LOCALIZE_OK_BUTTON, KEY_LOCALIZE_PREVIEW_BUTTON, KEY_LOCALIZE_RAWGPSDATAFRAME_TITLE, KEY_LOCALIZE_ROUTE, KEY_LOCALIZE_ROUTEPOINT, KEY_LOCALIZE_SAVE_AS_DIALOG_TITLE, KEY_LOCALIZE_SAVE_BUTTON, KEY_LOCALIZE_SCALE, KEY_LOCALIZE_SEARCH_LOCATION_MARKER_TITLE, KEY_LOCALIZE_SELECT_LOCATION_MARKER_CATEGORIES_TITLE, KEY_LOCALIZE_TRACK, KEY_LOCALIZE_TRACKPOINT, KEY_LOCALIZE_WAYPOINT, KEY_LOCALIZE_WIDTH, KEY_LOCATION_FILE_CSV_DESCRIPTIVE_NAME, KEY_LOCATION_FILE_CSV_EXTENSION, KEY_LOCATION_FILE_GEONET_COMPRESSED_EXTENSION, KEY_LOCATION_FILE_GEONET_DESCRIPTIVE_NAME, KEY_LOCATION_FILE_GEONET_EXTENSION, KEY_LOCATION_FILE_GPSDRIVE_DESCRIPTIVE_NAME, KEY_LOCATION_FILE_GPSDRIVE_EXTENSION, KEY_LOCATION_FILE_ZIP_EXTENSION, KEY_LOCATION_LAYER_ACTIVE, KEY_LOCATION_MARKER_CATEGORY_AVAILABLE_CATEGORIES, KEY_LOCATION_MARKER_CATEGORY_ICON_SUFFIX, KEY_LOCATION_MARKER_CATEGORY_LEVEL_OF_DETAIL_SCALES, KEY_LOCATION_MARKER_CATEGORY_LEVEL_OF_DETAIL_SUFFIX, KEY_LOCATION_MARKER_CATEGORY_VISIBLE_SUFFIX, KEY_LOCATION_MARKER_DB_CREATE_DB_SCRIPT_URL, KEY_LOCATION_MARKER_DB_JDBCDRIVER, KEY_LOCATION_MARKER_DB_OPTIMIZE_DB_ON_START, KEY_LOCATION_MARKER_DB_PASSWORD, KEY_LOCATION_MARKER_DB_URL, KEY_LOCATION_MARKER_DB_USER, KEY_LOCATION_MARKER_SELECT_CATEGORY_ALLOW_EDIT_LEVEL_OF_DETAIL, KEY_LOCATION_MARKER_SELECT_CATEGORY_LEVEL_OF_DETAIL_COLUMN_INDEX, KEY_LOCATION_MARKER_SELECT_CATEGORY_LEVEL_OF_DETAIL_COLUMN_WIDTH, KEY_LOCATION_MARKER_SELECT_CATEGORY_NAME_COLUMN_INDEX, KEY_LOCATION_MARKER_SELECT_CATEGORY_NAME_COLUMN_WIDTH, KEY_LOCATION_MARKER_SELECT_CATEGORY_VISIBLE_COLUMN_INDEX, KEY_LOCATION_MARKER_SELECT_CATEGORY_VISIBLE_COLUMN_WIDTH, KEY_LOCATION_MARKER_SHOW_NAMES, KEY_LOCATION_MARKER_TEXT_BACKGROUND_COLOR, KEY_LOCATION_MARKER_TEXT_COLOR, KEY_LOCATION_MARKER_TEXT_FONT_SIZE, KEY_LOCATION_MARKER_USE_DB, KEY_LOCKFILES, KEY_MAP_LAYER_ACTIVE, KEY_MAP_SCALE, KEY_MAP_SCALE_REMEMBER_MAP_SCALE, KEY_MAP_VISIBLE_MAP_SCALE_FACTOR, KEY_MENU_LAYERS_LABEL, KEY_MENU_MOUSE_MODE_LABEL, KEY_MENU_PLUGIN_LABEL, KEY_MOUSE_MODE_DEFAULT_MODE, KEY_NUMBER_FORMAT_DISTANCE, KEY_POSITION_CIRCLE_COLOR, KEY_POSITION_CIRCLE_LINE_WIDTH, KEY_POSITION_CIRCLE_RADIUS, KEY_POSITION_FOLLOW_ME_MODE, KEY_POSITION_FOLLOW_ME_PITCH, KEY_POSITION_FOLLOW_ME_PITCH_VALUE_PREFIX, KEY_POSITION_ICON, KEY_POSITION_USE_ICON, KEY_REMEMBER_FRAME_SETTINGS, KEY_RESOURCE_EDITOR_TITLE, KEY_SCALE_LAYER_ACTIVE, KEY_SCALE_RULE_AIMED_LENGTH, KEY_SHAPE_FILE_DESCRIPTIVE_NAME, KEY_SHAPE_FILE_EXTENSION, KEY_SHAPE_LAYER_ACTIVE, KEY_SPLASH_IMAGE, KEY_SPLASH_MAX_PROGRESS, KEY_TACHOMETER_REFRESH_TIME, KEY_TRACK_ACTIVE_TRACK_IDENTIFIER, KEY_TRACK_FILE_DESCRIPTIVE_NAME, KEY_TRACK_FILE_EXTENSION, KEY_TRACK_FILE_FORMAT, KEY_TRACK_FILE_PATTERN, KEY_TRACK_FILE_PREFIX, KEY_UNIT_DISTANCE, KEY_WINDOW_DIMENSION_HEIGHT, KEY_WINDOW_DIMENSION_WIDTH, KEY_WINDOW_LOCATION_X, KEY_WINDOW_LOCATION_Y, VALUE_KEY_DEVICE_MODE_FILE, VALUE_KEY_DEVICE_MODE_GPSD, VALUE_KEY_DEVICE_MODE_NONE, VALUE_KEY_DEVICE_MODE_SERIAL, VALUE_KEY_DEVICE_PROTOCOL_GARMIN, VALUE_KEY_DEVICE_PROTOCOL_NMEA
 
Constructor Summary
GPSMap()
          Empty Constructor
GPSMap(java.lang.String[] args)
          Constructor using the command line arguments to override the resources.
 
Method Summary
protected  void addGuiPlugin(org.dinopolis.gpstool.plugin.GuiPlugin plugin)
          Adds the given gui plugin to the map bean, the menus, the mouse modes, and creates an action to switch the plugin on/off.
protected  void addGuiPluginsToMenu()
          Adds the menu entries of the plugins.
protected  void addMouseMode(org.dinopolis.gpstool.gui.MouseMode mouse_mode)
          Adds the given mouse mode to the mouse mode manager and registers it as a mouse listener and as as a mouse motion listener.
protected  void addMouseModes(org.dinopolis.gpstool.gui.MouseMode[] mouse_modes)
          Adds the given mouse modes to the mouse mode manager and registers them as a mouse listener and as as a mouse motion listener.
protected  void addMouseModesToMenu()
          Adds the mouse modes of the MouseModeManager to the menu bar (Menu Mouse Mode).
protected  void addOnOffActionToLayersMenu(GPSMap.GuiPluginOnOffAction action)
          Adds the layers of the plugins to the "layers" menu (to switch them on/off).
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a listener for GPS data change events.
 void addPropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener listener)
          Adds a listener for GPS data change events.
protected  void addToPluginsMenu(javax.swing.JMenuItem plugin_sub_menu)
          Adds the sub menu of plugins to the menu bar (Menu Plugin).
static float calculateDistance(LatLonPoint p1, LatLonPoint p2)
          Calculates the distance in km of two given points.
 void checkLockFiles(java.lang.String[] lockfilenames)
          Checks for the existence of any lock files (for serial devices, etc.).
 void connectGPSDevice()
          Updates the locations according to the values set within the resource file.
protected  void disableMenuIfEmpty(java.lang.String main_menu_name)
          Disables the menu with the given name in the menu bar if it does not contain any menu items.
protected  javax.swing.JMenuItem findMenuItem(javax.swing.JMenuBar menu_bar, java.lang.String name)
          Looks for a menu or a menu item with the given name in the given menu bar.
protected  javax.swing.JMenuItem findMenuItem(javax.swing.JMenu menu, java.lang.String name)
          Looks for a menu or a menu item with the given name in the given menu.
static float getAltitude(float altitude)
          Deprecated. use the UnitHelper class from the PluginSupport instead!
static java.lang.String getAltitudeUnit()
          Deprecated. use the UnitHelper class from the PluginSupport instead!
 LatLonPoint getCurrentGPSPosition()
          Returns the current gps position
static float getDistanceOrSpeed(float distance_or_speed)
          Deprecated. use the UnitHelper class from the PluginSupport instead!
static float getDistanceOrSpeedFactor()
          Deprecated. use the UnitHelper class from the PluginSupport instead!
static java.lang.String getDistanceOrSpeedString(float distance)
          Deprecated. use the UnitHelper class from the PluginSupport instead!
static java.lang.String getDistanceUnit()
          Deprecated. use the UnitHelper class from the PluginSupport instead!
 Projection getMapProjection()
          Returns the currently used projection of the map.
 java.awt.image.BufferedImage getMapScreenShot()
          Returns an image of the current map bean.
static java.lang.String getSpeedUnit()
          Deprecated. use the UnitHelper class from the PluginSupport instead!
(package private)  void initFilenames()
          Initializes the file- and directorynames, if they are unset.
protected  void initializePluginArchitecture()
          Initializes the plugin architecture (create class loader, add plugin directories, create service provider, etc.).
protected  void initializePlugins()
          Instantiates and Initializes the plugins that are found.
(package private)  void loadResources()
          Loads the resource file, or exits on a MissingResourceException.
static void main(java.lang.String[] args)
          Main Method
 void printHelp()
          Prints help for commandline options.
protected  void processCommandLineArguments(java.lang.String[] arguments)
          Processes the command line arguments and sets resource values if needed.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Callback method for property change events (ResourceBundle, GPSDevice, etc.).
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a listener for GPS data change events.
 void removePropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener listener)
          Removes a listener for GPS data change events.
 void reScale(float scale_factor)
          Rescales the map by a given factor.
(package private)  void setLocale()
          Sets the locales given in the resource file, if any.
 void setMapCenter(double latitude, double longitude)
          Sets the new center of the map.
 void setScale(float scale)
          Rescales the map by to a given scale.
 void setStatusInfo(java.lang.String message)
          Sets the status message.
protected  void startSimulation(LatLonPoint start, LatLonPoint destination)
          Sets the simulation parameters (start end destination point) and starts the simulation.
 void translateMapCenterRelative(float factor_x, float factor_y)
          Sets a new center for the map.
protected  void updateProxySettings()
          Updates the proxy settings.
protected  void updateResources(java.lang.String key)
          Updates the resource for the given key, or all resources if key is 'null'.
protected  void updateWindowLocation()
          Updates the locations according to the values set within the resource file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GPSMAP_VERSION

public static final java.lang.String GPSMAP_VERSION
See Also:
Constant Field Values

GPSMAP_CVS_VERSION

private static final java.lang.String GPSMAP_CVS_VERSION
See Also:
Constant Field Values

STD_PLUGINS_DIR_NAME

public static final java.lang.String STD_PLUGINS_DIR_NAME
See Also:
Constant Field Values

hook_manager_

protected HookManager hook_manager_

map_layer_

protected org.dinopolis.gpstool.gui.layer.MultiMapLayer map_layer_
the layer to display the maps


position_layer_

protected org.dinopolis.gpstool.gui.layer.PositionLayer position_layer_

shape_layer_

protected org.dinopolis.gpstool.gui.layer.ShapeLayer shape_layer_

location_layer_

protected org.dinopolis.gpstool.gui.layer.LocationLayer location_layer_

scale_layer_

protected org.dinopolis.gpstool.gui.layer.ScaleLayer scale_layer_

graticule_layer_

protected org.dinopolis.gpstool.gui.layer.GraticuleLayer graticule_layer_

map_bean_

protected MapBean map_bean_

menu_bar_

protected javax.swing.JMenuBar menu_bar_

main_frame_

protected javax.swing.JFrame main_frame_

map_manager_

protected MapManager map_manager_

track_manager_

protected TrackManagerImpl track_manager_

status_bar_

protected org.dinopolis.gpstool.gui.StatusBar status_bar_

tacho_meter_

protected GPSMap.Tachometer tacho_meter_

unit_helper_

protected static org.dinopolis.gpstool.util.UnitHelper unit_helper_

mouse_mode_manager_

protected org.dinopolis.gpstool.gui.MouseModeManager mouse_mode_manager_

gui_plugins_

protected java.util.Vector gui_plugins_

current_gps_position_

protected LatLonPoint current_gps_position_
the default center point


current_map_position_

protected LatLonPoint current_map_position_

destination_position_

protected LatLonPoint destination_position_
destination for gps track


property_change_support_

protected java.beans.PropertyChangeSupport property_change_support_

resources_

protected org.dinopolis.util.Resources resources_
the resource bundle (configuration)


map_entry_menu_

private javax.swing.JPopupMenu map_entry_menu_

resource_editor_

private org.dinopolis.util.gui.ResourceEditorFrame resource_editor_
the Resource editor


gps_data_processor_

private org.dinopolis.gpstool.gpsinput.GPSDataProcessor gps_data_processor_
GPS processor


ACTION_STORE_ID

public static final java.lang.String ACTION_STORE_ID
the identifier used in the action store

See Also:
Constant Field Values

RESOURCE_BOUNDLE_NAME

private static final java.lang.String RESOURCE_BOUNDLE_NAME
the name of the resource file

See Also:
Constant Field Values

USER_RESOURCE_DIR_NAME

public static final java.lang.String USER_RESOURCE_DIR_NAME
the name of the directory containing the resources

See Also:
Constant Field Values

action_store_

private org.dinopolis.util.gui.ActionStore action_store_
the action store


logger_

public static org.apache.log4j.Logger logger_
the log4j logger


simulation_mode_

protected boolean simulation_mode_

print_gps_device_properties_warning_

protected boolean print_gps_device_properties_warning_
print warning to restart GPSMap if gps properties were changed


service_discovery_

public static org.dinopolis.util.servicediscovery.ServiceDiscovery service_discovery_
the service discoverer (for plugin functionality)


repository_class_loader_

public static org.dinopolis.util.servicediscovery.RepositoryClassLoader repository_class_loader_

ACTION_QUIT

public static final java.lang.String ACTION_QUIT
the name of the quit action

See Also:
Constant Field Values

ACTION_EDIT_RESOURCES

public static final java.lang.String ACTION_EDIT_RESOURCES
the name of the edit properties action

See Also:
Constant Field Values

ACTION_MOUSE_NAVIGATION_MODE

public static final java.lang.String ACTION_MOUSE_NAVIGATION_MODE
See Also:
Constant Field Values

ACTION_MOUSE_POSITION_MODE

public static final java.lang.String ACTION_MOUSE_POSITION_MODE
See Also:
Constant Field Values

ACTION_MOUSE_DISTANCE_MODE

public static final java.lang.String ACTION_MOUSE_DISTANCE_MODE
See Also:
Constant Field Values

ACTION_ZOOM_IN

public static final java.lang.String ACTION_ZOOM_IN
See Also:
Constant Field Values

ACTION_ZOOM_OUT

public static final java.lang.String ACTION_ZOOM_OUT
See Also:
Constant Field Values

ACTION_CENTER_MAP

public static final java.lang.String ACTION_CENTER_MAP
See Also:
Constant Field Values

ACTION_FOLLOW_ME_MODE

public static final java.lang.String ACTION_FOLLOW_ME_MODE
See Also:
Constant Field Values

ACTION_SIMULATION_MODE

public static final java.lang.String ACTION_SIMULATION_MODE
See Also:
Constant Field Values

ACTION_IMPORT_GPSDRIVE

public static final java.lang.String ACTION_IMPORT_GPSDRIVE
See Also:
Constant Field Values

ACTION_DISPLAY_TRACK_MODE

public static final java.lang.String ACTION_DISPLAY_TRACK_MODE
See Also:
Constant Field Values

ACTION_SAVE_TRACK_MODE

public static final java.lang.String ACTION_SAVE_TRACK_MODE
See Also:
Constant Field Values

ACTION_CLEAR_TRACK

public static final java.lang.String ACTION_CLEAR_TRACK
See Also:
Constant Field Values

ACTION_LOAD_TRACK

public static final java.lang.String ACTION_LOAD_TRACK
See Also:
Constant Field Values

ACTION_TRACK_LAYER_ACTIVATE

public static final java.lang.String ACTION_TRACK_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_POSITION_LAYER_ACTIVATE

public static final java.lang.String ACTION_POSITION_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_MAP_LAYER_ACTIVATE

public static final java.lang.String ACTION_MAP_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_SHAPE_LAYER_ACTIVATE

public static final java.lang.String ACTION_SHAPE_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_LOCATION_LAYER_ACTIVATE

public static final java.lang.String ACTION_LOCATION_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_GRATICULE_LAYER_ACTIVATE

public static final java.lang.String ACTION_GRATICULE_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_TEST_LAYER_ACTIVATE

public static final java.lang.String ACTION_TEST_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_SCALE_LAYER_ACTIVATE

public static final java.lang.String ACTION_SCALE_LAYER_ACTIVATE
See Also:
Constant Field Values

ACTION_LOAD_LOCATION_MARKER

public static final java.lang.String ACTION_LOAD_LOCATION_MARKER
See Also:
Constant Field Values

ACTION_EXPORT_LOCATION_MARKER

public static final java.lang.String ACTION_EXPORT_LOCATION_MARKER
See Also:
Constant Field Values

ACTION_IMPORT_LOCATION_MARKER

public static final java.lang.String ACTION_IMPORT_LOCATION_MARKER
See Also:
Constant Field Values

ACTION_SHOW_MARKER_NAMES

public static final java.lang.String ACTION_SHOW_MARKER_NAMES
See Also:
Constant Field Values

ACTION_SET_MARKER_GPS_POS

public static final java.lang.String ACTION_SET_MARKER_GPS_POS
See Also:
Constant Field Values

ACTION_SELECT_MARKER_CATEGORIES

public static final java.lang.String ACTION_SELECT_MARKER_CATEGORIES
See Also:
Constant Field Values

ACTION_DATABASE_MANAGER

public static final java.lang.String ACTION_DATABASE_MANAGER
See Also:
Constant Field Values

ACTION_LEVEL_OF_DETAIL_INCREASE

public static final java.lang.String ACTION_LEVEL_OF_DETAIL_INCREASE
See Also:
Constant Field Values

ACTION_LEVEL_OF_DETAIL_DECREASE

public static final java.lang.String ACTION_LEVEL_OF_DETAIL_DECREASE
See Also:
Constant Field Values

ACTION_SEARCH_MARKER

public static final java.lang.String ACTION_SEARCH_MARKER
See Also:
Constant Field Values

ACTION_SAVE_AS_IMAGE_PLUGIN

public static final java.lang.String ACTION_SAVE_AS_IMAGE_PLUGIN
See Also:
Constant Field Values

ACTION_RESET_TACHOMETER

public static final java.lang.String ACTION_RESET_TACHOMETER
See Also:
Constant Field Values

ACTION_SET_SCALE

public static final java.lang.String ACTION_SET_SCALE
See Also:
Constant Field Values

ACTION_DOWNLOAD_MAP_POSITION

public static final java.lang.String ACTION_DOWNLOAD_MAP_POSITION
See Also:
Constant Field Values

ACTION_DOWNLOAD_MAP_AREA

public static final java.lang.String ACTION_DOWNLOAD_MAP_AREA
See Also:
Constant Field Values

ACTION_LOAD_SHAPE

public static final java.lang.String ACTION_LOAD_SHAPE
See Also:
Constant Field Values

ACTION_PRINT_MAP

public static final java.lang.String ACTION_PRINT_MAP
See Also:
Constant Field Values

ACTION_PAN_WEST

public static final java.lang.String ACTION_PAN_WEST
See Also:
Constant Field Values

ACTION_PAN_EAST

public static final java.lang.String ACTION_PAN_EAST
See Also:
Constant Field Values

ACTION_PAN_NORTH

public static final java.lang.String ACTION_PAN_NORTH
See Also:
Constant Field Values

ACTION_PAN_SOUTH

public static final java.lang.String ACTION_PAN_SOUTH
See Also:
Constant Field Values

ACTION_PAN_QUICK_WEST

public static final java.lang.String ACTION_PAN_QUICK_WEST
See Also:
Constant Field Values

ACTION_PAN_QUICK_EAST

public static final java.lang.String ACTION_PAN_QUICK_EAST
See Also:
Constant Field Values

ACTION_PAN_QUICK_NORTH

public static final java.lang.String ACTION_PAN_QUICK_NORTH
See Also:
Constant Field Values

ACTION_PAN_QUICK_SOUTH

public static final java.lang.String ACTION_PAN_QUICK_SOUTH
See Also:
Constant Field Values

ACTION_SCALE_1000

public static final java.lang.String ACTION_SCALE_1000
See Also:
Constant Field Values

ACTION_SCALE_2000

public static final java.lang.String ACTION_SCALE_2000
See Also:
Constant Field Values

ACTION_SCALE_5000

public static final java.lang.String ACTION_SCALE_5000
See Also:
Constant Field Values

ACTION_SCALE_10000

public static final java.lang.String ACTION_SCALE_10000
See Also:
Constant Field Values

ACTION_SCALE_25000

public static final java.lang.String ACTION_SCALE_25000
See Also:
Constant Field Values

ACTION_SCALE_50000

public static final java.lang.String ACTION_SCALE_50000
See Also:
Constant Field Values

ACTION_SCALE_100000

public static final java.lang.String ACTION_SCALE_100000
See Also:
Constant Field Values

ACTION_SCALE_200000

public static final java.lang.String ACTION_SCALE_200000
See Also:
Constant Field Values

ACTION_SCALE_500000

public static final java.lang.String ACTION_SCALE_500000
See Also:
Constant Field Values

ACTION_SCALE_1000000

public static final java.lang.String ACTION_SCALE_1000000
See Also:
Constant Field Values

ACTION_SCALE_2000000

public static final java.lang.String ACTION_SCALE_2000000
See Also:
Constant Field Values

ACTION_SCALE_5000000

public static final java.lang.String ACTION_SCALE_5000000
See Also:
Constant Field Values

ACTION_TESTACTION

public static final java.lang.String ACTION_TESTACTION
See Also:
Constant Field Values

PROPERTY_KEY_GPS_LOCATION

public static final java.lang.String PROPERTY_KEY_GPS_LOCATION
the key for the current location from the gps device. The value is a com.bbn.openmap.LatLonPoint object.

See Also:
Constant Field Values

PROPERTY_KEY_GPS_HEADING

public static final java.lang.String PROPERTY_KEY_GPS_HEADING
the key for the heading from the gps device. Usually, you want to use PROPERTY_KEY_CURRENT_HEADING instead! The value is a Float object.

See Also:
Constant Field Values

PROPERTY_KEY_CURRENT_HEADING

public static final java.lang.String PROPERTY_KEY_CURRENT_HEADING
the key for the heading either from the gps device or calculated from the last and the current location. This property is always triggered, even if the gps device does not send heading-information. The value is a Float object.

See Also:
Constant Field Values

PROPERTY_KEY_GPS_SPEED

public static final java.lang.String PROPERTY_KEY_GPS_SPEED
the key for the speed from the gps device. Usually, you want to use PROPERTY_KEY_CURRENT_SPEED instead! The value is a Float object and the speed is in kilometers per hour.

See Also:
Constant Field Values

PROPERTY_KEY_CURRENT_SPEED

public static final java.lang.String PROPERTY_KEY_CURRENT_SPEED
the key for the speed either from the gps device or calculated from the last and the current location. This property is always triggered, even if the gps device does not send speed-information. The value is a Float object and the speed is in kilometers per hour.

See Also:
Constant Field Values

PROPERTY_KEY_GPS_ALTITUDE

public static final java.lang.String PROPERTY_KEY_GPS_ALTITUDE
the key for the altitude from the gps device. The value is a Float object and the altitude is given in meters.

See Also:
Constant Field Values

PROPERTY_KEY_GPS_SATELLITE_INFO

public static final java.lang.String PROPERTY_KEY_GPS_SATELLITE_INFO
the key for the info of the gps satellites from the gps device. The value is an array of org.dinopolis.gpstool.gpsinput.SatelliteInfo objects.

See Also:
Constant Field Values

PROPERTY_KEY_GPS_POS_ERROR

public static final java.lang.String PROPERTY_KEY_GPS_POS_ERROR
the key for the info of the gps position error. The value an org.dinopolis.gpstool.gpsinput.GPSPositionError object.

See Also:
Constant Field Values

PROPERTY_KEY_ROUTE_DESTINATION

public static final java.lang.String PROPERTY_KEY_ROUTE_DESTINATION
See Also:
Constant Field Values

PROPERTY_KEY_ROUTE_DESTINATION_DISTANCE

public static final java.lang.String PROPERTY_KEY_ROUTE_DESTINATION_DISTANCE
See Also:
Constant Field Values

PROPERTY_KEY_TOTAL_DISTANCE

public static final java.lang.String PROPERTY_KEY_TOTAL_DISTANCE
See Also:
Constant Field Values

KM2MILES

public static final float KM2MILES
See Also:
Constant Field Values

KM2NAUTIC

public static final float KM2NAUTIC
See Also:
Constant Field Values

METER2FEET

public static final float METER2FEET
See Also:
Constant Field Values
Constructor Detail

GPSMap

public GPSMap()
Empty Constructor


GPSMap

public GPSMap(java.lang.String[] args)
Constructor using the command line arguments to override the resources.

Method Detail

loadResources

void loadResources()
Loads the resource file, or exits on a MissingResourceException.


setLocale

void setLocale()
Sets the locales given in the resource file, if any.


initFilenames

void initFilenames()
Initializes the file- and directorynames, if they are unset.


findMenuItem

protected javax.swing.JMenuItem findMenuItem(javax.swing.JMenuBar menu_bar,
                                             java.lang.String name)
Looks for a menu or a menu item with the given name in the given menu bar.


findMenuItem

protected javax.swing.JMenuItem findMenuItem(javax.swing.JMenu menu,
                                             java.lang.String name)
Looks for a menu or a menu item with the given name in the given menu.


disableMenuIfEmpty

protected void disableMenuIfEmpty(java.lang.String main_menu_name)
Disables the menu with the given name in the menu bar if it does not contain any menu items.


addMouseModesToMenu

protected void addMouseModesToMenu()
Adds the mouse modes of the MouseModeManager to the menu bar (Menu Mouse Mode).


addToPluginsMenu

protected void addToPluginsMenu(javax.swing.JMenuItem plugin_sub_menu)
Adds the sub menu of plugins to the menu bar (Menu Plugin).


addOnOffActionToLayersMenu

protected void addOnOffActionToLayersMenu(GPSMap.GuiPluginOnOffAction action)
Adds the layers of the plugins to the "layers" menu (to switch them on/off).


processCommandLineArguments

protected void processCommandLineArguments(java.lang.String[] arguments)
Processes the command line arguments and sets resource values if needed.


printHelp

public void printHelp()
Prints help for commandline options.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Callback method for property change events (ResourceBundle, GPSDevice, etc.). Performes updates according to the values of the PropertyChangeEvent.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

startSimulation

protected void startSimulation(LatLonPoint start,
                               LatLonPoint destination)
Sets the simulation parameters (start end destination point) and starts the simulation. It converts from LatLonPoints to GPSPositions. It does nothing, if the gps_data_processor_ is not a Simulation processor.


initializePluginArchitecture

protected void initializePluginArchitecture()
Initializes the plugin architecture (create class loader, add plugin directories, create service provider, etc.). The plugins itself are not created here!


initializePlugins

protected void initializePlugins()
Instantiates and Initializes the plugins that are found.


addMouseMode

protected void addMouseMode(org.dinopolis.gpstool.gui.MouseMode mouse_mode)
Adds the given mouse mode to the mouse mode manager and registers it as a mouse listener and as as a mouse motion listener.


addMouseModes

protected void addMouseModes(org.dinopolis.gpstool.gui.MouseMode[] mouse_modes)
Adds the given mouse modes to the mouse mode manager and registers them as a mouse listener and as as a mouse motion listener.


addGuiPlugin

protected void addGuiPlugin(org.dinopolis.gpstool.plugin.GuiPlugin plugin)
Adds the given gui plugin to the map bean, the menus, the mouse modes, and creates an action to switch the plugin on/off.


addGuiPluginsToMenu

protected void addGuiPluginsToMenu()
Adds the menu entries of the plugins.


updateResources

protected void updateResources(java.lang.String key)
Updates the resource for the given key, or all resources if key is 'null'.


updateProxySettings

protected void updateProxySettings()
Updates the proxy settings.


updateWindowLocation

protected void updateWindowLocation()
Updates the locations according to the values set within the resource file.


connectGPSDevice

public void connectGPSDevice()
Updates the locations according to the values set within the resource file.


checkLockFiles

public void checkLockFiles(java.lang.String[] lockfilenames)
Checks for the existence of any lock files (for serial devices, etc.). If there are any found, it opens a dialog box and asks the user what to do.


calculateDistance

public static float calculateDistance(LatLonPoint p1,
                                      LatLonPoint p2)
Calculates the distance in km of two given points.


getDistanceOrSpeed

public static float getDistanceOrSpeed(float distance_or_speed)
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns the distance or speed converted from km to whatever unit that is currently chosen (miles, nautical miles).


getDistanceOrSpeedString

public static java.lang.String getDistanceOrSpeedString(float distance)
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns a String that contains the distance formatted corresponding to the settings in the resource file. This includes the formatting of the number itself, the unit (metric, nautic or miles) and a suffix that correponds to the unit (km, mi, nmi).


getDistanceOrSpeedFactor

public static float getDistanceOrSpeedFactor()
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns the factor between kilometers and the chosen unit for distances or speed (miles, nautic).


getDistanceUnit

public static java.lang.String getDistanceUnit()
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns a String that contains the unit of distances corresponding to the settings in the resource file.


getSpeedUnit

public static java.lang.String getSpeedUnit()
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns a String that contains the unit for speed corresponding to the settings in the resource file.


getAltitude

public static float getAltitude(float altitude)
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns the altitude converted from meter to whatever unit that is currently chosen (feet).


getAltitudeUnit

public static java.lang.String getAltitudeUnit()
Deprecated. use the UnitHelper class from the PluginSupport instead!

Returns a String that contains the unit for altitude corresponding to the settings in the resource file.


addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String key,
                                      java.beans.PropertyChangeListener listener)
                               throws java.lang.IllegalArgumentException
Adds a listener for GPS data change events.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
                               throws java.lang.IllegalArgumentException
Adds a listener for GPS data change events.


removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String key,
                                         java.beans.PropertyChangeListener listener)
                                  throws java.lang.IllegalArgumentException
Removes a listener for GPS data change events.


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
                                  throws java.lang.IllegalArgumentException
Removes a listener for GPS data change events.


getCurrentGPSPosition

public LatLonPoint getCurrentGPSPosition()
Returns the current gps position

Specified by:
getCurrentGPSPosition in interface Positionable

setMapCenter

public void setMapCenter(double latitude,
                         double longitude)
Sets the new center of the map.

Specified by:
setMapCenter in interface MapNavigationHook

reScale

public void reScale(float scale_factor)
Rescales the map by a given factor. A factor of 1.0 leaves the map unchanged. A factor greater 1.0 zooms in, a factor less than 1.0 zooms out.

Specified by:
reScale in interface MapNavigationHook

setScale

public void setScale(float scale)
Rescales the map by to a given scale.

Specified by:
setScale in interface MapNavigationHook

translateMapCenterRelative

public void translateMapCenterRelative(float factor_x,
                                       float factor_y)
Sets a new center for the map. A negative factor moves the center up or left, a postive factor down or right. A factor of 1.0 translates the center a complete height/width down or right.

Specified by:
translateMapCenterRelative in interface MapNavigationHook

getMapProjection

public Projection getMapProjection()
Returns the currently used projection of the map. This projection may be used to calculate the latititude/longitude from screen coordinates and vice versa.

Specified by:
getMapProjection in interface MapNavigationHook

getMapScreenShot

public java.awt.image.BufferedImage getMapScreenShot()
Returns an image of the current map bean.


setStatusInfo

public void setStatusInfo(java.lang.String message)
Sets the status message.

Specified by:
setStatusInfo in interface StatusHook

main

public static void main(java.lang.String[] args)
Main Method