public boolean mouseMoved(MouseEvent e){
  OMGraphic newSelectedGraphic;
  if (show_plot_ && graph != null) {
    newSelectedGraphic=graph.selectPoint(e.getX(),e.getY(),4.0f);
    if (newSelectedGraphic != null) {
      String infostring=(String)(newSelectedGraphic.getAttribute(OMGraphic.APP_OBJECT));
      if (infostring != null) {
        fireRequestInfoLine(infostring);
      }
    }
 else {
      fireRequestInfoLine("");
    }
    return true;
  }
 else {
    OMGraphicList list=getList();
    if (list != null) {
      newSelectedGraphic=list.selectClosest(e.getX(),e.getY(),4.0f);
      if (newSelectedGraphic != null && (selectedGraphic == null || newSelectedGraphic != selectedGraphic)) {
        Debug.message("basic","Making selection...");
        selectedGraphic=newSelectedGraphic;
        selectedGraphic.regenerate(getProjection());
        GLOBESite site=(GLOBESite)(newSelectedGraphic.getAttribute(OMGraphic.APP_OBJECT));
        if (site != null) {
          fireRequestInfoLine(site.getInfo());
        }
        repaint();
      }
 else       if (selectedGraphic != null && newSelectedGraphic == null) {
        Debug.message("basic","Clearing selection...");
        selectedGraphic.regenerate(getProjection());
        fireRequestInfoLine("");
        selectedGraphic=null;
        repaint();
      }
      return true;
    }
  }
  return false;
}

public boolean mouseMoved ( MouseEvent e ) { OMGraphic newSelectedGraphic ; if ( show_plot_ && graph != null ) { newSelectedGraphic = graph . selectPoint ( e . getX ( ) , e . getY ( ) , 4.0f ) ; if ( newSelectedGraphic != null ) { String infostring = ( String ) ( newSelectedGraphic . getAttribute ( OMGraphic . APP_OBJECT ) ) ; if ( infostring != null ) { fireRequestInfoLine ( infostring ) ; } } else { fireRequestInfoLine ( "" ) ; } return true ; } else { OMGraphicList list = getList ( ) ; if ( list != null ) { newSelectedGraphic = list . selectClosest ( e . getX ( ) , e . getY ( ) , 4.0f ) ; if ( newSelectedGraphic != null && ( selectedGraphic == null || newSelectedGraphic != selectedGraphic ) ) { Debug . message ( "basic" , "Making selection..." ) ; selectedGraphic = newSelectedGraphic ; selectedGraphic . regenerate ( getProjection ( ) ) ; GLOBESite site = ( GLOBESite ) ( newSelectedGraphic . getAttribute ( OMGraphic . APP_OBJECT ) ) ; if ( site != null ) { fireRequestInfoLine ( site . getInfo ( ) ) ; } repaint ( ) ; } else if ( selectedGraphic != null && newSelectedGraphic == null ) { Debug . message ( "basic" , "Clearing selection..." ) ; selectedGraphic . regenerate ( getProjection ( ) ) ; fireRequestInfoLine ( "" ) ; selectedGraphic = null ; repaint ( ) ; } return true ; } } return false ; }
called whenever the mouse is moved on this layer and one of the requested mouse modes is active . < p > tries to locate a graphic near the mouse , and if it is found , it is highlighted and the layer is repainted to show the highlighting .
