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

Quick Search    Search Deep

org.dinopolis.gpstool.plugin.downloadmousemode
Class DownloadMouseMode  view DownloadMouseMode download DownloadMouseMode.java

java.lang.Object
  extended byorg.dinopolis.gpstool.plugin.downloadmousemode.DownloadMouseMode
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, org.dinopolis.gpstool.gui.MouseMode, org.dinopolis.gpstool.plugin.MouseModePlugin, java.awt.event.MouseMotionListener, org.dinopolis.gpstool.plugin.Plugin

public class DownloadMouseMode
extends java.lang.Object
implements org.dinopolis.gpstool.plugin.MouseModePlugin

The mouse mode for the download layer. This mouse mode gets the mouse events and tells the layer to draw one or more rectangles as a preview.

Version:
$Revision: 1.4 $

Field Summary
(package private)  DownloadMouseModeLayer download_layer_
           
(package private)  boolean mode_active_
           
(package private)  org.dinopolis.util.Resources resources_
           
 
Constructor Summary
DownloadMouseMode()
          Creates a new DownloadMouseMode instance.
 
Method Summary
 Layer getLayer()
          If the mouse mode plugin wants to draw anything on the map it may return a layer here or null if not.
 java.lang.String getMouseModeAcceleratorKey()
          Returns the accelerator key that is used for the mouse mode in the menu or toolbar.
 java.lang.String getMouseModeDescription()
          The description returned here is used in the menu and/or the toolbar of the application to switch the mouse mode on or off.
 javax.swing.Icon getMouseModeIcon()
          The icon returned here is used in the menu and/or the toolbar of the application to switch the mouse mode on or off.
 char getMouseModeMnemonic()
          Returns the mnemonic character that is used for manual (keyboard) selection in a menu.
 java.lang.String getMouseModeName()
          The name returned here is used in the menu and/or the toolbar of the application to switch the mouse mode on or off.
 java.lang.String getPluginDescription()
          Returns a description of the Plugin.
 java.lang.String getPluginIdentifier()
          Returns the unique id of the plugin.
 java.lang.String getPluginName()
          Returns the name of the Plugin.
 float getPluginVersion()
          Returns the version of the plugin.
 void initializePlugin(org.dinopolis.gpstool.plugin.PluginSupport support)
          Initialize the plugin and pass a PluginSupport that provides objects, the plugin may use.
 boolean isActive()
          Returns if the mouse mode is active or not.
 void mouseClicked(java.awt.event.MouseEvent event)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseDragged(java.awt.event.MouseEvent event)
          This method is called when the mouse is moved over a component while a button has been pressed.
 void mouseEntered(java.awt.event.MouseEvent event)
          This method is called when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent event)
          This method is called when the mouse exits a component.
 void mouseMoved(java.awt.event.MouseEvent event)
          This method is called when the mouse is moved over a component while no button is pressed.
 void mousePressed(java.awt.event.MouseEvent event)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(java.awt.event.MouseEvent event)
          This method is called when the mouse is released over a component.
 void setActive(boolean active)
          Called by the application to switch the mouse mode on or off.
 void startPlugin()
          The application calls this method to indicate that the plugin is activated and will be used from now on.
 void stopPlugin()
          The application calls this method to indicate that the plugin is deactivated and will not be used any more.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

download_layer_

DownloadMouseModeLayer download_layer_

mode_active_

boolean mode_active_

resources_

org.dinopolis.util.Resources resources_
Constructor Detail

DownloadMouseMode

public DownloadMouseMode()
Creates a new DownloadMouseMode instance.

Method Detail

initializePlugin

public void initializePlugin(org.dinopolis.gpstool.plugin.PluginSupport support)
Initialize the plugin and pass a PluginSupport that provides objects, the plugin may use.

Specified by:
initializePlugin in interface org.dinopolis.gpstool.plugin.Plugin

startPlugin

public void startPlugin()
The application calls this method to indicate that the plugin is activated and will be used from now on. The Plugin should initialize any needed resources (files, etc.) in this method.

Specified by:
startPlugin in interface org.dinopolis.gpstool.plugin.Plugin

stopPlugin

public void stopPlugin()
The application calls this method to indicate that the plugin is deactivated and will not be used any more. The Plugin should release all resources (close files, etc.) in this method.

Specified by:
stopPlugin in interface org.dinopolis.gpstool.plugin.Plugin

getPluginIdentifier

public java.lang.String getPluginIdentifier()
Returns the unique id of the plugin. The id is used to identify the plugin and to distinguish it from other plugins.

Specified by:
getPluginIdentifier in interface org.dinopolis.gpstool.plugin.Plugin

getPluginVersion

public float getPluginVersion()
Returns the version of the plugin. The version may be used to choose between different version of the same plugin.

Specified by:
getPluginVersion in interface org.dinopolis.gpstool.plugin.Plugin

getPluginName

public java.lang.String getPluginName()
Returns the name of the Plugin. The name should be a human readable and understandable name like "Save Image as JPEG". It is prefereable but not necessary that the name is localized.

Specified by:
getPluginName in interface org.dinopolis.gpstool.plugin.Plugin

getPluginDescription

public java.lang.String getPluginDescription()
Returns a description of the Plugin. The description should be human readable and understandable like "This plugin saves the content of the main window as an image in jpeg format". It is prefereable but not necessary that the description is localized.

Specified by:
getPluginDescription in interface org.dinopolis.gpstool.plugin.Plugin

getLayer

public Layer getLayer()
If the mouse mode plugin wants to draw anything on the map it may return a layer here or null if not.

Specified by:
getLayer in interface org.dinopolis.gpstool.plugin.MouseModePlugin

setActive

public void setActive(boolean active)
Called by the application to switch the mouse mode on or off. If the mouse mode is switched off, it must not react on mouse events (although it might register them). This method may be used to change the mouse cursor, ...

Specified by:
setActive in interface org.dinopolis.gpstool.gui.MouseMode

isActive

public boolean isActive()
Returns if the mouse mode is active or not.

Specified by:
isActive in interface org.dinopolis.gpstool.gui.MouseMode

getMouseModeName

public java.lang.String getMouseModeName()
The name returned here is used in the menu and/or the toolbar of the application to switch the mouse mode on or off. It should be localized.

Specified by:
getMouseModeName in interface org.dinopolis.gpstool.gui.MouseMode

getMouseModeIcon

public javax.swing.Icon getMouseModeIcon()
The icon returned here is used in the menu and/or the toolbar of the application to switch the mouse mode on or off.

Specified by:
getMouseModeIcon in interface org.dinopolis.gpstool.gui.MouseMode

getMouseModeDescription

public java.lang.String getMouseModeDescription()
The description returned here is used in the menu and/or the toolbar of the application to switch the mouse mode on or off.

Specified by:
getMouseModeDescription in interface org.dinopolis.gpstool.gui.MouseMode

getMouseModeMnemonic

public char getMouseModeMnemonic()
Returns the mnemonic character that is used for manual (keyboard) selection in a menu. If possible, it should be the first letter of the name (default).

Specified by:
getMouseModeMnemonic in interface org.dinopolis.gpstool.gui.MouseMode

getMouseModeAcceleratorKey

public java.lang.String getMouseModeAcceleratorKey()
Returns the accelerator key that is used for the mouse mode in the menu or toolbar. The format of the key strings is described in javax.swing.Keystroke#getKeyStroke(java.lang.String). Some examples are given: INSERT,controle DELETE,alt shift X,shift F.

Specified by:
getMouseModeAcceleratorKey in interface org.dinopolis.gpstool.gui.MouseMode

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is clicked (pressed and released in short succession) on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is pressed over a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is released over a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseMotionListener
This method is called when the mouse is moved over a component while a button has been pressed.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Description copied from interface: java.awt.event.MouseMotionListener
This method is called when the mouse is moved over a component while no button is pressed.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener