org.opensourcephysics.display
Class DrawingPanel.ZoomBox

java.lang.Object
  extended by org.opensourcephysics.display.DrawingPanel.ZoomBox
Enclosing class:
DrawingPanel

public class DrawingPanel.ZoomBox
extends java.lang.Object

ZoomBox creates an on-screen rectangle using XORMode for fast redrawing.


Constructor Summary
DrawingPanel.ZoomBox()
           
 
Method Summary
 void drag(int xpix, int ypix)
          Drags the corner of the ZoomBox.
 void hide()
          Hides the zoom box.
 java.awt.geom.Rectangle2D.Double reportZoom(int xpix, int ypix)
          Hides the zoom box and reports the rectangle selected.
 void startZoom(int xpix, int ypix)
          Starts the zoom by saving the corner location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingPanel.ZoomBox

public DrawingPanel.ZoomBox()
Method Detail

startZoom

public void startZoom(int xpix,
                      int ypix)
Starts the zoom by saving the corner location.

Parameters:
xpix -
ypix -

hide

public void hide()
Hides the zoom box.


drag

public void drag(int xpix,
                 int ypix)
Drags the corner of the ZoomBox. Drag uses XORMode drawing to first erase and then repaint the box.

Parameters:
xpix -
ypix -

reportZoom

public java.awt.geom.Rectangle2D.Double reportZoom(int xpix,
                                                   int ypix)
Hides the zoom box and reports the rectangle selected.