y.view
Class MoveViewPortMode

java.lang.Object
  |
  +--y.view.ViewMode
        |
        +--y.view.MoveViewPortMode
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener

public class MoveViewPortMode
extends ViewMode

A view mode that allows moving the viewport of the view. This view mode moves the viewport of the view around when the mouse gets dragged around with the right butten pressed down.


Field Summary
 
Fields inherited from class y.view.ViewMode
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view
 
Constructor Summary
MoveViewPortMode()
           
 
Method Summary
 void mouseDraggedRight(double x, double y)
          Moves the viewport around.
 void mousePressedRight(double x, double y)
          Initiates the move viewport action.
 void mouseReleasedRight(double x, double y)
          Terminates the move viewport action.
 
Methods inherited from class y.view.ViewMode
activate, getGraph2D, getGridX, getGridY, getHitInfo, getHitInfo, getLastHitInfo, getName, init, isGrabFocusEnabled, isGridMode, mouseClicked, mouseClicked, mouseDragged, mouseDraggedLeft, mouseDraggedMiddle, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mousePressedLeft, mousePressedMiddle, mouseReleased, mouseReleased, mouseReleasedLeft, mouseReleasedMiddle, mouseShiftPressedLeft, mouseShiftPressedMiddle, mouseShiftPressedRight, mouseShiftReleasedLeft, mouseShiftReleasedMiddle, mouseShiftReleasedRight, reactivateParent, setActiveView, setChild, setChild, setGrabFocusEnabled, setGridMode, setLastHitInfo, setName, setParent, translateX, translateY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoveViewPortMode

public MoveViewPortMode()
Method Detail

mousePressedRight

public void mousePressedRight(double x,
                              double y)
Initiates the move viewport action.

Overrides:
mousePressedRight in class ViewMode
Parameters:
x - the x-coordinate of the mouse event in world coordinates.
y - the y-coordinate of the mouse event in world coordinates.

mouseReleasedRight

public void mouseReleasedRight(double x,
                               double y)
Terminates the move viewport action.

Overrides:
mouseReleasedRight in class ViewMode
Parameters:
x - the x-coordinate of the mouse event in world coordinates.
y - the y-coordinate of the mouse event in world coordinates.

mouseDraggedRight

public void mouseDraggedRight(double x,
                              double y)
Moves the viewport around.

Overrides:
mouseDraggedRight in class ViewMode
Parameters:
x - the x-coordinate of the mouse event in world coordinates.
y - the y-coordinate of the mouse event in world coordinates.

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003