public void configure(Request request) {
   selectedStyles = (Object[]) request.getAttribute("selectedStyles");
   sldStyle = (SLDStyle) request.getAttribute("SLDStyle");
   // Para saber si estamos eligiendo fichero para una importación o exportación
   importar = (String) request.getAttribute("importar");
   layer = (Layer) request.getAttribute("Layer");
   layerName = (String) request.getAttribute("LayerName");
   String etiqueta = aplicacion.getI18nString("SLDStyle.SeleccionFichero");
   if (importar.equals("true"))
     etiqueta += aplicacion.getI18nString("SLDStyle.ImportarFicheroEstilo");
   else etiqueta += aplicacion.getI18nString("SLDStyle.ExportarFicheroEstilo");
   fileLbl.setText(etiqueta);
 }
  public boolean execute(PlugInContext context) throws Exception {
    Collection selectedCategories = context.getLayerNamePanel().getSelectedCategories();

    String actualName = aplicacion.getI18nString("GeopistaAddNewLayerPlugIn.New");

    GeopistaLayer layer =
        new GeopistaLayer(
            actualName,
            context.getLayerManager().generateLayerFillColor(),
            createBlankFeatureCollection(),
            context.getLayerManager());
    // Como es una capa creada localmente asignamos el flag isLocal a true
    layer.setLocal(true);

    // com.geopista.io.datasource.GeopistaStandarReaderWriteFileDataSource.GeoGML
    // h = new
    // com.geopista.io.datasource.GeopistaStandarReaderWriteFileDataSource.GeoGML();
    // layer.setDataSourceQuery(new DataSourceQuery());

    context
        .getLayerManager()
        .addLayer(
            selectedCategories.isEmpty()
                ? StandardCategoryNames.WORKING
                : selectedCategories.iterator().next().toString(),
            layer);

    ((EditingPlugIn) context.getWorkbenchContext().getBlackboard().get(EditingPlugIn.KEY))
        .getToolbox(context.getWorkbenchContext())
        .setVisible(true);

    return true;
  }
예제 #3
0
 /** Método que renombra el panel de la lista */
 public void renombrarJListComponent() {
   try {
     mejorasListaPane.renombrar(aplicacion.getI18nString("inventario.mejoras.tag1"));
   } catch (Exception e) {
   }
   ;
 }
  public void initialize(PlugInContext context) throws Exception {

    String pluginCategory = aplicacion.getString(toolBarCategory);
    ((WorkbenchGuiComponent) context.getWorkbenchContext().getIWorkbench().getGuiComponent())
        .getToolBar(pluginCategory)
        .addPlugIn(
            getIcon(),
            this,
            createEnableCheck(context.getWorkbenchContext()),
            context.getWorkbenchContext());

    JPopupMenu popupMenu = context.getWorkbenchGuiComponent().getLayerViewPopupMenu();

    // JPopupMenu layerNamePopupMenu = context.getWorkbenchContext().getIWorkbench()
    // .getGuiComponent()
    // .getLayerNamePopupMenu();

    FeatureInstaller featureInstaller = new FeatureInstaller(context.getWorkbenchContext());

    featureInstaller.addPopupMenuItem(
        popupMenu,
        this,
        aplicacion.getI18nString(getName()),
        false,
        GUIUtil.toSmallIcon(ICON),
        createEnableCheck(context.getWorkbenchContext()));
    // null);

  }
예제 #5
0
 public void renombrarComponentes() {
   renombrarJListComponent();
   try {
     fechaEjecucionJLabel.setText(aplicacion.getI18nString("inventario.mejoras.tag2"));
   } catch (Exception e) {
   }
   try {
     mejorasJLabel.setText(aplicacion.getI18nString("inventario.mejoras.tag3"));
   } catch (Exception e) {
   }
   try {
     addJButton.setToolTipText(aplicacion.getI18nString("inventario.mejoras.tag4"));
   } catch (Exception e) {
   }
   try {
     deleteJButton.setToolTipText(aplicacion.getI18nString("inventario.mejoras.tag5"));
   } catch (Exception e) {
   }
   try {
     editJButton.setToolTipText(aplicacion.getI18nString("inventario.mejoras.tag6"));
   } catch (Exception e) {
   }
   try {
     okJButton.setToolTipText(aplicacion.getI18nString("inventario.mejoras.tag7"));
   } catch (Exception e) {
   }
   try {
     importeJLabel.setText(aplicacion.getI18nString("inventario.mejoras.tag10"));
   } catch (Exception e) {
   }
 }
예제 #6
0
 /**
  * Método que abre una ventana de confirmacion de borrado de un elemento de la lista
  *
  * @return false si la confirmacion es negativa, true en caso contrario
  */
 private boolean confirmDelete() {
   int ok = -1;
   ok =
       JOptionPane.showConfirmDialog(
           this,
           aplicacion.getI18nString("inventario.mejoras.tag8"),
           aplicacion.getI18nString("inventario.mejoras.tag9"),
           JOptionPane.YES_NO_OPTION);
   if (ok == JOptionPane.NO_OPTION) {
     return false;
   }
   return true;
 }
 private void fileBtnActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_fileBtnActionPerformed
   if (importar.equals("true")) {
     fileChooser = GUIUtil.createJFileChooserWithExistenceChecking();
     if (JFileChooser.APPROVE_OPTION == fileChooser.showOpenDialog(aplicacion.getMainFrame())) {
       fileTxt.setText(fileChooser.getSelectedFile().getAbsolutePath());
     } else
       JOptionPane.showMessageDialog(null, aplicacion.getI18nString("SLDStyle.SeleccionFichero"));
   } else {
     fileChooser = GUIUtil.createJFileXMLChooserWithOverwritePrompting();
     FileFilter fileFilter = new MyFileFilter(".xml", "XML");
     fileChooser.setFileFilter(fileFilter);
     fileChooser.setAcceptAllFileFilterUsed(false);
     if (JFileChooser.APPROVE_OPTION == fileChooser.showSaveDialog(aplicacion.getMainFrame())) {
       if (fileChooser.getSelectedFile().getAbsolutePath().endsWith(".xml"))
         fileTxt.setText(fileChooser.getSelectedFile().getAbsolutePath());
       else
         JOptionPane.showMessageDialog(
             null, AppContext.getMessage("SLDStyle.SeleccionFicheroXML"));
     } else
       JOptionPane.showMessageDialog(null, aplicacion.getI18nString("SLDStyle.SeleccionFichero"));
   }
 } // GEN-LAST:event_fileBtnActionPerformed
예제 #8
0
  public String validateInput() {
    String errorMessage =
        "\"" + gridSizeTextField.getText() + "\" " + appContext.getI18nString("errorMessage01");

    try {
      if (Double.parseDouble(gridSizeTextField.getText()) <= 0) {
        return errorMessage;
      }
    } catch (NumberFormatException e) {
      return errorMessage;
    }

    return null;
  }
예제 #9
0
 /**
  * This method initializes jButton1
  *
  * @return javax.swing.JButton
  */
 private JButton getFlashFeatureButton() {
   if (flashFeatureButton == null) {
     flashFeatureButton = new JButton();
     if (layerViewPanel == null) flashFeatureButton.setVisible(false);
     flashFeatureButton.setIcon(IconLoader.icon("Flashlight.gif"));
     flashFeatureButton.setToolTipText(
         aplicacion.getI18nString("FieldDialog.FlashCurrentFeature"));
     flashFeatureButton.addActionListener(
         new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent e) {
             flashFeature(documentExtendedForm.getSelectedFeature());
             setDescription();
           }
         });
   }
   return flashFeatureButton;
 }
예제 #10
0
 /**
  * This method initializes jButton
  *
  * @return javax.swing.JButton
  */
 private JButton getZoomFeatureButton() {
   if (zoomFeatureButton == null) {
     zoomFeatureButton = new JButton();
     if (layerViewPanel == null) zoomFeatureButton.setVisible(false);
     zoomFeatureButton.setIcon(com.geopista.ui.images.IconLoader.icon("SmallMagnify.gif"));
     zoomFeatureButton.setToolTipText(
         aplicacion.getI18nString("FieldDialog.ZoomToCurrentFeature"));
     zoomFeatureButton.addActionListener(
         new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent e) {
             zoom(documentExtendedForm.getSelectedFeature());
             setDescription();
           }
         });
   }
   return zoomFeatureButton;
 }
 private void okBtnActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_okBtnActionPerformed
   if (importar.equals("true") && !new File(fileTxt.getText()).exists())
     JOptionPane.showMessageDialog(null, aplicacion.getI18nString("SLDStyle.FicheroNoExiste"));
   else {
     Request theRequest = FrontControllerFactory.createRequest();
     theRequest.setAttribute("FileExport", fileTxt.getText());
     theRequest.setAttribute("selectedStyles", selectedStyles);
     theRequest.setAttribute("SLDStyle", sldStyle);
     theRequest.setAttribute("Layer", layer);
     theRequest.setAttribute("LayerName", layerName);
     FrontController fc = FrontControllerFactory.getFrontController();
     Action theAction;
     if (importar.equals("true")) theAction = fc.getAction("ImportCustomUserStyle");
     else theAction = fc.getAction("ExportCustomUserStyle");
     ActionForward theActionForward = theAction.doExecute(theRequest);
     _container.forward(theActionForward, theRequest);
   }
 } // GEN-LAST:event_okBtnActionPerformed
예제 #12
0
 private void jbInit() throws Exception {
   titledBorder1 =
       new TitledBorder(
           BorderFactory.createEtchedBorder(Color.white, new Color(148, 145, 140)),
           appContext.getI18nString("snappingSnapOptions"));
   border2 = BorderFactory.createEtchedBorder(Color.white, new Color(148, 145, 140));
   titledBorder2 = new TitledBorder(border2, appContext.getI18nString("gridSnapOptions"));
   this.setLayout(borderLayout1);
   jPanel1.setLayout(gridBagLayout1);
   jPanel2.setLayout(gridBagLayout2);
   jPanel2.setBorder(titledBorder1);
   snapToFeaturesCheckBox.setText(appContext.getI18nString("snapLinesSnapOptions"));
   snapToVerticesCheckBox.setText(appContext.getI18nString("snapVertivesSnapOptions"));
   snapToGridCheckBox.setText(appContext.getI18nString("snapGridSnapOptions"));
   jPanel4.setLayout(gridBagLayout3);
   jPanel5.setBorder(titledBorder2);
   jPanel5.setLayout(gridBagLayout4);
   gridSizeTextField.setText("20");
   gridSizeTextField.setHorizontalAlignment(SwingConstants.TRAILING);
   jPanel7.setLayout(gridBagLayout6);
   showGridDotsRadioButton.setSelected(true);
   showGridDotsRadioButton.setText(appContext.getI18nString("snapDotsSnapOptions"));
   showGridLinesRadioButton.setText(appContext.getI18nString("snapLinesSnapOptions"));
   showGridCheckBox.setToolTipText("");
   showGridCheckBox.setText(appContext.getI18nString("snapSizeSnapOptions"));
   showGridCheckBox.addActionListener(
       new java.awt.event.ActionListener() {
         public void actionPerformed(ActionEvent e) {
           showGridCheckBox_actionPerformed(e);
         }
       });
   tolerancePanel.setLayout(gridBagLayout5);
   toleranceLabel.setText(appContext.getI18nString("toleranceSnapOptions"));
   toleranceUnitsLabel.setText(appContext.getI18nString("unitsSnapOptions"));
   showGridUnitsLabel.setText(appContext.getI18nString("unitsModelSnapOptions"));
   this.add(jPanel1, BorderLayout.CENTER);
   jPanel1.add(
       jPanel2,
       new GridBagConstraints(
           0,
           0,
           1,
           1,
           1.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.HORIZONTAL,
           new Insets(10, 10, 10, 10),
           0,
           0));
   jPanel2.add(
       snapToFeaturesCheckBox,
       new GridBagConstraints(
           0,
           2,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel2.add(
       snapToVerticesCheckBox,
       new GridBagConstraints(
           0,
           1,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel2.add(
       jPanel3,
       new GridBagConstraints(
           1,
           1,
           1,
           1,
           1.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.HORIZONTAL,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel2.add(
       jPanel4,
       new GridBagConstraints(
           0,
           3,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel4.add(
       snapToGridCheckBox,
       new GridBagConstraints(
           0,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel2.add(
       tolerancePanel,
       new GridBagConstraints(
           0,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   tolerancePanel.add(
       toleranceLabel,
       new GridBagConstraints(
           1,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 5),
           0,
           0));
   tolerancePanel.add(
       toleranceTextField,
       new GridBagConstraints(
           2,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 5),
           0,
           0));
   tolerancePanel.add(
       toleranceUnitsLabel,
       new GridBagConstraints(
           3,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel1.add(
       jPanel5,
       new GridBagConstraints(
           0,
           1,
           1,
           1,
           1.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.HORIZONTAL,
           new Insets(0, 10, 10, 10),
           0,
           0));
   jPanel5.add(
       jPanel7,
       new GridBagConstraints(
           0,
           1,
           1,
           1,
           1.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel7.add(
       gridSizeTextField,
       new GridBagConstraints(
           1,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 5),
           0,
           0));
   jPanel7.add(
       showGridCheckBox,
       new GridBagConstraints(
           0,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel5.add(
       showGridDotsRadioButton,
       new GridBagConstraints(
           0,
           2,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel5.add(
       showGridLinesRadioButton,
       new GridBagConstraints(
           0,
           3,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.WEST,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel1.add(
       jPanel6,
       new GridBagConstraints(
           0,
           2,
           1,
           1,
           0.0,
           1.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.VERTICAL,
           new Insets(0, 0, 0, 0),
           0,
           0));
   jPanel7.add(
       showGridUnitsLabel,
       new GridBagConstraints(
           2,
           0,
           1,
           1,
           0.0,
           0.0,
           GridBagConstraints.CENTER,
           GridBagConstraints.NONE,
           new Insets(0, 0, 0, 0),
           0,
           0));
 }
  private void btnEliminar_actionPerformed(ActionEvent e) {

    GeopistaMap selectMap = (GeopistaMap) lstListaMapas.getSelectedValue();

    if (selectMap != null) {

      int deleteMapConfirm =
          JOptionPane.showConfirmDialog(
              aplicacion.getMainFrame(),
              aplicacion.getI18nString("GeopistaListaMapasPanel.ConfimarBorradoMapa")
                  + " "
                  + selectMap.getName()
                  + "?",
              aplicacion.getI18nString("GeopistaListaMapasPanel.BorrarMapa"),
              JOptionPane.YES_NO_OPTION);
      if (deleteMapConfirm != 0) return;

      String mapDeleteSelected = selectMap.getBasePath();

      if (!selectMap.isSystemMap()) {
        File dirBaseMake = new File(mapDeleteSelected);

        File[] deleteFiles = dirBaseMake.listFiles();
        if (deleteFiles != null) {
          for (int n = 0; n < deleteFiles.length; n++) {
            try {
              File actualDeleteFile = deleteFiles[n];
              boolean borrado = actualDeleteFile.delete();
              if (!borrado)
                throw new IOException(
                    aplicacion.getI18nString("GeopistaListaMapasPanel.ElMapaInicioErrorBorrado")
                        + " "
                        + selectMap.getName()
                        + " "
                        + aplicacion.getI18nString("GeopistaListaMapasPanel.NoBorrado"));

              if (dirBaseMake != null) {
                borrado = dirBaseMake.delete();
              }

            } catch (Exception e1) {
              JOptionPane.showMessageDialog(aplicacion.getMainFrame(), e1.getMessage());
            }
          }
        }

      } else {
        if (selectMap.getIdEntidad() == 0) {
          deleteMapConfirm =
              JOptionPane.showConfirmDialog(
                  aplicacion.getMainFrame(),
                  aplicacion.getI18nString("GeopistaListaMapasPanel.ConfimarBorradoMapaEntidad0")
                      + " "
                      + selectMap.getName()
                      + "?",
                  aplicacion.getI18nString("GeopistaListaMapasPanel.BorrarMapa"),
                  JOptionPane.YES_NO_OPTION);
          if (deleteMapConfirm != 0) return;
        }

        String sUrlPrefix;
        // ------NUEVO------>
        if (SSOAuthManager.isSSOActive())
          sUrlPrefix = aplicacion.getString(SSOConstants.SSO_SERVER_URL);
        else sUrlPrefix = aplicacion.getString("geopista.conexion.servidor");
        // ----FIN NUEVO---->
        AdministradorCartografiaClient administradorCartografiaClient =
            new AdministradorCartografiaClient(sUrlPrefix + "/AdministradorCartografiaServlet");
        try {
          if (!aplicacion.isLogged()) {
            aplicacion.setProfile("Geopista");
            aplicacion.login();
          }

          if (aplicacion.isLogged()) {
            administradorCartografiaClient.deleteMap(selectMap, Locale.getDefault().toString());

          } else {
            return;
          }
        } catch (Exception e1) {

          Throwable deleteError = e1.getCause();
          if (deleteError instanceof PermissionException) {
            JOptionPane.showMessageDialog(
                aplicacion.getMainFrame(),
                aplicacion.getI18nString("GeopistaListaMapasPanel.NoPermisosBorrarMapa"));
          }
          if (deleteError instanceof SystemMapException) {
            JOptionPane.showMessageDialog(
                aplicacion.getMainFrame(),
                aplicacion.getI18nString("GeopistaListaMapasPanel.MapaDeSistemaNoBorrar"));
          }
          if (deleteError instanceof SQLException) {
            JOptionPane.showMessageDialog(
                aplicacion.getMainFrame(),
                aplicacion.getI18nString("GeopistaListaMapasPanel.MapaNoSePuedeBorrarPublicado"));
          }
          if (deleteError instanceof PublishedMapException) {
            JOptionPane.showMessageDialog(
                aplicacion.getMainFrame(),
                aplicacion.getI18nString("GeopistaListaMapasPanel.MapaNoSePuedeBorrarPublicado"));
          }
          return;
        }
      }
      listModel.removeElement(selectMap);
    }
  }
 public String getTitle() {
   if (importar.equals("true"))
     return aplicacion.getI18nString("SLDStyle.ImportacionEstiloFichero");
   else return aplicacion.getI18nString("SLDStyle.ExportacionEstiloFichero");
 }
 private void renombrarComponentes() {
   try {
     adquisicionJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag3"));
   } catch (Exception e) {
   }
   try {
     destinoJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag1"));
   } catch (Exception e) {
   }
   try {
     matriculaViejaJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag4"));
   } catch (Exception e) {
   }
   try {
     patrimonioJCBox.setText(aplicacion.getI18nString("inventario.vehiculo.tag19"));
   } catch (Exception e) {
   }
   try {
     fAdquisicionJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag2"));
   } catch (Exception e) {
   }
   try {
     matriculaNuevaJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag5"));
   } catch (Exception e) {
   }
   try {
     numBastidorJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag6"));
   } catch (Exception e) {
   }
   try {
     marcaJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag7"));
   } catch (Exception e) {
   }
   try {
     motorJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag8"));
   } catch (Exception e) {
   }
   try {
     costeAdquisicionJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag15"));
   } catch (Exception e) {
   }
   try {
     valorActualJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag16"));
   } catch (Exception e) {
   }
   try {
     descFrutosJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag17"));
   } catch (Exception e) {
   }
   try {
     valorFrutosJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag18"));
   } catch (Exception e) {
   }
   try {
     fuerzaJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag9"));
   } catch (Exception e) {
   }
   try {
     servicioJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag10"));
   } catch (Exception e) {
   }
   try {
     tipoVehiculoJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag11"));
   } catch (Exception e) {
   }
   try {
     conservacionJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag12"));
   } catch (Exception e) {
   }
   try {
     traccionJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag13"));
   } catch (Exception e) {
   }
   try {
     propiedadJLabel.setText(aplicacion.getI18nString("inventario.vehiculo.tag14"));
   } catch (Exception e) {
   }
 }
  private void jbInit() throws Exception {
    // Leemos la conexion

    //
    //    con = getDBConnection();
    GeopistaGeneradorListadosConexionBD geopistaListados =
        new GeopistaGeneradorListadosConexionBD();

    this.setLayout(null);
    this.setSize(new Dimension(854, 500));
    jPanel1.setLayout(null);
    jPanel1.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
    lblDatosGenerales.setText(aplicacion.getI18nString("generador.app.reports.datos.generales"));
    lblModulo.setText(aplicacion.getI18nString("generador.app.reports.modulo"));
    lblCapa.setText(aplicacion.getI18nString("generador.app.reports.capa"));

    // Cargamos la lista de capas
    ArrayList capas = geopistaListados.capasGeopista();

    Iterator i = capas.iterator();
    lblDatosGenerales.setBounds(new Rectangle(135, 5, 185, 20));
    lblModulo.setBounds(new Rectangle(135, 23, 60, 25));
    lblCapa.setBounds(new Rectangle(135, 50, 45, 30));
    jPanel1.setBounds(new Rectangle(10, 15, 750, 500));
    jSeparator1.setBounds(new Rectangle(0, 135, 735, 5));
    while (i.hasNext()) {
      modeloList.addElement(i.next());
    }

    // Creamos la lista con el modelo anteriormente definido

    // --    jPanel1.setSize(new Dimension(750, 600));
    cmbModulos.setBackground(new Color(254, 255, 255));
    cmbModulos.setBounds(new Rectangle(215, 25, 520, 20));

    lstCapas.setSelectionModel(listSelectionModel1);

    lblTitulo.setText(aplicacion.getI18nString("informe.datos.seleccion.titulo.fichero"));
    lblTitulo.setBounds(new Rectangle(140, 215, 95, 15));
    txtTituloInforme.setBounds(new Rectangle(140, 230, 595, 20));

    lstCapas.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyReleased(java.awt.event.KeyEvent e) {
            String cadena = (String) lstCapas.getSelectedValue();
            lstCapas.ensureIndexIsVisible(lstCapas.getSelectedIndex());
            lstCapas.setSelectedValue((String) cadena, true);
          }
        });
    lstCapas.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent e) {
            wizardContext.inputChanged();
          }

          public void mousePressed(MouseEvent e) {}

          public void mouseReleased(MouseEvent e) {}

          public void mouseEntered(MouseEvent e) {}

          {
          }

          public void mouseExited(MouseEvent e) {}
        });

    lblDescripcion.setText(aplicacion.getI18nString("generador.app.reports.descripcion.informe"));
    lblDescripcion.setBounds(new Rectangle(140, 255, 95, 20));
    txtDescripcion.setBounds(new Rectangle(140, 280, 595, 95));
    lblOrientacion.setText(aplicacion.getI18nString("generador.app.reports.orientacion.informe"));
    lblOrientacion.setBounds(new Rectangle(135, 178, 85, 25));
    lblNombreFichero.setText(aplicacion.getI18nString("generador.app.reports.nombre.fichero"));
    lblNombreFichero.setBounds(new Rectangle(135, 145, 120, 30));
    txtNombreFichero.setBounds(new Rectangle(215, 150, 520, 20));

    //    hb.enableHelpKey(this,"encabezado",hs);
    // Ponemos a mano los Módulos , prueba
    cmbModulos.addItem(
        (String) aplicacion.getI18nString("generador.app.reports.modulo.planeamiento"));
    cmbModulos.addItem(aplicacion.getI18nString("generador.app.reports.modulo.catastro"));
    cmbModulos.addItem(aplicacion.getI18nString("generador.app.reports.modulo.informacion"));
    cmbModulos.addItem(aplicacion.getI18nString("generador.app.reports.modulo.patrimonio"));
    cmbModulos.addItem(aplicacion.getI18nString("generador.app.reports.modulo.infraestructuras"));
    // Ponemos las explicaciones de las secciones
    /*  lblExplicacionDatosInformes.setText(aplicacion.getI18nString("informe.datos.generales.explicacion.comentarios"));
    txtTituloInforme.setToolTipText(aplicacion.getI18nString("informe.datos.generales.explicacion.titulo.fichero"));
    txtDescripcion.setToolTipText(aplicacion.getI18nString("informe.datos.generales.explicacion.detalle"));
    txtNombreFichero.setToolTipText(aplicacion.getI18nString("informe.datos.generales.explicacion.nombre.fichero"));
    lblUbicacion.setText(aplicacion.getI18nString("informe.datos.generales.explicacion.ubicacion"));*/

    // Ponemos a mano la horientacion
    optVertical.setText(aplicacion.getI18nString("generador.app.reports.orientacion.vertical"));
    optHorizontal.setText(aplicacion.getI18nString("generador.app.reports.orientacion.horizontal"));

    // Nuevo Listener para ver cuando cambia la caja de texto
    txtTituloInforme.addKeyListener(
        new KeyListener() {
          public void keyTyped(KeyEvent e) {}

          public void keyPressed(KeyEvent e) {
            wizardContext.inputChanged();
          }

          public void keyReleased(KeyEvent e) {}
        });
    optVertical.setText(aplicacion.getI18nString("generador.app.reports.orientacion.vertical"));
    optVertical.setSelected(true);
    optVertical.setBounds(new Rectangle(215, 180, 125, 20));
    optVertical.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            optVertical_actionPerformed(e);
          }
        });
    optHorizontal.setText(aplicacion.getI18nString("generador.app.reports.orientacion.horizontal"));
    optHorizontal.setBounds(new Rectangle(360, 180, 135, 20));
    optHorizontal.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            optHorizontal_actionPerformed(e);
          }
        });
    jScrollPane1.setBounds(new Rectangle(215, 60, 520, 70));
    jSeparator2.setBounds(new Rectangle(5, 205, 730, 5));
    lblImagen.setBounds(new Rectangle(15, 20, 110, 490));
    lblImagen.setIcon(IconLoader.icon((String) blackboardInformes.get("tipoBanner")));
    lblImagen.setBounds(new Rectangle(15, 20, 110, 490));
    lblImagen.setBorder(BorderFactory.createLineBorder(Color.black, 1));
    lblImagen.setBorder(BorderFactory.createLineBorder(Color.black, 1));

    txtNombreFichero.addKeyListener(
        new KeyListener() {
          public void keyTyped(KeyEvent e) {}

          public void keyPressed(KeyEvent e) {
            wizardContext.inputChanged();
          }

          public void keyReleased(KeyEvent e) {}
        });

    jScrollPane1.getViewport().add(lstCapas, null);
    jPanel1.add(jSeparator2, null);
    jPanel1.add(jScrollPane1, null);
    jPanel1.add(optHorizontal, null);
    jPanel1.add(optVertical, null);
    jPanel1.add(txtTituloInforme, null);
    jPanel1.add(lblTitulo, null);
    jPanel1.add(txtDescripcion, null);
    jPanel1.add(lblDescripcion, null);
    jPanel1.add(lblOrientacion, null);
    jPanel1.add(txtNombreFichero, null);
    jPanel1.add(lblNombreFichero, null);
    jPanel1.add(jSeparator1, null);
    jPanel1.add(lblCapa, null);
    jPanel1.add(cmbModulos, null);
    jPanel1.add(lblModulo, null);
    jPanel1.add(lblDatosGenerales, null);
    this.add(lblImagen, null);
    this.add(jPanel1, null);

    // Cargamos las capas en la lista

  }
  public boolean execute(PlugInContext context) throws Exception {
    LineString a = null;
    List capasVisibles =
        context.getWorkbenchContext().getLayerNamePanel().getLayerManager().getVisibleLayers(true);

    context.getLayerViewPanel().getLayerManager().getVisibleLayers(true);
    context.getLayerNamePanel().getLayerManager().getVisibleLayers(false);

    Iterator capasVisiblesIter = capasVisibles.iterator();
    boolean cancelWhile = false;

    final LockManager lockManager =
        (LockManager)
            context
                .getActiveTaskComponent()
                .getLayerViewPanel()
                .getBlackboard()
                .get(LockManager.LOCK_MANAGER_KEY);

    while (capasVisiblesIter.hasNext()) {
      Layer capaActual = (Layer) capasVisiblesIter.next();
      Collection featuresSeleccionadas =
          context
              .getWorkbenchContext()
              .getLayerViewPanel()
              .getSelectionManager()
              .getFeaturesWithSelectedItems(capaActual);

      // Almacenamos en este ArrayList el resultado de la operacion de
      // bloqueo

      Iterator featuresSeleccionadasIter = featuresSeleccionadas.iterator();
      while (featuresSeleccionadasIter.hasNext()) {
        if (cancelWhile == true) {
          if (JOptionPane.showConfirmDialog(
                  (Component) context.getWorkbenchGuiComponent(),
                  aplicacion.getI18nString("GeopistaFeatureSchemaPlugIn.RestoFeatures"),
                  aplicacion.getI18nString("GeopistaFeatureSchemaPlugIn.EditarMultiplesEntidades"),
                  JOptionPane.YES_NO_OPTION)
              == JOptionPane.NO_OPTION) return false;
          else cancelWhile = false;
        }

        localFeature = (Feature) featuresSeleccionadasIter.next();
        String systemId = ((GeopistaFeature) localFeature).getSystemId();
        final ArrayList lockResultaArrayList = new ArrayList();
        // capa de sistema. La feature debe bloquearse
        if (capaActual instanceof GeopistaLayer
            && !((GeopistaLayer) capaActual).isLocal()
            && !((GeopistaLayer) capaActual).isExtracted()
            && capaActual.isEditable()
            && systemId != null
            && !((GeopistaFeature) localFeature).isTempID()
            && !systemId.equals("")) {

          final TaskMonitorDialog progressDialog =
              new TaskMonitorDialog(aplicacion.getMainFrame(), context.getErrorHandler());

          progressDialog.setTitle(aplicacion.getI18nString("LockFeatures"));
          progressDialog.addComponentListener(
              new ComponentAdapter() {
                public void componentShown(ComponentEvent e) {

                  // Wait for the dialog to appear before starting the
                  // task. Otherwise
                  // the task might possibly finish before the dialog
                  // appeared and the
                  // dialog would never close. [Jon Aquino]
                  new Thread(
                          new Runnable() {
                            public void run() {

                              try {

                                Integer lockID =
                                    lockManager.lockFeature(localFeature, progressDialog);
                                lockResultaArrayList.add(lockID);
                              } catch (Exception e) {

                              } finally {
                                progressDialog.setVisible(false);
                              }
                            }
                          })
                      .start();
                }
              });
          GUIUtil.centreOnWindow(progressDialog);
          progressDialog.setVisible(true);
        }

        FeatureDialog featureDialog =
            new FeatureDialog(
                GeopistaFunctionUtils.getFrame(context.getWorkbenchGuiComponent()),
                "Atributos",
                true,
                localFeature,
                context.getWorkbenchContext().getLayerViewPanel(),
                capaActual);

        Integer tempLockID = null;
        Iterator lockResultaArrayListIter = lockResultaArrayList.iterator();
        if (lockResultaArrayListIter.hasNext()) {
          tempLockID = (Integer) lockResultaArrayListIter.next();
        }
        final Integer lockID = tempLockID;

        try {

          ImageIcon icon = IconLoader.icon("logo_geopista.png");

          featureDialog.setSideBarImage(null);
        } catch (NullPointerException e) {
          e.printStackTrace();
        }

        if (capaActual instanceof GeopistaLayer) {
          String extendedForm = ((GeopistaLayer) capaActual).getFieldExtendedForm();
          if (extendedForm == null) extendedForm = "";
          if (!extendedForm.equals("")) {

            featureDialog.setExtendedForm(extendedForm);
          }
        }

        featureDialog.buildDialog();
        if ((capaActual instanceof GeopistaLayer
                && (((GeopistaLayer) capaActual).isLocal()
                    || ((GeopistaLayer) capaActual).isExtracted())
                && !capaActual.isEditable())
            || (lockID == null
                && capaActual instanceof GeopistaLayer
                && !((GeopistaLayer) capaActual).isLocal()
                && !((GeopistaLayer) capaActual).isExtracted()
                && !capaActual.isEditable()
                && systemId != null
                && !((GeopistaFeature) localFeature).isTempID()
                && !systemId.equals(""))) {
          featureDialog.setLock();
        }
        featureDialog.setVisible(true);

        // solo para GeopistaLayer

        if (featureDialog.wasOKPressed()) {
          if (capaActual.isEditable()) {

            if (capaActual instanceof GeopistaLayer
                && !((GeopistaLayer) capaActual).isLocal()
                && lockID == null) continue;
            // obtenemos la feature con los cambios introducidos por
            // el usuario
            clonefeature = featureDialog.getModifiedFeature();
            // Actualiza los parámetros
            execute(
                new UndoableCommand(getName()) {

                  public void execute() {

                    localFeature.setAttributes(clonefeature.getAttributes());
                  }

                  public void unexecute() {
                    ((GeopistaFeature) clonefeature).setFireDirtyEvents(false);
                    clonefeature.setAttributes(localFeature.getAttributes());
                    ((GeopistaFeature) clonefeature).setFireDirtyEvents(true);
                  }
                },
                context);
          }

        } else {
          // el usuario ha pedido cancelar la edición
          cancelWhile = true;
        }

        if (lockID != null) {
          final TaskMonitorDialog progressDialogFinal =
              new TaskMonitorDialog(aplicacion.getMainFrame(), context.getErrorHandler());

          progressDialogFinal.setTitle(aplicacion.getI18nString("UnlockFeatures"));
          progressDialogFinal.addComponentListener(
              new ComponentAdapter() {
                public void componentShown(ComponentEvent e) {

                  // Wait for the dialog to appear before starting
                  // the
                  // task. Otherwise
                  // the task might possibly finish before the
                  // dialog
                  // appeared and the
                  // dialog would never close. [Jon Aquino]
                  new Thread(
                          new Runnable() {
                            public void run() {

                              try {

                                lockManager.unlockFeaturesByLockId(lockID, progressDialogFinal);
                              } catch (Exception e) {

                              } finally {
                                progressDialogFinal.setVisible(false);
                              }
                            }
                          })
                      .start();
                }
              });
          GUIUtil.centreOnWindow(progressDialogFinal);
          progressDialogFinal.setVisible(true);
        }
      }
    }

    return false;
  }
  public void getMapFiles(PlugInContext pluginContext, boolean searchlocal, boolean searchremote) {
    final ArrayList localMapIds = new ArrayList();

    if (searchlocal) {
      final String rutaBase =
          aplicacion.getUserPreference(
              AppContext.PREFERENCES_DATA_PATH_KEY, AppContext.DEFAULT_DATA_PATH, true);
      ;

      // Comprobamos si existe la ruta base y en caso de que no exista la
      // creamos
      File rutaBaseFile = new File(rutaBase);
      if (!rutaBaseFile.exists()) {
        rutaBaseFile.mkdirs();
      }

      final TaskMonitorDialog progressDialog =
          new TaskMonitorDialog(aplicacion.getMainFrame(), pluginContext.getErrorHandler());
      progressDialog.allowCancellationRequests();
      progressDialog.setTitle(aplicacion.getI18nString("BuscandoMapas"));
      progressDialog.report(aplicacion.getI18nString("BuscandoMapasLocales"));
      progressDialog.addComponentListener(
          new ComponentAdapter() {
            public void componentShown(ComponentEvent e) {
              // Wait for the dialog to appear before starting the
              // task. Otherwise
              // the task might possibly finish before the dialog
              // appeared and the
              // dialog would never close. [Jon Aquino]
              new Thread(
                      new Runnable() {
                        public void run() {
                          try {

                            ArrayList listaMap =
                                GeopistaFunctionUtils.searchDirectory(rutaBase, progressDialog);

                            Iterator Iter = listaMap.iterator();

                            while (Iter.hasNext()) {
                              GeopistaMap currentMap = (GeopistaMap) Iter.next();

                              if (!(currentMap.isExtracted()
                                  && currentMap.getIdEntidad() != AppContext.getIdEntidad())) {
                                listModel.addElement(currentMap);
                                String systemId = currentMap.getSystemId();
                                if (systemId.startsWith("e")) systemId = systemId.substring(1);
                                localMapIds.add(systemId);
                              }
                            }
                          } catch (Exception e) {

                          } finally {
                            progressDialog.setVisible(false);
                          }
                        }
                      })
                  .start();
            }
          });
      if (aplicacion.getMainFrame() == null) // sin ventana de referencia
      GUIUtil.centreOnScreen(progressDialog);
      else GUIUtil.centreOnWindow(progressDialog);
      progressDialog.setVisible(true);
    }
    if (searchremote) {
      // final String sUrlPrefix = aplicacion.getString("geopista.conexion.servidor");
      final String sUrlPrefix;
      // ------NUEVO------>
      //            if(SSOAuthManager.isSSOActive())
      //            	sUrlPrefix = aplicacion.getString(SSOConstants.SSO_SERVER_URL);
      //            else
      sUrlPrefix = aplicacion.getString("geopista.conexion.servidor");
      // ----FIN NUEVO---->
      if (aplicacion.isOnline()) {
        try {

          if (!aplicacion.isLogged()) {
            aplicacion.setProfile("Geopista");
            aplicacion.login();
          }

          if (aplicacion.isLogged()) {
            final TaskMonitorDialog progressDialog2 =
                new TaskMonitorDialog(aplicacion.getMainFrame(), pluginContext.getErrorHandler());
            progressDialog2.setTitle(aplicacion.getI18nString("BuscandoMapas"));
            progressDialog2.report(aplicacion.getI18nString("BuscandoMapasBaseDatos"));
            progressDialog2.addComponentListener(
                new ComponentAdapter() {
                  public void componentShown(ComponentEvent e) {
                    // Wait for the dialog to appear before
                    // starting the task. Otherwise
                    // the task might possibly finish before the
                    // dialog appeared and the
                    // dialog would never close. [Jon Aquino]
                    new Thread(
                            new Runnable() {
                              public void run() {
                                try {
                                  Object[] mapSystemIds = localMapIds.toArray();
                                  Arrays.sort(mapSystemIds);
                                  AdministradorCartografiaClient administradorCartografiaClient =
                                      new AdministradorCartografiaClient(
                                          sUrlPrefix + "/AdministradorCartografiaServlet");
                                  Collection lMaps =
                                      administradorCartografiaClient.getMaps(
                                          Locale.getDefault().toString());
                                  Iterator lMapsIter = lMaps.iterator();
                                  while (lMapsIter.hasNext()) {
                                    try {

                                      GeopistaMap currentMap = (GeopistaMap) lMapsIter.next();
                                      int codeIndex =
                                          Arrays.binarySearch(
                                              mapSystemIds, currentMap.getSystemId());
                                      if (codeIndex >= 0) continue;
                                      listModel.addElement(currentMap);
                                    } catch (Exception e) {
                                      e.printStackTrace();
                                    }
                                  }
                                } catch (Exception e) {

                                } finally {
                                  progressDialog2.setVisible(false);
                                }
                              }
                            })
                        .start();
                  }
                });
            if (aplicacion.getMainFrame() == null) GUIUtil.centreOnScreen(progressDialog2);
            else GUIUtil.centreOnWindow(progressDialog2);
            progressDialog2.setVisible(true);
          }
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
  /*  public static void main(String[] args)
    {
      JFrame frame1 = new JFrame("Edición Datos");

      RegistroPatrimonioPanel RegistroPatrimonio = new RegistroPatrimonioPanel();

      frame1.getContentPane().add(RegistroPatrimonio);
      frame1.setSize(675, 725);
      frame1.setVisible(true);
      frame1.setLocation(150, 90);

    }
  */
  private void jbInit() throws Exception {
    this.setLayout(null);
    this.setName(app.getI18nString("patrimonio.registro.titulo"));
    this.setSize(new Dimension(710, 477));
    this.setBounds(new Rectangle(5, 10, 630, 400));
    this.setBorder(BorderFactory.createLineBorder(Color.black, 1));
    this.setLayout(null);
    Registro.add(txtTomo);
    Registro.add(txtFolio);
    Registro.add(txtLibro);
    Registro.add(txtFinca);
    Registro.add(txtNumero);
    Registro.add(txtProtocolo);
    Registro.add(txtNotario);
    Registro.add(txtRegistro);

    lblInscripcion.setText(app.getI18nString("patrimonio.registro.inscripcion"));
    lblFinca.setText(app.getI18nString("patrimonio.registro.finca"));
    lblFolio.setText(app.getI18nString("patrimonio.registro.folio"));
    lblLibro.setText(app.getI18nString("patrimonio.registro.libro"));
    lblTomo.setText(app.getI18nString("patrimonio.registro.tomo"));
    lblRegistro.setText(app.getI18nString("patrimonio.registro.registro"));
    lblProtocolo.setText(app.getI18nString("patrimonio.registro.protocolo"));
    lblNotario.setText(app.getI18nString("patrimonio.registro.notario"));
    btnAplicar.setText(app.getI18nString("patrimonio.aplicar"));
    btnAplicar.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            btnAplicar_actionPerformed(e);
          }
        });
    jPanel1.add(btnAplicar, null);

    jPanel1.setBounds(350, 335, 140, 40);
    txtNumero.setBounds(110, 290, 110, 20);
    lblInscripcion.setBounds(5, 295, 130, 15);
    txtFinca.setBounds(110, 249, 110, 20);
    lblFinca.setBounds(5, 254, 50, 15);
    txtFolio.setBounds(110, 209, 110, 20);
    lblFolio.setBounds(5, 214, 50, 15);
    txtLibro.setBounds(110, 168, 110, 20);
    lblLibro.setBounds(5, 173, 50, 15);
    txtTomo.setBounds(110, 127, 110, 20);
    lblTomo.setBounds(5, 132, 50, 15);
    lblRegistro.setBounds(5, 91, 90, 15);
    txtNotario.setBounds(110, 5, 400, 20);
    txtProtocolo.setBounds(110, 46, 400, 20);
    lblProtocolo.setBounds(5, 51, 90, 15);
    txtRegistro.setBounds(110, 86, 400, 20);
    lblNotario.setBounds(5, 10, 70, 15);

    this.add(jPanel1, null);
    this.add(txtNumero, null);
    this.add(lblInscripcion, null);
    this.add(txtFinca, null);
    this.add(lblFinca, null);
    this.add(txtFolio, null);
    this.add(lblFolio, null);
    this.add(txtLibro, null);
    this.add(lblLibro, null);
    this.add(txtTomo, null);
    this.add(lblTomo, null);
    this.add(lblRegistro, null);
    this.add(txtNotario, null);
    this.add(txtProtocolo, null);
    this.add(lblProtocolo, null);
    this.add(txtRegistro, null);
    this.add(lblNotario, null);
  }
  private void jbInit() throws Exception {
    lstListaMapas.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lstListaMapas.setCellRenderer(new LoadGeopistaMapRenderer());

    java.awt.GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
    java.awt.GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
    java.awt.GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
    java.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
    java.awt.GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
    java.awt.GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
    java.awt.GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
    this.setLayout(new GridBagLayout());

    lstListaMapas.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent e) {
            if (e.getClickCount() == 2) btnAbrir_actionPerformed(null);
          }
        });
    lstListaMapas.addListSelectionListener(
        new javax.swing.event.ListSelectionListener() {
          public void valueChanged(javax.swing.event.ListSelectionEvent e) {
            btnAbrir.setEnabled(true);
            btnEliminar.setEnabled(true);
          }
        });
    btnAbrir.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            btnAbrir_actionPerformed(e);
          }
        });

    btnCancelar.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            btnCancelar_actionPerformed(e);
          }
        });

    btnEliminar.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            btnEliminar_actionPerformed(e);
          }
        });
    btnOrdenar.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            btnOrdenar_actionPerformed(e);
          }
        });
    chCalendario.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent evt) {
            mostrarCalendario();
          }
        });
    lblListaMapas.setText(aplicacion.getI18nString("GeopistaListaMapasPanel.ListaMapas"));
    btnAbrir.setText(aplicacion.getI18nString("GeopistaListaMapasPanel.Abrir"));
    btnAbrir.setEnabled(false);
    btnEliminar.setText(aplicacion.getI18nString("GeopistaListaMapasPanel.Eliminar"));
    btnEliminar.setEnabled(false);
    btnOrdenar.setText("Ordenar");
    btnOrdenar.setEnabled(true);
    btnCancelar.setText(aplicacion.getI18nString("GeopistaListaMapasPanel.Cancelar"));
    chCalendario.setText(I18N.get("Version", "SeleccionVersion"));
    gridBagConstraints1.gridx = 1;
    gridBagConstraints1.gridy = 4;
    gridBagConstraints1.ipadx = 13;
    gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5);

    gridBagConstraints6.gridx = 1;
    gridBagConstraints6.gridy = 5;
    gridBagConstraints6.ipadx = 13;
    gridBagConstraints6.insets = new java.awt.Insets(5, 5, 5, 5);

    gridBagConstraints2.gridx = 1;
    gridBagConstraints2.gridy = 2;
    gridBagConstraints2.ipadx = 19;
    gridBagConstraints2.insets = new java.awt.Insets(5, 5, 5, 5);

    // Ordenar
    gridBagConstraints21.gridx = 1;
    gridBagConstraints21.gridy = 3;
    gridBagConstraints21.ipadx = 19;
    gridBagConstraints21.insets = new java.awt.Insets(5, 5, 5, 5);

    gridBagConstraints3.gridx = 1;
    gridBagConstraints3.gridy = 1;
    gridBagConstraints3.ipadx = 31;
    gridBagConstraints3.insets = new java.awt.Insets(5, 5, 5, 5);

    gridBagConstraints4.gridx = 0;
    gridBagConstraints4.gridy = 1;
    gridBagConstraints4.gridheight = 4;
    gridBagConstraints4.weightx = 1.0;
    gridBagConstraints4.weighty = 1.0;
    gridBagConstraints4.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints4.ipadx = 461;
    gridBagConstraints4.ipady = 511;
    gridBagConstraints4.insets = new java.awt.Insets(5, 5, 5, 5);
    gridBagConstraints5.gridx = 0;
    gridBagConstraints5.gridy = 0;
    gridBagConstraints5.ipadx = 159;
    gridBagConstraints5.ipady = 5;
    gridBagConstraints5.insets = new java.awt.Insets(10, 15, 2, 235);
    scpListaMapas.setViewportView(lstListaMapas);
    this.add(btnCancelar, gridBagConstraints1);
    this.add(chCalendario, gridBagConstraints6);
    this.add(btnEliminar, gridBagConstraints2);
    this.add(btnAbrir, gridBagConstraints3);
    this.add(btnOrdenar, gridBagConstraints21);

    this.add(scpListaMapas, gridBagConstraints4);
    this.add(lblListaMapas, gridBagConstraints5);

    scpListaMapas.getViewport().add(lstListaMapas, null);
  }
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  private void initComponents() { // GEN-BEGIN:initComponents
    java.awt.GridBagConstraints gridBagConstraints;

    filePanel = new javax.swing.JPanel();
    fileLbl = new javax.swing.JLabel();
    fileTxt = new javax.swing.JTextField();
    fileBtn = new javax.swing.JButton();
    buttonPanel = new javax.swing.JPanel();
    okBtn = new javax.swing.JButton();
    cancelBtn = new javax.swing.JButton();

    setLayout(new java.awt.BorderLayout());

    setPreferredSize(new java.awt.Dimension(400, 125));
    filePanel.setLayout(new java.awt.GridBagLayout());

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
    filePanel.add(fileLbl, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    filePanel.add(fileTxt, gridBagConstraints);

    fileBtn.setText(aplicacion.getI18nString("SLDStyle.Examinar") + "...");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
    fileBtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            fileBtnActionPerformed(evt);
          }
        });
    filePanel.add(fileBtn, gridBagConstraints);

    add(filePanel, java.awt.BorderLayout.CENTER);

    okBtn.setText(aplicacion.getI18nString("SLDStyle.Aceptar"));
    okBtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            okBtnActionPerformed(evt);
          }
        });

    buttonPanel.add(okBtn);

    cancelBtn.setText(aplicacion.getI18nString("SLDStyle.Cancelar"));
    cancelBtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelBtnActionPerformed(evt);
          }
        });

    buttonPanel.add(cancelBtn);

    add(buttonPanel, java.awt.BorderLayout.SOUTH);
  } // GEN-END:initComponents
  protected void initForm() throws Exception {
    BorderLayout borderLayout = new BorderLayout();
    pnlGeneral.setLayout(borderLayout);

    JPanel panelTitle = new JPanel();
    FlowLayout flowLayoutTitle = new FlowLayout();
    flowLayoutTitle.setAlignment(FlowLayout.LEFT);
    panelTitle.setLayout(flowLayoutTitle);
    pnlGeneral.add(panelTitle, BorderLayout.NORTH);

    lblSeleccioneParcela = new JLabel();
    Font fontSeleccioneParcela = lblSeleccioneParcela.getFont();
    fontSeleccioneParcela =
        fontSeleccioneParcela.deriveFont(fontSeleccioneParcela.getStyle() ^ Font.BOLD);
    lblSeleccioneParcela.setFont(fontSeleccioneParcela);
    panelTitle.add(lblSeleccioneParcela);
    String text = appContext.getI18nString("informes.wizard.seleccionparcela.seleccioneparcela");
    if (mapParameterEditor.getParameter().getDescription() != null
        && mapParameterEditor.getParameter().getDescription().length() > 0) {
      text += " " + mapParameterEditor.getParameter().getDescription();
    } else {
      text += " " + mapParameterEditor.getParameter().getName();
    }
    lblSeleccioneParcela.setText(text);

    geopistaEditor = new GeopistaEditor(appContext.getString("fichero.vacio"));
    geopistaEditor.showLayerName(false);
    geopistaEditor.addCursorTool(
        "Zoom In/Out", "com.vividsolutions.jump.workbench.ui.zoom.ZoomTool");
    geopistaEditor.addCursorTool("Pan", "com.vividsolutions.jump.workbench.ui.zoom.PanTool");
    geopistaEditor.addCursorTool(
        "Select tool", "com.geopista.ui.cursortool.GeopistaSelectFeaturesTool");
    pnlGeneral.add(geopistaEditor, BorderLayout.CENTER);

    JPanel panelInfoParcela = new JPanel();
    GridLayout gridLayoutInfoParcela = new GridLayout(2, 1);
    panelInfoParcela.setLayout(gridLayoutInfoParcela);
    pnlGeneral.add(panelInfoParcela, BorderLayout.SOUTH);

    GridBagLayout pnlRusticoGridBagLayout = new GridBagLayout();
    pnlRustico.setBorder(
        BorderFactory.createTitledBorder(appContext.getI18nString("parcelas.rustica")));
    pnlRustico.setLayout(pnlRusticoGridBagLayout);
    panelInfoParcela.add(pnlRustico);

    Insets insets = new Insets(0, 5, 5, 0);
    GridBagConstraints gridBagConstraints;
    lblParcelaRustico.setText(appContext.getI18nString("informe.patrimonio.inventario.parcela"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.anchor = GridBagConstraints.EAST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = insets;
    pnlRustico.add(lblParcelaRustico, gridBagConstraints);

    txtParcelaRustico.setBounds(new Rectangle(360, 15, 185, 20));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 3.0;
    gridBagConstraints.insets = insets;
    pnlRustico.add(txtParcelaRustico, gridBagConstraints);

    lblPoligonoRustico.setText(appContext.getI18nString("texto.poligono"));
    lblPoligonoRustico.setBounds(new Rectangle(10, 15, 65, 20));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.anchor = GridBagConstraints.EAST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = insets;
    pnlRustico.add(lblPoligonoRustico, gridBagConstraints);

    txtPoligonoRustico.setHorizontalAlignment(JTextField.RIGHT);
    txtPoligonoRustico.setText("");
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 3.0;
    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
    gridBagConstraints.insets = insets;
    pnlRustico.add(txtPoligonoRustico, gridBagConstraints);

    GridBagLayout pnlUrbanoGridBagLayout = new GridBagLayout();
    pnlUrbano.setBorder(
        BorderFactory.createTitledBorder(appContext.getI18nString("parcelas.urabana")));
    pnlUrbano.setLayout(pnlUrbanoGridBagLayout);
    panelInfoParcela.add(pnlUrbano);

    lblParcelaUrbano.setText(appContext.getI18nString("informe.patrimonio.inventario.parcela"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.anchor = GridBagConstraints.EAST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = insets;
    pnlUrbano.add(lblParcelaUrbano, gridBagConstraints);

    txtParcelaUrbano.setHorizontalAlignment(JTextField.RIGHT);
    txtParcelaUrbano.setText("");
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 3.0;
    gridBagConstraints.insets = insets;
    pnlUrbano.add(txtParcelaUrbano, gridBagConstraints);

    lblPoligonoUrbano.setText(appContext.getI18nString("texto.manzana"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.anchor = GridBagConstraints.EAST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = insets;
    pnlUrbano.add(lblPoligonoUrbano, gridBagConstraints);

    txtPoligonoUrbano.setHorizontalAlignment(JTextField.RIGHT);
    txtPoligonoUrbano.setText("");
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 3.0;
    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
    gridBagConstraints.insets = insets;
    pnlUrbano.add(txtPoligonoUrbano, gridBagConstraints);

    geopistaEditor.addGeopistaListener(
        new GeopistaListener() {

          public void selectionChanged(IAbstractSelection abtractSelection) {

            // Capturamos la parcela y la manzana del gml
            try {
              ArrayList featuresCollection =
                  (ArrayList)
                      abtractSelection.getFeaturesWithSelectedItems(
                          geopistaEditor.getLayerManager().getLayer("parcelas"));
              Iterator featuresCollectionIter = featuresCollection.iterator();
              if (!featuresCollectionIter.hasNext()) return;
              Feature actualFeature = (Feature) featuresCollectionIter.next();

              // Tabla ambitos_gestion:
              geopistaEditor.zoomTo(actualFeature);
              getWizardContext().inputChanged();

              // Recuperar el valor del tipo y colocarlo en su parcela corresondiente
              referenciaCatastral = actualFeature.getString(2); // La Referencia Catastral				
              String codigoParcela = actualFeature.getString(5);
              String codigoPoligono = actualFeature.getString(6);
              String idVia = actualFeature.getString(7);

              if (!idVia.equals("") && (!codigoPoligono.equals("") || !codigoParcela.equals(""))) {
                txtPoligonoUrbano.setText(referenciaCatastral.substring(0, 5));
                txtParcelaUrbano.setText(referenciaCatastral.substring(5, 7));
                txtParcelaRustico.setText("");
                txtPoligonoRustico.setText("");
              } else if (!codigoPoligono.equals("") || !codigoParcela.equals("")) {
                txtPoligonoUrbano.setText("");
                txtParcelaUrbano.setText("");
                txtParcelaRustico.setText(codigoParcela);
                txtPoligonoRustico.setText(codigoPoligono);
              } else if (!idVia.equals("")) {
                txtPoligonoUrbano.setText(referenciaCatastral.substring(0, 5));
                txtParcelaUrbano.setText(referenciaCatastral.substring(5, 7));
                txtParcelaRustico.setText("");
                txtPoligonoRustico.setText("");
              }
            } catch (Exception e) {
              e.printStackTrace();
            }
          }

          public void featureAdded(FeatureEvent e) {
            // No hacer nada
          }

          public void featureRemoved(FeatureEvent e) {
            // No hacer nada
          }

          public void featureModified(FeatureEvent e) {
            // No hacer nada
          }

          public void featureActioned(IAbstractSelection abtractSelection) {
            // No hacer nada
          }
        });
  }