public abstract class OpenMapTool
extends java.lang.Object
implements com.bbn.openmap.event.MapMouseMode
Constructor and Description |
---|
OpenMapTool() |
Modifier and Type | Method and Description |
---|---|
boolean |
actAsProxyFor(com.bbn.openmap.event.MapMouseMode mmm)
Request to have the MapMouseMode act as a proxy for a MapMouseMode that
wants to remain hidden.
|
boolean |
actAsProxyFor(com.bbn.openmap.event.MapMouseMode mmm,
int pdm)
Request to have the MapMouseMode act as a proxy for a MapMouseMode that
wants to remain hidden.
|
void |
addMapMouseListener(com.bbn.openmap.event.MapMouseListener l)
Add a MapMouseListener to the MouseMode.
|
javax.swing.Icon |
getGUIIcon()
Gets the Icon to represent the Mouse Mode in a GUI.
|
java.awt.Cursor |
getModeCursor() |
java.awt.Cursor |
getPressedCursor() |
int |
getProxyDistributionMask()
Get the mask that dictates which events get sent to this support object's
targets even if the parent mouse mode is acting as a proxy.
|
boolean |
isActive() |
boolean |
isProxyFor(com.bbn.openmap.event.MapMouseMode mmm)
Can check if the MapMouseMode is acting as a proxy for a MapMouseMode.
|
boolean |
isVisible()
Lets the MouseDelegator know if the MapMouseMode should be visible in the
GUI, in order to create certain mouse modes that may be controlled by
other tools.
|
void |
listenerPaint(java.awt.Graphics graphics) |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on
a component.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component.
|
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse cursor has been moved onto a component but no
buttons have been pushed.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.
|
void |
releaseProxy()
Release the proxy lock on the MapMouseMode.
|
void |
removeAllMapMouseListeners()
Remove all MapMouseListeners from the mode.
|
void |
removeMapMouseListener(com.bbn.openmap.event.MapMouseListener l)
Remove a MapMouseListener from the MouseMode.
|
void |
setActive(boolean isActive) |
void |
setModeCursor(java.awt.Cursor cursor) |
void |
setPressedCursor(java.awt.Cursor cursor) |
void |
setProxyDistributionMask(int mask)
Set the mask that dictates which events get sent to this support object's
targets even if the parent mouse mode is acting as a proxy.
|
public void setActive(boolean isActive)
setActive
in interface com.bbn.openmap.event.MapMouseMode
public boolean isActive()
public javax.swing.Icon getGUIIcon()
getGUIIcon
in interface com.bbn.openmap.event.MapMouseMode
public java.awt.Cursor getModeCursor()
getModeCursor
in interface com.bbn.openmap.event.MapMouseMode
public java.awt.Cursor getPressedCursor()
public void setModeCursor(java.awt.Cursor cursor)
public void setPressedCursor(java.awt.Cursor cursor)
public void addMapMouseListener(com.bbn.openmap.event.MapMouseListener l)
addMapMouseListener
in interface com.bbn.openmap.event.MapMouseMode
l
- the MapMouseListener to add.public void removeAllMapMouseListeners()
removeAllMapMouseListeners
in interface com.bbn.openmap.event.MapMouseMode
public void removeMapMouseListener(com.bbn.openmap.event.MapMouseListener l)
removeMapMouseListener
in interface com.bbn.openmap.event.MapMouseMode
l
- the MapMouseListener to remove.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
MOUSE_DRAGGED
events will continue to be delivered to the
component where the drag originated until the mouse button is released
(regardless of whether the mouse position is within the bounds of the
component).
Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGED
events may not be delivered during a native
Drag&Drop operation.
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public boolean isVisible()
isVisible
in interface com.bbn.openmap.event.MapMouseMode
public boolean actAsProxyFor(com.bbn.openmap.event.MapMouseMode mmm)
actAsProxyFor
in interface com.bbn.openmap.event.MapMouseMode
mmm
- the hidden MapMouseMode for this MapMouseMode to send events
to.public boolean actAsProxyFor(com.bbn.openmap.event.MapMouseMode mmm, int pdm)
actAsProxyFor
in interface com.bbn.openmap.event.MapMouseMode
mmm
- the hidden MapMouseMode for this MapMouseMode to send events
to.pdm
- the proxy distribution mask to use, which lets this proxy
notify its targets of events.public boolean isProxyFor(com.bbn.openmap.event.MapMouseMode mmm)
isProxyFor
in interface com.bbn.openmap.event.MapMouseMode
public void releaseProxy()
releaseProxy
in interface com.bbn.openmap.event.MapMouseMode
public void setProxyDistributionMask(int mask)
setProxyDistributionMask
in interface com.bbn.openmap.event.MapMouseMode
for definitions of mask bits.
public int getProxyDistributionMask()
getProxyDistributionMask
in interface com.bbn.openmap.event.MapMouseMode
for definitions of mask bits.
public void listenerPaint(java.awt.Graphics graphics)
listenerPaint
in interface com.bbn.openmap.event.PaintListener