コード例 #1
0
ファイル: DTEDLayer.java プロジェクト: jrecursive/passage
 public boolean determineLocation(MouseEvent e) {
   Projection projection = getProjection();
   if (cache != null && projection != null) {
     LatLonPoint ll = projection.inverse(e.getX(), e.getY(), new LatLonPoint.Double());
     location = new DTEDLocation(e.getX(), e.getY());
     location.setElevation(cache.getElevation((float) ll.getY(), (float) ll.getX()));
     location.generate(projection);
     repaint();
     return true;
   }
   return false;
 }
コード例 #2
0
ファイル: DTEDLayer.java プロジェクト: jrecursive/passage
  /**
   * Paints the layer.
   *
   * @param g the Graphics context for painting
   */
  public void paint(java.awt.Graphics g) {
    Debug.message("dted", getName() + "|DTEDLayer.paint()");

    super.paint(g);

    if (location != null) location.render(g);
    location = null;
  }