j3d.org Code

org.j3d.ui.navigation
Interface NavigationMouseProcessor


public interface NavigationMouseProcessor

Abstract interface to take mouse events and process them for a navigation response.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Method Summary
 void mouseDragged(java.awt.event.MouseEvent evt)
          Process a mouse drag event to change the current movement value from the previously set value to the new value
 void mousePressed(java.awt.event.MouseEvent evt)
          Process a mouse press and set the behavior running.
 void mouseReleased(java.awt.event.MouseEvent evt)
          Process a mouse release to return all the values back to normal.
 void setButtonNavigation(int button, int state)
          Set the ability to use a given state within the handler for a specific mouse button (up to 3).
 void setNavigationStateListener(NavigationStateListener l)
          Set the listener for navigation state change notifications.
 

Method Detail

setButtonNavigation

void setButtonNavigation(int button,
                         int state)
Set the ability to use a given state within the handler for a specific mouse button (up to 3). This allows the caller to control exactly what states are allowed to be used and with which buttons. Note that it is quite legal to set all three buttons to the same navigation state

Parameters:
button - The mouse button value from MouseEvent
state - The navigation state to use for that button

setNavigationStateListener

void setNavigationStateListener(NavigationStateListener l)
Set the listener for navigation state change notifications. By setting a value of null it will clear the currently set instance

Parameters:
l - The listener to use for change updates

mousePressed

void mousePressed(java.awt.event.MouseEvent evt)
Process a mouse press and set the behavior running. This will cause the navigation state to be set depending on the mouse button pressed.

Parameters:
evt - The event that caused this method to be called

mouseDragged

void mouseDragged(java.awt.event.MouseEvent evt)
Process a mouse drag event to change the current movement value from the previously set value to the new value

Parameters:
evt - The event that caused this method to be called

mouseReleased

void mouseReleased(java.awt.event.MouseEvent evt)
Process a mouse release to return all the values back to normal. This places all of the transforms back to identity and sets it as though the nothing had happened.

Parameters:
evt - The event that caused this method to be called

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org