Exemplo n.º 1
0
    public DTEDLocation(int x, int y) {
      text = new OMText(x + 10, y, (String) null, (java.awt.Font) null, OMText.JUSTIFY_LEFT);

      dot = new OMRect(x - 1, y - 1, x + 1, y + 1);
      text.setLinePaint(java.awt.Color.red);
      dot.setLinePaint(java.awt.Color.red);
    }
Exemplo n.º 2
0
 public void generate(Projection proj) {
   text.generate(proj);
   dot.generate(proj);
 }
Exemplo n.º 3
0
 public void render(java.awt.Graphics g) {
   text.render(g);
   dot.render(g);
 }
Exemplo n.º 4
0
 /** Set the x-y location of the combo in the screen */
 public void setLocation(int x, int y) {
   text.setX(x + 10);
   text.setY(y);
   dot.setLocation(x - 1, y - 1, x + 1, y + 1);
 }
Exemplo n.º 5
0
  /**
   * Get the map coverage
   *
   * @param ullat
   * @param ullon
   * @param lrlat
   * @param lrlon
   * @param proj projection for display
   * @param chartSeries the chart series to query for, may be null for all coverages
   * @param coverages The Map to be modified
   */
  protected void getCatalogCoverage(
      double ullat,
      double ullon,
      double lrlat,
      double lrlon,
      Projection proj,
      String chartSeries,
      Map<RpfProductInfo, RpfCoverage.RpfCoverageControl> coverages) {

    Debug.message("rpfcov", "RpfCoverageManager: Getting catalog coverage from RpfFrameProvider");
    if (proj == null || frameProvider == null) {
      return;
    }

    CADRG cadrg;
    if (proj instanceof CADRG) {
      cadrg = (CADRG) proj;
    } else {
      cadrg =
          new CADRG(
              (LatLonPoint) proj.getCenter(new LatLonPoint.Float()),
              proj.getScale(),
              proj.getWidth(),
              proj.getHeight());
    }

    List<RpfCoverageBox> hemisphereData = new ArrayList<RpfCoverageBox>();

    if (ProjMath.isCrossingDateline(ullon, lrlon, proj.getScale())) {

      hemisphereData.addAll(
          frameProvider.getCatalogCoverage(ullat, ullon, lrlat, 180f, cadrg, chartSeries));
      hemisphereData.addAll(
          frameProvider.getCatalogCoverage(ullat, -180f, lrlat, lrlon, cadrg, chartSeries));
    } else {
      hemisphereData.addAll(
          frameProvider.getCatalogCoverage(ullat, ullon, lrlat, lrlon, cadrg, chartSeries));
    }

    boolean checkSeries =
        !(chartSeries == null
            || chartSeries.equals(RpfViewAttributes.ANY)
            || chartSeries.equals(RpfViewAttributes.ALL));

    for (RpfCoverageBox box : hemisphereData) {

      OMRect rect = new OMRect(box.nw_lat, box.nw_lon, box.se_lat, box.se_lon, currentLineType);

      RpfProductInfo rpi = RpfProductInfo.get(box.chartCode);

      if (rpi != null) {

        if (checkSeries && !rpi.seriesCode.equalsIgnoreCase(chartSeries)) {
          continue;
        }

        RpfCoverage.RpfCoverageControl control = coverages.get(rpi);
        if (control != null) {
          control.add(rect);
          rect.generate(proj);
        }
      }
    }
  }