Package gov.nasa.worldwind.util
Interface HotSpot
-
- All Superinterfaces:
java.util.EventListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,SelectListener
- All Known Implementing Classes:
AbstractHotSpot
,AbstractResizeHotSpot
,BalloonResizeController
,DragControl
,FrameResizeControl
,ScrollBar.ScrollControl
,ScrollBar.ScrollKnob
,ScrollFrame
,TreeHotSpot
public interface HotSpot extends SelectListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener
HotSpot is an interface for forwarding select, keyboard, and mouse events to picked objects in theWorldWindow
. When the HotSpot is active it receives input events that occur in the WorldWindow.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.Cursor
getCursor()
Returns the AWTCursor
representation to display when the HotSpot is active, ornull
to use the default Cursor.boolean
isActive()
Indicates whether or not this HotSpot is active.void
keyPressed(java.awt.event.KeyEvent event)
Called when a key is pressed and the HotSpot is active.void
keyReleased(java.awt.event.KeyEvent event)
Called when a key is released and the HotSpot is active.void
keyTyped(java.awt.event.KeyEvent event)
Called when a key is typed and the HotSpot is active.void
mouseClicked(java.awt.event.MouseEvent event)
Called when the mouse is clicked on the HotSpot in the WorldWindow.void
mouseDragged(java.awt.event.MouseEvent event)
Called when the mouse is dragged in the WorldWindow and the HotSpot is active.void
mouseEntered(java.awt.event.MouseEvent event)
Called when the mouse enters the WorldWindow and the HotSpot is active.void
mouseExited(java.awt.event.MouseEvent event)
Called when the mouse exits the WorldWindow and the HotSpot is active.void
mouseMoved(java.awt.event.MouseEvent event)
Called when the cursor moves over the HotSpot in the WorldWindow.void
mousePressed(java.awt.event.MouseEvent event)
Called when the mouse is pressed over the HotSpot in the WorldWindow.void
mouseReleased(java.awt.event.MouseEvent event)
Called when the mouse is released over the HotSpot in the WorldWindow.void
mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Called when the mouse wheel is moved in the WorldWindow and HotSpot is active.void
selected(SelectEvent event)
Called when the HotSpot is selected in the WorldWindow.void
setActive(boolean active)
Called when this HotSpot is activated or deactivated.
-
-
-
Method Detail
-
setActive
void setActive(boolean active)
Called when this HotSpot is activated or deactivated. The HotSpot only receives input events when it is active.- Parameters:
active
-true
if this HotSpot is being activated.false
if this HotSpot is being deactivated.
-
isActive
boolean isActive()
Indicates whether or not this HotSpot is active.- Returns:
true
if this HotSpot is active,false
if not.
-
selected
void selected(SelectEvent event)
Called when the HotSpot is selected in the WorldWindow.- Specified by:
selected
in interfaceSelectListener
- Parameters:
event
- The event to handle.
-
keyTyped
void keyTyped(java.awt.event.KeyEvent event)
Called when a key is typed and the HotSpot is active.- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
- Parameters:
event
- The event to handle.
-
keyPressed
void keyPressed(java.awt.event.KeyEvent event)
Called when a key is pressed and the HotSpot is active.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Parameters:
event
- The event to handle.
-
keyReleased
void keyReleased(java.awt.event.KeyEvent event)
Called when a key is released and the HotSpot is active.- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
- Parameters:
event
- The event to handle.
-
mouseClicked
void mouseClicked(java.awt.event.MouseEvent event)
Called when the mouse is clicked on the HotSpot in the WorldWindow.- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
event
- The event to handle.
-
mousePressed
void mousePressed(java.awt.event.MouseEvent event)
Called when the mouse is pressed over the HotSpot in the WorldWindow.- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
event
- The event to handle.
-
mouseReleased
void mouseReleased(java.awt.event.MouseEvent event)
Called when the mouse is released over the HotSpot in the WorldWindow.- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
event
- The event to handle.
-
mouseEntered
void mouseEntered(java.awt.event.MouseEvent event)
Called when the mouse enters the WorldWindow and the HotSpot is active.- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
event
- The event to handle.
-
mouseExited
void mouseExited(java.awt.event.MouseEvent event)
Called when the mouse exits the WorldWindow and the HotSpot is active.- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
event
- The event to handle.
-
mouseDragged
void mouseDragged(java.awt.event.MouseEvent event)
Called when the mouse is dragged in the WorldWindow and the HotSpot is active.- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Parameters:
event
- The event to handle.
-
mouseMoved
void mouseMoved(java.awt.event.MouseEvent event)
Called when the cursor moves over the HotSpot in the WorldWindow.- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
- Parameters:
event
- The event to handle.
-
mouseWheelMoved
void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Called when the mouse wheel is moved in the WorldWindow and HotSpot is active.- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
- Parameters:
event
- The event to handle.
-
getCursor
java.awt.Cursor getCursor()
Returns the AWTCursor
representation to display when the HotSpot is active, ornull
to use the default Cursor.- Returns:
- The Cursor representation associated with the HotSpot. May return
null
.
-
-