skrueger.geotools
Class XMapPaneAction_Select

java.lang.Object
  extended by skrueger.geotools.XMapPaneAction_Select
All Implemented Interfaces:
XMapPaneAction
Direct Known Subclasses:
XMapPaneAction_Select.All, XMapPaneAction_Select.OneFromTop, XMapPaneAction_Select.Top

public abstract class XMapPaneAction_Select
extends Object
implements XMapPaneAction


Nested Class Summary
static class XMapPaneAction_Select.All
           
static class XMapPaneAction_Select.OneFromTop
           
static class XMapPaneAction_Select.Top
           
 
Field Summary
static double DEFAULT_DISTANCE_FRACTION
          Default distance fraction used with line and point features.
 
Fields inherited from interface skrueger.geotools.XMapPaneAction
PAN, SELECT_ALL, SELECT_ONE_FROM_TOP, SELECT_TOP, ZOOM_IN, ZOOM_OUT
 
Constructor Summary
XMapPaneAction_Select()
           
 
Method Summary
 void performClick(XMapPane xMapPane, MouseEvent ev, DirectPosition geoCoord)
          Defines the action in case of a single click on the map.
 void performDragged(XMapPane mapPane, MouseEvent ev, Point dragStartPos, Point dragLastPos, DirectPosition startCoord, DirectPosition endCoord)
          Defines the action in case of a window selection on the map (the moment a drag ends).
 void performDragging(XMapPane mapPane, MouseEvent ev, Point dragStartPos, Point dragLastPos, DirectPosition startCoord, DirectPosition endCoord)
          Defines the action in case of a mouse drag on the map.
 void performKeyboard(XMapPane mapPane, Object param)
          Does nothing if initiated by keyboard.
 void performWheel(XMapPane mapPane, MouseWheelEvent ev, DirectPosition coord)
          Defines the action in case of a mouse wheel action on the map (the moment a drag ends).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DISTANCE_FRACTION

public static final double DEFAULT_DISTANCE_FRACTION
Default distance fraction used with line and point features. When the user clicks on the map, this tool searches for features within a rectangle of width w centered on the mouse location, where w is the average map side length multiplied by the value of this constant.

See Also:
Constant Field Values
Constructor Detail

XMapPaneAction_Select

public XMapPaneAction_Select()
Method Detail

performClick

public void performClick(XMapPane xMapPane,
                         MouseEvent ev,
                         DirectPosition geoCoord)
Description copied from interface: XMapPaneAction
Defines the action in case of a single click on the map. Called by ### XMapPaneMouseAdapter ### on MouseInputType.LClick and MouseInputType.RClick.

Specified by:
performClick in interface XMapPaneAction
Parameters:
xMapPane - map pane the action should be performed on
ev - mouse event of the action
geoCoord - geo coordinate the click is performed on

performKeyboard

public void performKeyboard(XMapPane mapPane,
                            Object param)
Does nothing if initiated by keyboard. TODO select all features should be assignable to Strg-A

Specified by:
performKeyboard in interface XMapPaneAction
Parameters:
mapPane - map pane the action should be performed on
param - An optinal paramter that can be defined.

performDragged

public void performDragged(XMapPane mapPane,
                           MouseEvent ev,
                           Point dragStartPos,
                           Point dragLastPos,
                           DirectPosition startCoord,
                           DirectPosition endCoord)
Description copied from interface: XMapPaneAction
Defines the action in case of a window selection on the map (the moment a drag ends).

Specified by:
performDragged in interface XMapPaneAction
Parameters:
mapPane - map pane the action should be performed on
ev - mouse event of the action
dragStartPos - window position the window starts (the end position can be determined from the mouse event)
startCoord - geo coordinate the window starts
endCoord - geo coordinate the window ends

performDragging

public void performDragging(XMapPane mapPane,
                            MouseEvent ev,
                            Point dragStartPos,
                            Point dragLastPos,
                            DirectPosition startCoord,
                            DirectPosition endCoord)
Description copied from interface: XMapPaneAction
Defines the action in case of a mouse drag on the map. This method is called on every mouse motion.

Specified by:
performDragging in interface XMapPaneAction
Parameters:
mapPane - map pane the action should be performed on
ev - mouse event of the action
dragStartPos - window position the drag was started (the current position can be determined from the mouse event)
startCoord - geo coordinate the drag was started
endCoord - geo coordinate the drag is currently moved over

performWheel

public void performWheel(XMapPane mapPane,
                         MouseWheelEvent ev,
                         DirectPosition coord)
Description copied from interface: XMapPaneAction
Defines the action in case of a mouse wheel action on the map (the moment a drag ends).

Specified by:
performWheel in interface XMapPaneAction
Parameters:
mapPane - map pane the action should be performed on
ev - mouse event of the action
coord - geo coordinate the wheel is turned on