public boolean mouseDragged(MouseEvent e){
  if (grabbed_plot_graphics_) {
    int x=e.getX();
    int y=e.getY();
    int dx=x - prevX;
    int dy=y - prevY;
    plotX+=dx;
    plotY+=dy;
    prevX=x;
    prevY=y;
    graph.resize(plotX,plotY,plotWidth,plotHeight);
    OMGraphicList plotGraphics=graph.getPlotGraphics();
    plotGraphics.generate(getProjection(),true);
    repaint();
  }
  return false;
}

public boolean mouseDragged ( MouseEvent e ) { if ( grabbed_plot_graphics_ ) { int x = e . getX ( ) ; int y = e . getY ( ) ; int dx = x - prevX ; int dy = y - prevY ; plotX += dx ; plotY += dy ; prevX = x ; prevY = y ; graph . resize ( plotX , plotY , plotWidth , plotHeight ) ; OMGraphicList plotGraphics = graph . getPlotGraphics ( ) ; plotGraphics . generate ( getProjection ( ) , true ) ; repaint ( ) ; } return false ; }
called whenever the mouse is dragged on this layer and one of the requested mouse modes is active .
