@SuppressWarnings("unchecked") public void mouseDragged(MouseEvent e){
  VisualizationViewer<V,E> vv=(VisualizationViewer<V,E>)e.getSource();
  Point2D out=e.getPoint();
  if (e.getModifiers() == additionalModifiers) {
    rectangularShape.setFrameFromDiagonal(down,out);
  }
 else   if (e.getModifiers() == modifiers) {
    rectangularShape.setFrameFromDiagonal(down,out);
  }
  rectangularShape.setFrameFromDiagonal(down,out);
  vv.repaint();
}

@ SuppressWarnings ( "unchecked" ) public void mouseDragged ( MouseEvent e ) { VisualizationViewer < V , E > vv = ( VisualizationViewer < V , E > ) e . getSource ( ) ; Point2D out = e . getPoint ( ) ; if ( e . getModifiers ( ) == additionalModifiers ) { rectangularShape . setFrameFromDiagonal ( down , out ) ; } else if ( e . getModifiers ( ) == modifiers ) { rectangularShape . setFrameFromDiagonal ( down , out ) ; } rectangularShape . setFrameFromDiagonal ( down , out ) ; vv . repaint ( ) ; }
draws the transient paintable that will become a shape annotation when the mouse button is released
