Logo Search packages:      
Sourcecode: wims version File versions

Wheel.java

package rene.viewer;

import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;

class Wheel
      implements MouseWheelListener
{     WheelListener V;
      public Wheel (WheelListener v)
      {     V=v;
      }
      public void mouseWheelMoved (MouseWheelEvent e)
      {     if (e.getScrollType()==MouseWheelEvent.WHEEL_BLOCK_SCROLL)
            {     if (e.getWheelRotation()>0)
                        V.pageUp();
                  else
                        V.pageDown();
            }
            else
            {     int n=e.getScrollAmount();
                  if (e.getWheelRotation()>0) V.up(n);
                  else V.down(n);
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index