|
|||||||||
| Home >> All >> org >> dinopolis >> [ gpstool overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dinopolis.gpstool
Class GPSMap

java.lang.Objectorg.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
- extends java.lang.Object
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. |
| 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
JAVADOC
org.dinopolis.gpstool.GPSMap