public void paintLine(Point2D pt1,Point2D pt2,Graphics graphics){
  Graphics2D g=(Graphics2D)graphics;
  if (pt1 != null && pt2 != null && theMap != null) {
    OMLine cLine=new OMLine(pt1.getY(),pt1.getX(),pt2.getY(),pt2.getX(),lineType);
    renderAttributes.setTo(cLine);
    Projection proj=theMap.getRotatedProjection();
    cLine.generate(proj);
    cLine.render(g);
  }
}

public void paintLine ( Point2D pt1 , Point2D pt2 , Graphics graphics ) { Graphics2D g = ( Graphics2D ) graphics ; if ( pt1 != null && pt2 != null && theMap != null ) { OMLine cLine = new OMLine ( pt1 . getY ( ) , pt1 . getX ( ) , pt2 . getY ( ) , pt2 . getX ( ) , lineType ) ; renderAttributes . setTo ( cLine ) ; Projection proj = theMap . getRotatedProjection ( ) ; cLine . generate ( proj ) ; cLine . render ( g ) ; } }
draw a rubberband line between two points into the graphics object .
