Beispiel #1
0
  /**
   * Obtiene el bot�n que lanza el panel de selecci�n de proyecciones.
   *
   * @return
   */
  private CRSSelectPanel getProjectionDstSelector() {
    if (projectionDstSelector == null) {
      projectionDstSelector = CRSSelectPanel.getPanel(projDst);
      // projectionDstSelector.setTransPanelActive(true);
      projectionDstSelector.setPreferredSize(null);
      projectionDstSelector.addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              if (projectionDstSelector.isOkPressed()) {
                projDst = projectionDstSelector.getCurProj();
              }
            }
          });
      projectionDstSelector.setBorder(
          BorderFactory.createTitledBorder(RasterToolsUtil.getText(this, "dest_proj")));

      if (!isInTOC.booleanValue()) StatusComponent.setDisabled(projectionDstSelector);
    }
    return projectionDstSelector;
  }
Beispiel #2
0
  /**
   * Obtiene el bot�n que lanza el panel de selecci�n de proyecciones.
   *
   * @return
   */
  private CRSSelectPanel getProjectionSrcSelector() {
    if (projectionSrcSelector == null) {

      IProjection projectionAux = null;
      IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
      if (activeWindow instanceof BaseView) {
        BaseView activeView = (BaseView) activeWindow;
        projectionAux = activeView.getProjection();
        activeView.setProjection(projSrc);
      }

      projectionSrcSelector = CRSSelectPanel.getPanel(projSrc);

      if (activeWindow instanceof BaseView) {
        BaseView activeView = (BaseView) activeWindow;
        activeView.setProjection(projectionAux);
      }

      // projectionSrcSelector.setTransPanelActive(true);
      projectionSrcSelector.setPreferredSize(null);
      projectionSrcSelector.addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              if (projectionSrcSelector.isOkPressed()) {
                projSrc = projectionSrcSelector.getCurProj();
              }
            }
          });
      projectionSrcSelector.setBorder(
          BorderFactory.createTitledBorder(RasterToolsUtil.getText(this, "src_proj")));

      if (isInTOC.booleanValue() && this.lyr.readProjection() != null)
        StatusComponent.setDisabled(projectionSrcSelector);
    }
    return projectionSrcSelector;
  }