public void enter() {
    Blackboard Identificadores = app.getBlackboard();
    ID_Inmueble = Integer.parseInt(Identificadores.get("IdInmueble").toString());

    // Mostramos los datos para el inmueble
    PatrimonioPostgre General = new PatrimonioPostgre();
    ArrayList Datos = General.DatosRegistro(ID_Inmueble);
    if (Datos == null) return;
    Iterator alIt = Datos.iterator();
    Iterator itControles = Registro.iterator();
    while (itControles.hasNext()) {
      try {
        JComponent comp = (JComponent) itControles.next();
        Object obj = alIt.next();
        if (comp instanceof JTextField)
          ((JTextField) comp).setText((obj != null) ? obj.toString() : "");
        if (comp instanceof JCheckBox) {
          String check = (obj != null) ? obj.toString() : "";
          if (check == "TRUE") {
            ((JCheckBox) comp).setSelected(true);
          } else {
            ((JCheckBox) comp).setSelected(false);
          }
        }
        if (comp instanceof JComboBox)
          ((JComboBox) comp).setSelectedItem((obj != null) ? obj.toString() : "");
      } catch (Exception A) {
        A.printStackTrace();
      }
    }
  }
  /**
   * Retorna un árbol con las capas seleccionadas y sus atributos
   *
   * @return javax.swing.JList
   */
  private JTree getWriteableLayerTree() {
    ArrayList<GeopistaLayer> extractLayers =
        (ArrayList<GeopistaLayer>) blackboard.get(MobileExtractPanel01.MOBILE_WRITEABLE_LAYERS);
    writeableRootNodes = getRootLayerNodes(extractLayers);
    Vector rootVector =
        new NamedVector(
            I18N.get(
                MobileExtractPlugin.PluginMobileExtracti18n,
                MobilePluginI18NResource.MobileExtractPanel03_capasEdit),
            writeableRootNodes);
    JTree tree = new JTree(rootVector);
    tree.setFont(new Font(tree.getFont().getName(), Font.BOLD, tree.getFont().getSize()));
    CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer(Color.BLUE);
    tree.setCellRenderer(renderer);
    tree.setCellEditor(new CheckBoxNodeEditor(tree));
    tree.setEditable(true);

    //		DefaultMutableTreeNode root = new DefaultMutableTreeNode("Capas");
    //	    JTree tree = new JTree(root);
    //	    DefaultTreeModel model = (DefaultTreeModel) tree.getModel();
    //	    DefaultMutableTreeNode chosen = null;
    //	    if(extractLayers!=null){
    //			for (int i = 0; i < extractLayers.size(); i++) {
    //				geopistaLayer = extractLayers.get(i);
    //				chosen = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
    //				if (chosen == null){
    //					chosen = root;
    //				}
    //				model.insertNodeInto(getTreeNodeFromLayer(geopistaLayer), chosen, 0);
    //			}
    //	    }

    return tree;
  }
  private static File findArcMap2SLD(WorkbenchFrame wbframe, Blackboard bb)
      throws IOException, InterruptedException {
    String arcmap2sld = (String) bb.get("ArcMapStylePlugin.toollocation");
    if (arcmap2sld == null) {
      File tmp = createTempFile("amtsldreg", null);
      ProcessBuilder pb =
          new ProcessBuilder(
              "regedit",
              "/e",
              tmp.toString(),
              "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion");
      pb.start().waitFor();
      BufferedReader in =
          new BufferedReader(new InputStreamReader(new FileInputStream(tmp), "UTF-16"));
      String s;
      while ((s = in.readLine()) != null) {
        if (s.startsWith("\"ProgramFilesDir\"=\"")) {
          s = s.split("=")[1];
          s = s.substring(1, s.length() - 1);
          arcmap2sld = s + "\\i3mainz\\ArcMap2SLD_Full_Setup\\ArcGIS_SLD_Converter.exe";
          break;
        }
      }
      in.close();
      tmp.delete();
    }

    JFileChooser chooser = new JFileChooser();

    File am2sld = arcmap2sld == null ? null : new File(arcmap2sld);
    if (am2sld == null || !am2sld.exists()) {
      showMessageDialog(
          wbframe,
          get(
              "org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool"),
          get("org.openjump.core.ui.plugin.style.ImportSLDPlugIn.Question"),
          INFORMATION_MESSAGE);
      if (arcmap2sld != null) {
        chooser.setSelectedFile(new File(arcmap2sld));
      }

      int res = chooser.showOpenDialog(wbframe);
      if (res == APPROVE_OPTION) {
        am2sld = chooser.getSelectedFile();
        if (!am2sld.exists()) {
          return null;
        }
        bb.put("ArcMapStylePlugin.toollocation", am2sld.getAbsoluteFile().toString());
      } else {
        return null;
      }
    }

    return am2sld;
  }
  /** Acciones realizas al entrar en la pantalla */
  public void enter() {
    if (((Boolean) Identificadores.get("TablasModificadas")).booleanValue()
        && !((Boolean) Identificadores.get("TablasDominiosActualizada")).booleanValue()) {
      // Cada vez que se entra, se actualiza el arbol de tablas del sistema con
      // los posibles cambios realizados
      Identificadores.put("Tablas", null);
      Identificadores.put("Columnas", null);

      this.remove(jPanelTablas);
      jPanelTablas = new JPanelTables(TreeSelectionModel.SINGLE_TREE_SELECTION);
      jPanelTablas.setBorder(
          BorderFactory.createTitledBorder(I18N.get("GestorCapas", "tablas.arbol.titulo")));
      jPanelTablas.setBounds(new java.awt.Rectangle(5, 5, 250, 481));
      this.add(jPanelTablas);
      treeTablas = jPanelTablas.getTree();
      treeTablas.addTreeSelectionListener(this);

      // Si se modifica algo en la pantalla de tablas de base de datos, habrá
      // que actualizar la información tanto en el panel de tablasdominios como
      // en el de layers.
      Identificadores.put("TablasDominiosActualizada", true);
      if (((Boolean) Identificadores.get("LayersActualizada")).booleanValue()) {
        Identificadores.put("TablasModificadas", false);
        Identificadores.put("TablasDominiosActualizada", false);
        Identificadores.put("LayersActualizada", false);
      }
    }

    try {
      // Iniciamos la ayuda
      String helpHS = "help/catastro/gestordecapas/GestorCapasHelp_es.hs";
      ClassLoader c1 = this.getClass().getClassLoader();
      URL hsURL = HelpSet.findHelpSet(c1, helpHS);
      HelpSet hs = new HelpSet(null, hsURL);
      HelpBroker hb = hs.createHelpBroker();
      // fin de la ayuda
      hb.enableHelpKey(this, "Pestania2Dominios", hs);
    } catch (Exception excp) {
      excp.printStackTrace();
    }
  }
  /*
   * Se ejecuta una vez finalizado el interfaz despues de pasar por todas las pantallas.
   * (non-Javadoc)
   * @see com.vividsolutions.jump.workbench.plugin.ThreadedPlugIn#run(com.vividsolutions.jump.task.TaskMonitor, com.vividsolutions.jump.workbench.plugin.PlugInContext)
   */
  public void run(TaskMonitor monitor, PlugInContext context) throws Exception {
    try {
      monitor.report(
          I18N.get(
              PluginMobileExtracti18n, MobilePluginI18NResource.MobileModifyPanel01_deletingProy));

      ExtractionProject eProject =
          (ExtractionProject) blackboard.get(MobileModifyPanel01.SELECTED_EXTRACT_PROJECT);

      // guardamos la informacion en base de datos
      final String sUrlPrefix =
          Constants.APLICACION.getString(UserPreferenceConstants.LOCALGIS_SERVER_URL);
      AdministradorCartografiaClient administradorCartografiaClient =
          new AdministradorCartografiaClient(
              sUrlPrefix
                  + WebAppConstants.GEOPISTA_WEBAPP_NAME
                  + ServletConstants.ADMINISTRADOR_CARTOGRAFIA_SERVLET_NAME);
      administradorCartografiaClient.deleteExtractProject(eProject);

      // Borramos los datos subidos al servidor.
      httpDeleteProject(Constants.URL_DELETE_SERVER, eProject);

      String dirBase =
          UserPreferenceStore.getUserPreference(
              UserPreferenceConstants.PREFERENCES_DATA_PATH_KEY,
              UserPreferenceConstants.DEFAULT_DATA_PATH,
              true);
      dirBase += File.separator + "maps";

      String projectName = eProject.getNombreProyecto();
      String idProyecto = eProject.getIdProyecto();

      String dirMapName = projectName + "." + idProyecto;
      File dirBaseMake = new File(dirBase, dirMapName);
      if (dirBaseMake.exists()) {
        MobileUtils.deleteDir(dirBaseMake);
        logger.info("Borrando fichero local:" + dirBaseMake);
      }

    } finally {
      // borramos la cuadrícula
      LayerManager layerManager = context.getLayerManager();
      Layer graticuleLayer = layerManager.getLayer(GraticuleCreatorEngine.getGraticuleName());
      if (graticuleLayer != null) {
        layerManager.remove(graticuleLayer);
      }
    }
  }
Example #6
0
 public void init() {
   snapToVerticesCheckBox.setSelected(blackboard.get(SnapToVerticesPolicy.ENABLED_KEY, false));
   toleranceTextField.setText("" + SnapManager.getToleranceInPixels(blackboard));
   snapToFeaturesCheckBox.setSelected(blackboard.get(SnapToFeaturesPolicy.ENABLED_KEY, false));
   snapToGridCheckBox.setSelected(blackboard.get(SnapToGridPolicy.ENABLED_KEY, false));
   gridSizeTextField.setText("" + blackboard.get(SnapToGridPolicy.GRID_SIZE_KEY, 20d));
   showGridCheckBox.setSelected(blackboard.get(GridRenderer.ENABLED_KEY, false));
   showGridDotsRadioButton.setSelected(blackboard.get(GridRenderer.DOTS_ENABLED_KEY, false));
   showGridLinesRadioButton.setSelected(blackboard.get(GridRenderer.LINES_ENABLED_KEY, true));
   updateEnabled();
 }
  @Override
  public boolean execute(PlugInContext context) throws Exception {
    Blackboard bb = get(context.getWorkbenchContext());
    WorkbenchFrame wbframe = context.getWorkbenchFrame();

    String fileName = (String) bb.get("ArcMapStylePlugin.filename");

    File am2sld = findArcMap2SLD(wbframe, bb);
    if (am2sld == null) {
      return false;
    }

    ProcessBuilder pb = new ProcessBuilder(am2sld.toString());
    pb.start().waitFor(); // unfortunately, the code seems to always be
    // zero

    showMessageDialog(
        wbframe,
        get(
            "org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD"),
        get("org.openjump.core.ui.plugin.style.ImportSLDPlugIn.Question"),
        INFORMATION_MESSAGE);

    JFileChooser chooser = new JFileChooser();

    if (fileName != null) {
      chooser.setCurrentDirectory(new File(fileName).getParentFile());
    }

    int res = chooser.showOpenDialog(context.getWorkbenchFrame());
    if (res == APPROVE_OPTION) {
      File f = chooser.getSelectedFile();
      if (!f.exists()) {
        return false;
      }
      bb.put("ArcMapStylePlugin.filename", f.getAbsoluteFile().toString());

      DocumentBuilderFactory dbf = newInstance();
      dbf.setNamespaceAware(true);
      Document doc = dbf.newDocumentBuilder().parse(f);

      importSLD(doc, context);
    }

    return false;
  }
 /**
  * Retorna un árbol con las capas seleccionadas y sus atributos
  *
  * @return javax.swing.JList
  */
 private JTree getReadableLayerTree() {
   ArrayList<GeopistaLayer> extractLayers =
       (ArrayList<GeopistaLayer>) blackboard.get(MobileExtractPanel01.MOBILE_READABLE_LAYERS);
   readableRootNodes = getRootLayerNodes(extractLayers);
   Vector rootVector =
       new NamedVector(
           I18N.get(
               MobileExtractPlugin.PluginMobileExtracti18n,
               MobilePluginI18NResource.MobileExtractPanel03_capasLect),
           readableRootNodes);
   JTree tree = new JTree(rootVector);
   // tree.setFont(new Font(tree.getFont().getName(), Font.BOLD, tree.getFont().getSize()));
   CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer(Color.RED);
   tree.setCellRenderer(renderer);
   tree.setCellEditor(new CheckBoxNodeEditor(tree));
   tree.setEditable(true);
   return tree;
 }
  public void enter() {
    // Recuperamos el ID_Parcela y el ID_UnidadConstruccion
    AppContext app = (AppContext) AppContext.getApplicationContext();
    Blackboard Identificadores = app.getBlackboard();
    ID_Parcela = Integer.parseInt(Identificadores.get("ID_Parcela").toString());
    // ID_Unidad= Integer.parseInt(Identificadores.get("ID_Unidad").toString());

    // Rellenamos el Listbox
    lstCons.clear();
    try {
      CatastroActualizarPostgre Cons = new CatastroActualizarPostgre();
      ArrayList Datos = Cons.Cons(ID_Parcela);
      Iterator alIt = Datos.iterator();
      while (alIt.hasNext()) {
        lstCons.addElement(alIt.next());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  private void jbInit() throws Exception {
    this.removeAll();
    this.setLayout(new GridBagLayout());
    java.awt.GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
    gridBagConstraints1.gridx = 0;
    gridBagConstraints1.gridy = 1;
    gridBagConstraints1.weightx = 1.0;
    gridBagConstraints1.weighty = 1.0;
    gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints1.ipadx = -21;
    gridBagConstraints1.ipady = 141;
    gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5);
    java.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
    gridBagConstraints2.gridx = 0;
    gridBagConstraints2.gridy = 2;
    gridBagConstraints2.insets = new java.awt.Insets(5, 5, 5, 5);
    java.awt.GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
    gridBagConstraints3.gridx = 0;
    gridBagConstraints3.gridy = 3;
    gridBagConstraints3.weightx = 1.0;
    gridBagConstraints3.weighty = 1.0;
    gridBagConstraints3.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints3.ipadx = -21;
    gridBagConstraints3.ipady = 141;
    gridBagConstraints3.insets = new java.awt.Insets(5, 5, 5, 5);

    java.awt.GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
    gridBagConstraints4.gridx = 0;
    gridBagConstraints4.gridy = 0;

    String projectName = (String) blackboard.get(MOBILE_PROJECT_NAME);
    JLabel extractionProjectNameLabel = new JLabel(projectName);

    this.add(extractionProjectNameLabel, gridBagConstraints4);

    this.add(getWriteableLayerScrollPane(), gridBagConstraints1);
    this.add(getReadableLayerScrollPane(), gridBagConstraints3);
    this.add(getGraticuleButton(), gridBagConstraints2);
  }
  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

  }
  private JScrollPane getGraticuleCells() {
    // sacamos las cuadrículas de la rejilla
    LayerManager layerManager = context.getLayerManager();
    Layer graticuleLayer = layerManager.getLayer(GraticuleCreatorEngine.getGraticuleName());
    if (graticuleLayer != null) {
      FeatureCollectionWrapper fCollWrapper = graticuleLayer.getFeatureCollectionWrapper();
      List featList = fCollWrapper.getFeatures();
      jComboList = new ArrayList<JComboBox>();
      Feature feature = null;
      Integer cellId = null;
      JPanel jPaneCells = new JPanel();
      int cols = featList.size() / 2;
      if (featList.size() % 2 != 0) {
        cols++;
      }
      jPaneCells.setLayout(new GridLayout(cols, 2));

      //	        //capas extraídas
      //	        ArrayList<GeopistaLayer> writeableLayers = (ArrayList<GeopistaLayer>)
      // blackboard.get(MobileExtractPanel01.MOBILE_WRITEABLE_LAYERS);
      //	        ArrayList<GeopistaLayer> readableLayers = (ArrayList<GeopistaLayer>)
      // blackboard.get(MobileExtractPanel01.MOBILE_READABLE_LAYERS);
      //	        ArrayList<String> listLayersId = new ArrayList<String>();
      //	        GeopistaLayer geopistaLayer = null;
      //	        for(int i=0; i<writeableLayers.size(); i++){
      //	        	geopistaLayer = writeableLayers.get(i);
      //	        	listLayersId.add(String.valueOf(geopistaLayer.getId_LayerDataBase()));
      //	        }
      //	        for(int i=0; i<readableLayers.size(); i++){
      //	        	geopistaLayer = readableLayers.get(i);
      //	        	listLayersId.add(String.valueOf(geopistaLayer.getId_LayerDataBase()));
      //	        }

      // obtenemos el proyecto de extracción seleccionado de la pantalla anterior
      ExtractionProject eProject =
          (ExtractionProject) blackboard.get(MobileAssignCellsPanel01.SELECTED_EXTRACT_PROJECT);

      JPanel auxPanel = null;
      arrayNombresUsuarios = null;
      listaUsuariosPermisos = null;
      HashMap<String, String> usuariosAsignados = null;
      final String sUrlPrefix = Constants.APLICACION.getString("geopista.conexion.servidorurl");
      try {
        // añadimos los usuarios a los combos
        AdministradorCartografiaClient administradorCartografiaClient =
            new AdministradorCartografiaClient(
                sUrlPrefix
                    + WebAppConstants.GEOPISTA_WEBAPP_NAME
                    + ServletConstants.ADMINISTRADOR_CARTOGRAFIA_SERVLET_NAME);
        ListaUsuarios usersRealList =
            (ListaUsuarios)
                administradorCartografiaClient.getUsersPermLayers(
                    eProject.getIdExtractLayersList());
        // usuarios ya asignados
        usuariosAsignados =
            administradorCartografiaClient.getAssignCellsExtractProject(eProject.getIdProyecto());
        // usuarios con permisos sobre las capas
        Hashtable<String, Usuario> usuariosReales =
            (Hashtable<String, Usuario>) usersRealList.gethUsuarios();
        Set<String> keySetUsers = usuariosReales.keySet();
        arrayNombresUsuarios = new String[keySetUsers.size() + 1];
        arrayNombresUsuarios[0] = ComboItemGraticuleListener.SIN_ASIGNAR;
        listaUsuariosPermisos = new ArrayList<Usuario>();
        String userKey = null;
        Usuario usuario = null;
        int k = 1;
        for (Iterator iterator = keySetUsers.iterator(); iterator.hasNext(); ) {
          userKey = (String) iterator.next();
          usuario = usuariosReales.get(userKey);
          arrayNombresUsuarios[k] = usuario.getName();
          listaUsuariosPermisos.add(usuario);
          k++;
        }
      } catch (Exception e) {
        e.printStackTrace();
      }

      JComboBox jcombo = null;
      ILayerViewPanel layerViewPanel = (ILayerViewPanel) context.getLayerViewPanel();
      JLabel jLabelCelda = null;
      String cellIdStr = null;
      Map<Layer, HashSet<Feature>> visibleLayerToFeaturesInFenceMap = null;
      graticuleLayer.setVisible(false); // para quitar la cuadrícula de la intersección
      // añadimos el identificador de cada una al panel
      for (int i = 0; i < featList.size(); i++) {
        feature = (Feature) featList.get(i);
        visibleLayerToFeaturesInFenceMap =
            layerViewPanel.visibleLayerToFeaturesInFenceMap(feature.getGeometry());
        cellId = (Integer) feature.getAttribute(GraticuleCreatorEngine.ATR_CELL_ID);
        auxPanel = new JPanel();
        jLabelCelda =
            new JLabel(
                I18N.get(
                        MobileAssignCellsPlugin.PluginMobileExtracti18n,
                        MobilePluginI18NResource.MobileAssignCellsPanel02_celda)
                    + cellId);
        jcombo = new JComboBox(arrayNombresUsuarios);
        cellIdStr = String.valueOf(cellId);
        jcombo.setName(cellIdStr);

        // celdas con features o sin ellas
        if (visibleLayerToFeaturesInFenceMap == null
            || visibleLayerToFeaturesInFenceMap.size() == 0) {
          jLabelCelda.setEnabled(false);
          jcombo.setEnabled(false);
        } else {
          jLabelCelda.setForeground(Color.RED);
          jcombo.addItemListener(
              new ComboItemGraticuleListener(
                  layerViewPanel, graticuleLayer, feature, jLabelCelda, wizardContext));
          jComboList.add(jcombo);
        }

        auxPanel.add(jLabelCelda);
        auxPanel.add(jcombo);
        jPaneCells.add(auxPanel);
      }
      graticuleLayer.setVisible(true);

      // seleccionamos los usuario asignados en los combos
      if (usuariosAsignados != null && usuariosAsignados.size() != 0) {
        for (int i = 0; i < jComboList.size(); i++) {
          jcombo = jComboList.get(i);
          cellIdStr = jcombo.getName();
          if (usuariosAsignados.containsKey(cellIdStr)) {
            seleccionaUsuarioComboCelda(jcombo, usuariosAsignados.get(cellIdStr));
          }
        }
      }

      jPaneInternal = new JScrollPane();
      jPaneInternal.setViewportView(jPaneCells);
      jPaneInternal.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    }

    return jPaneInternal;
  }