|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.MouseTask vmm.core3D.BasicMouseTask3D
public class BasicMouseTask3D
A MouseTask that is designed to handle the most common cases of interaction with a three-dimensional Exhibit. Clicking and dragging with the left mouse button on a 3D Exhibit will do trackball-style rotation of the Exhibit. Using the middle mouse button, or the left mouse button with the Shift or ALT/Option key, will zoom the Exhibit as the mouse is dragged up and down. Using the right mouse button, or the left mouse button with the Control or Meta/Command key, will drag the Exhibit.
"Dragging" the exhibit has a special meaning when the exhibit is displayed in dual, sterographic mode. In that case, dragging the mouse horizontally will slide the two views of the exhibit closer together and farther apart. This is to allow the user to adjust the distance to make it easier to fuse the two views into one 3D view.
Constructor Summary | |
---|---|
BasicMouseTask3D()
|
Method Summary | |
---|---|
boolean |
doMouseDown(java.awt.event.MouseEvent evt,
Display display,
View view,
int width,
int height)
Decides which operation to perform, if any. |
void |
doMouseDrag(java.awt.event.MouseEvent evt,
Display display,
View view,
int width,
int height)
Continue an operation that was begun in the doMouseDown method. |
void |
doMouseUp(java.awt.event.MouseEvent evt,
Display display,
View view,
int width,
int height)
Finish an operation that was begun in the doMouseDown method. |
java.awt.Cursor |
getCursorForDragging(java.awt.event.MouseEvent mouseDownEvent,
Display display,
View view)
Returns the cursor that the Display should use during a drag operation. |
Methods inherited from class vmm.core.MouseTask |
---|
drawWhileDragging, finish, getCursor, getStatusText, start, wantsMoreClicks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicMouseTask3D()
Method Detail |
---|
public boolean doMouseDown(java.awt.event.MouseEvent evt, Display display, View view, int width, int height)
doMouseDown
in class MouseTask
evt
- The mouse-down event, except that the x and y coordinates
have been translated so that the top left corner of the View is at
coordinates (0,0).width
- The width the drawing area (not including any insets).height
- The height the drawing area (not including any insets).public void doMouseDrag(java.awt.event.MouseEvent evt, Display display, View view, int width, int height)
doMouseDown
method. The user can change the
operation in the middle of a mouse drag by pressing and releasing modifier keys.
doMouseDrag
in class MouseTask
evt
- The mouse-dragged event, except that the x and y coordinates
have been translated by display.getInsets().left and display.getInsets().top
to account for any border that has been applied to the display.width
- The width the drawing area (not including any insets).height
- The height the drawing area (not including any insets).public void doMouseUp(java.awt.event.MouseEvent evt, Display display, View view, int width, int height)
doMouseDown
method. If the operation
is ROTATE and the user was still moving the mouse when the mouse button was released, then
an animation is installed in the Display that will continue the rotation indefinitely.
doMouseUp
in class MouseTask
evt
- The mouse-up event, except that the x and y coordinates
have been translated by display.getInsets().left and display.getInsets().top
to account for any border that has been applied to the display.width
- The width the drawing area (not including any insets).height
- The height the drawing area (not including any insets).public java.awt.Cursor getCursorForDragging(java.awt.event.MouseEvent mouseDownEvent, Display display, View view)
getCursorForDragging
in class MouseTask
MouseTask.doMouseDown(MouseEvent, Display, View, int, int)
,
MouseTask.getCursor(Display, View)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |