public class ZoomingPanControl extends ControlAdapter
Allows users to pan over a display such that the display zooms in and out proportionally to how fast the pan is performed.
The algorithm used is that of Takeo Igarishi and Ken Hinckley in their research paper Speed-dependent Automatic Zooming for Browsing Large Documents, UIST 2000.
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON
Constructor and Description |
---|
ZoomingPanControl()
Create a new ZoomingPanControl.
|
ZoomingPanControl(boolean repaint)
Create a new ZoomingPanControl.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on the Display (but NOT a
VisualItem) and then dragged.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on the Display but NOT
on a VisualItem.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on the Display but NOT
on a VisualItem.
|
isEnabled, itemClicked, itemDragged, itemEntered, itemExited, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemPressed, itemReleased, itemWheelMoved, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved, setEnabled
public ZoomingPanControl()
public ZoomingPanControl(boolean repaint)
repaint
- true if repaint requests should be issued while
panning and zooming. false if repaint requests will come from
elsewhere (e.g., a continuously running action).public void mousePressed(java.awt.event.MouseEvent e)
Control
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in interface Control
mousePressed
in class ControlAdapter
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseDragged(java.awt.event.MouseEvent e)
Control
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in interface Control
mouseDragged
in class ControlAdapter
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
public void mouseReleased(java.awt.event.MouseEvent e)
Control
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in interface Control
mouseReleased
in class ControlAdapter
MouseListener.mouseReleased(java.awt.event.MouseEvent)
Copyright ? 2013 Regents of the University of California