|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
skrueger.geotools.MouseSelectionTracker
schmitzm.geotools.gui.MouseSelectionTracker
public abstract class MouseSelectionTracker
Extends the geotools org.geotools.swing.MouseSelectionTracker
with an
enable/disable functionality. Furthermore the tracker (optionally)
also reacts on single clicks.
setSelectionMode(SelectionMode)
Nested Class Summary | |
---|---|
static class |
MouseSelectionTracker.SelectionMode
Selection events the tracker reacts on. |
Field Summary | |
---|---|
protected boolean |
enabled
Indicates whether the tracker reacts on mouse events. |
protected MouseSelectionTracker.SelectionMode |
selectionMode
Specifies the selection events the tracker reacts on. |
Constructor Summary | |
---|---|
MouseSelectionTracker()
Creates a new tracker, which reacts only on window selection events (default geotools behavior for org.geotools.swing.MouseSelectionTracker ). |
|
MouseSelectionTracker(MouseSelectionTracker.SelectionMode mode)
Creates a new tracker. |
Method Summary | |
---|---|
MouseSelectionTracker.SelectionMode |
getSelectionMode()
Returns the selection events the tracker reacts on. |
boolean |
isEnabled()
Returns whether the tracker reacts on mouse events or not. |
void |
mouseClicked(MouseEvent e)
Ignores the event if tracker is disabled or selection mode is MouseSelectionTracker.SelectionMode.ONLY_WINDOW_SELECTION . |
void |
mouseDragged(MouseEvent e)
Ignores the event if tracker is disabled or selection mode is MouseSelectionTracker.SelectionMode.ONLY_SINGLE_CLICK , so that the
dragging rectangle is not drawn. |
void |
mouseEntered(MouseEvent e)
Ignores the event if tracker is disabled. |
void |
mouseExited(MouseEvent e)
Ignores the event if tracker is disabled. |
void |
mouseMoved(MouseEvent e)
Ignores the event if tracker is disabled. |
void |
mousePressed(MouseEvent e)
Ignores the event if tracker is disabled. |
void |
mouseReleased(MouseEvent e)
Ignores the event if tracker is disabled. |
void |
setEnabled(boolean enabled)
Sets whether the tracker reacts on mouse events or not. |
void |
setSelectionMode(MouseSelectionTracker.SelectionMode mode)
Sets the selection events the tracker reacts on. |
Methods inherited from class skrueger.geotools.MouseSelectionTracker |
---|
getModel, getSelectedArea, selectionPerformed, setXORColors |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseWheelMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean enabled
protected MouseSelectionTracker.SelectionMode selectionMode
Constructor Detail |
---|
public MouseSelectionTracker()
org.geotools.swing.MouseSelectionTracker
).
public MouseSelectionTracker(MouseSelectionTracker.SelectionMode mode)
mode
- specifies the selection events the tracker reacts onMethod Detail |
---|
public boolean isEnabled()
public void setEnabled(boolean enabled)
public void setSelectionMode(MouseSelectionTracker.SelectionMode mode)
mode
- the mode to setpublic MouseSelectionTracker.SelectionMode getSelectionMode()
public void mouseClicked(MouseEvent e)
MouseSelectionTracker.SelectionMode.ONLY_WINDOW_SELECTION
. Otherwise
MouseSelectionTracker.selectionPerformed(int, int, int, int)
is called for
the selected point.
mouseClicked
in interface MouseListener
mouseClicked
in class MouseAdapter
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
mouseEntered
in class MouseAdapter
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
mouseExited
in class MouseAdapter
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class MouseSelectionTracker
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class MouseSelectionTracker
public void mouseDragged(MouseEvent e)
MouseSelectionTracker.SelectionMode.ONLY_SINGLE_CLICK
, so that the
dragging rectangle is not drawn.
mouseDragged
in interface MouseMotionListener
mouseDragged
in class MouseSelectionTracker
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
mouseMoved
in class MouseSelectionTracker
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |