public void drawingComplete(OMGraphic omg,OMAction action){
  if (timerButton.isSelected()) {
    timer.restart();
  }
  if (omg instanceof OMPoint) {
    OMPoint p=(OMPoint)omg;
    Pilot mp=new Pilot(p.getLat(),p.getLon(),p.getRadius(),true);
    mp.setName("Added Node " + (pointCount++));
    mp.setStationary(true);
    mp.showPalette();
    points.put(mp.getName(),mp);
    manageGraphics();
  }
 else   if (omg instanceof OMPoly) {
    OMPoly poly=(OMPoly)omg;
    PilotPath pmp=new PilotPath(poly,5,true);
    pmp.setName("Added Node " + (pointCount++));
    pmp.setStationary(true);
    pmp.showPalette();
    points.put(pmp.getName(),pmp);
    pmp.setMapHandler((MapHandler)getBeanContext());
    manageGraphics();
  }
  addPathButton.setEnabled(true);
}

public void drawingComplete ( OMGraphic omg , OMAction action ) { if ( timerButton . isSelected ( ) ) { timer . restart ( ) ; } if ( omg instanceof OMPoint ) { OMPoint p = ( OMPoint ) omg ; Pilot mp = new Pilot ( p . getLat ( ) , p . getLon ( ) , p . getRadius ( ) , true ) ; mp . setName ( "Added Node " + ( pointCount ++ ) ) ; mp . setStationary ( true ) ; mp . showPalette ( ) ; points . put ( mp . getName ( ) , mp ) ; manageGraphics ( ) ; } else if ( omg instanceof OMPoly ) { OMPoly poly = ( OMPoly ) omg ; PilotPath pmp = new PilotPath ( poly , 5 , true ) ; pmp . setName ( "Added Node " + ( pointCount ++ ) ) ; pmp . setStationary ( true ) ; pmp . showPalette ( ) ; points . put ( pmp . getName ( ) , pmp ) ; pmp . setMapHandler ( ( MapHandler ) getBeanContext ( ) ) ; manageGraphics ( ) ; } addPathButton . setEnabled ( true ) ; }
the method where a graphic , and an action to take on the graphic , arrives .
