BasicMouseTask3D
vmm3d.core3D

Class BasicMouseTask3D



  • public class BasicMouseTask3Dextends MouseTask
    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 Detail

      • BasicMouseTask3D

        public BasicMouseTask3D()
    • Method Detail

      • doMouseDown

        public boolean doMouseDown(MouseEvent evt,                  Display display,                  View view,                  int width,                  int height)
        Decides which operation to perform, if any. For stereographic views, a ZOOM or ROTATE operation is begun only if the mouse click is actually inside one of the two view rectangles.
        Specified by:
        doMouseDown in class MouseTask
        Parameters:
        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).
      • doMouseDrag

        public void doMouseDrag(MouseEvent evt,               Display display,               View view,               int width,               int height)
        Continue an operation that was begun in the doMouseDown method. The user can change the operation in the middle of a mouse drag by pressing and releasing modifier keys.
        Overrides:
        doMouseDrag in class MouseTask
        Parameters:
        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).
      • doMouseUp

        public void doMouseUp(MouseEvent evt,             Display display,             View view,             int width,             int height)
        Finish an operation that was begun in the 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.
        Overrides:
        doMouseUp in class MouseTask
        Parameters:
        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).

SCaVis 2.1 © jWork.ORG