com.sun.electric.tool.user.ui
Class ZoomAndPanListener

java.lang.Object
  extended by com.sun.electric.tool.user.ui.ZoomAndPanListener
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class ZoomAndPanListener
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener

Class to Zoom and Pan an EditWindow.


Field Summary
static ZoomAndPanListener theOne
           
 
Method Summary
static void centerCursor(WindowFrame wf)
          This method implements the command to center the cursor.
static void centerSelection()
          This method implements the command to center the selected objects.
 void keyPressed(java.awt.event.KeyEvent evt)
           
 void keyReleased(java.awt.event.KeyEvent evt)
           
 void keyTyped(java.awt.event.KeyEvent evt)
           
 void mouseClicked(java.awt.event.MouseEvent evt)
           
 void mouseDragged(java.awt.event.MouseEvent evt)
           
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 void mouseMoved(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
           
 void mouseReleased(java.awt.event.MouseEvent evt)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
           
static void panXOrY(int direction, WindowFrame wf, int ticks)
          Pan in X or Y direction.
static void redrawDisplay()
           
static void setProperCursor(java.awt.event.MouseEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theOne

public static ZoomAndPanListener theOne
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

setProperCursor

public static void setProperCursor(java.awt.event.MouseEvent evt)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent evt)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent evt)
Specified by:
keyTyped in interface java.awt.event.KeyListener

redrawDisplay

public static void redrawDisplay()

panXOrY

public static void panXOrY(int direction,
                           WindowFrame wf,
                           int ticks)
Pan in X or Y direction.

Parameters:
direction - 0 if X or 1 if Y
wf - the WindowFrame
ticks - the amount and direction of pan.

centerSelection

public static void centerSelection()
This method implements the command to center the selected objects.


centerCursor

public static void centerCursor(WindowFrame wf)
This method implements the command to center the cursor.

Parameters:
wf - the WindowFrame