Package gwtupload.client

Examples of gwtupload.client.PreloadedImage$OnErrorPreloadedImageHandler


          int count = 0;
          for(FotoDTO foto:parcelaDTO.getFotos()){
            if(foto.isAntes()){
              if(count == indexFotoAntes)
              {
                new PreloadedImage("/ImageServer.image?id="+foto.getId(), showImageFotosAntes);
               
              }
              count++;
            }
           
          }
        }
      });
     
     
     
      antCarruselAntes.addClickHandler(new ClickHandler() {
       
        @Override
        public void onClick(ClickEvent event) {
          indexFotoAntes--;
          if(indexFotoAntes<0)
          {
            indexFotoAntes=cantFotosAntes - 1;
            if(indexFotoAntes<0)
            {
              indexFotoAntes= 0;
            }
           
          }
          int count = 0;
          for(FotoDTO foto:parcelaDTO.getFotos()){
            if(foto.isAntes()){
              if(count == indexFotoAntes)
              {
                new PreloadedImage("/ImageServer.image?id="+foto.getId(), showImageFotosAntes);
               
              }
              count++;
            }
           
          }
        }
      });
     
      sigCarruselDespues.addClickHandler(new ClickHandler() {
       
        @Override
        public void onClick(ClickEvent event) {
          indexFotoDespues++;
          if(indexFotoDespues>=cantFotosDespues)
          {
            indexFotoDespues=0;
           
          }
          int count = 0;
          for(FotoDTO foto:parcelaDTO.getFotos()){
            if(!foto.isAntes()){
              if(count == indexFotoDespues)
              {
                new PreloadedImage("/ImageServer.image?id="+foto.getId(), showImageFotosDespues);
               
              }
              count++;
            }
           
          }
        }
      });
     
      antCarruselDespues.addClickHandler(new ClickHandler() {
       
        @Override
        public void onClick(ClickEvent event) {
          indexFotoDespues--;
          if(indexFotoDespues<0)
          {
            indexFotoDespues=cantFotosDespues - 1;
            if(indexFotoDespues<0)
            {
              indexFotoDespues= 0;
            }
           
          }
          int count = 0;
          for(FotoDTO foto:parcelaDTO.getFotos()){
            if(!foto.isAntes()){
              if(count == indexFotoDespues)
              {
                new PreloadedImage("/ImageServer.image?id="+foto.getId(), showImageFotosDespues);
               
              }
              count++;
            }
           
          }
         
         
        }
      });
     
      elimFotoAntes.addClickHandler(new ClickHandler() {
       
        @Override
        public void onClick(ClickEvent event) {
          int indiceFotoActual = indexFotoAntes;
          int count = 0;
          for(FotoDTO foto:parcelaDTO.getFotos()){
            if(foto.isAntes()){
              if(count == indiceFotoActual)
              {
                fotosBorradas.add(foto);
                /*Photo f = null;
                for(Photo photo : photosAntes){
                  if(photo.getCaption().equals(foto.getNombre())){
                    f= photo;
                    break;
                  }
                 
                }
                //if(photosAntes.size()==1){
                if(cantFotosAntes==1){
                  verticalFotosAntes.setVisible(false);
                }else{
                  //photosAntes.remove(f);
                  //carruselAntes.setPhotos(photosAntes);
                  indexFotoAntes--;
                  if(indexFotoAntes<0)
                  {
                    indexFotoAntes=cantFotosAntes - 1;
                    if(indexFotoAntes<0)
                    {
                      indexFotoAntes= 0;
                    }
                   
                  }
                  int count2 = 0;
                  for(FotoDTO foto2:parcelaDTO.getFotos()){
                    if(foto2.isAntes()){
                      if(count2 == indexFotoAntes)
                      {
                        new PreloadedImage("/ImageServer.image?id="+foto2.getId(), showImageFotosAntes);
                       
                      }
                      count2++;
                    }
                   
                  }
                  // TODO Auto-generated method stub
                 
                }
                cantFotosAntes--;*/
              }
              count++;
            }
           
          }
        }
      });
     
      elimFotoDespues.addClickHandler(new ClickHandler() {
       
        @Override
        public void onClick(ClickEvent event) {
          int indiceFotoActual = 0;//= carruselDespues.getCurrentPhotoIndex();
          // TODO Auto-generated method stub
          int count = 0;
          for(FotoDTO foto:parcelaDTO.getFotos()){
            if(!foto.isAntes()){
              if(count == indiceFotoActual)
              {
                fotosBorradas.add(foto);
                /*Photo f = null;
                for(Photo photo : photosDespues){
                  if(photo.getCaption().equals(foto.getNombre())){
                    f= photo;
                    break;
                  }
                 
                }
                //if(photosDespues.size()==1){
                if(cantFotosDespues ==1){
                  verticalFotosDespues.setVisible(false);
                }else{
                  //photosDespues.remove(f);
                  //carruselDespues.setPhotos(photosDespues);
                  indexFotoDespues--;
                  if(indexFotoDespues<0)
                  {
                    indexFotoDespues=cantFotosDespues - 1;
                    if(indexFotoDespues<0)
                    {
                      indexFotoDespues= 0;
                    }
                   
                  }
                  int count2 = 0;
                  for(FotoDTO foto2:parcelaDTO.getFotos()){
                    if(!foto2.isAntes()){
                      if(count2 == indexFotoDespues)
                      {
                        new PreloadedImage("/ImageServer.image?id="+foto2.getId(), showImageFotosDespues);
                       
                      }
                      count2++;
                    }
                   
                  }
                  // TODO Auto-generated method stub
                }
                cantFotosDespues--;*/
               
              }
              count++;
            }
           
          }
        }
      });
     
     
      ocupacion.addItem("Seleccionar", "0");
      for (ItemConstante i : Ocupacion.getItems()) {
        ocupacion.addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      estadoPared.addItem("Seleccionar", "0");
      for (ItemConstante i : EstadoPared.getItems()) {
        estadoPared
            .addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      materialTecho.addItem("Seleccionar", "0");
      for (ItemConstante i : MaterialTecho.getItems()) {
        materialTecho.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      materialParedes.addItem("Seleccionar", "0");
      for (ItemConstante i : MaterialParedes.getItems()) {
        materialParedes.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      materialPiso.addItem("Seleccionar", "0");
      for (ItemConstante i : MaterialPiso.getItems()) {
        materialPiso.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      banios.addItem("Seleccionar", "0");
      for (ItemConstante i : Banios.getItems()) {
        banios.addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      propietarioOtras.addItem("Seleccionar", "0");
      for (ItemConstante i : PropietarioOtras.getItems()) {
        propietarioOtras.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      tenenciaVivienda.addItem("Seleccionar", "0");
      for (ItemConstante i : TenenciaVivienda.getItems()) {
        tenenciaVivienda.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      mudarse.addItem("Seleccionar", "0");
      for (ItemConstante i : Mudarse.getItems()) {
        mudarse.addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      procedenciaAguaConsumo.addItem("Seleccionar", "0");
      for (ItemConstante i : ProcedenciaAguaConsumo.getItems()) {
        procedenciaAguaConsumo.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      procedenciaAguaVivienda.addItem("Seleccionar", "0");
      for (ItemConstante i : ProcedenciaAguaVivienda.getItems()) {
        procedenciaAguaVivienda.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      basura.addItem("Seleccionar", "0");
      for (ItemConstante i : Basura.getItems()) {
        basura.addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      categoriaVivienda.addItem("Seleccionar", "0");
      for (ItemConstante i : CategoriaVivienda.getItems()) {
        categoriaVivienda.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      sanitario.addItem("Seleccionar", "0");
      for (ItemConstante i : Sanitaria.getItems()) {
        sanitario.addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      estadoTerminacion.addItem("Seleccionar", "0");
      for (ItemConstante i : EstadoTerminacion.getItems()) {
        estadoTerminacion.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      energia.addItem("Seleccionar", "0");
      for (ItemConstante i : Energia.getItems()) {
        energia.addItem(i.getTexto(), String.valueOf(i.getCodigo()));
      }

      conservacionVivienda.addItem("Seleccionar", "0");
      for (ItemConstante i : ConservacionVivienda.getItems()) {
        conservacionVivienda.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      humedadesTecho.addItem("SI", "SI");
      humedadesTecho.addItem("NO", "NO");

      goterasTecho.clear();
      goterasTecho.addItem("SI", "SI");
      goterasTecho.addItem("NO", "NO");

      puertasVentanasMalEstado.clear();
      puertasVentanasMalEstado.addItem("SI", "SI");
      puertasVentanasMalEstado.addItem("NO", "NO");

      grietasPiso.clear();
      grietasPiso.addItem("SI", "SI");
      grietasPiso.addItem("NO", "NO");

      caidaRevoques.clear();
      caidaRevoques.addItem("SI", "SI");
      caidaRevoques.addItem("NO", "NO");

      cielorasoDesprendido.clear();
      cielorasoDesprendido.addItem("SI", "SI");
      cielorasoDesprendido.addItem("NO", "NO");

      pocaLuzSolar.clear();
      pocaLuzSolar.addItem("SI", "SI");
      pocaLuzSolar.addItem("NO", "NO");

      escazaVentilacion.clear();
      escazaVentilacion.addItem("SI", "SI");
      escazaVentilacion.addItem("NO", "NO");

      peligroDerrumbe.clear();
      peligroDerrumbe.addItem("SI", "SI");
      peligroDerrumbe.addItem("NO", "NO");

      instalacionesMalas.clear();
      instalacionesMalas.addItem("SI", "SI");
      instalacionesMalas.addItem("NO", "NO");

      manchasParedesTechos.clear();
      manchasParedesTechos.addItem("SI", "SI");
      manchasParedesTechos.addItem("NO", "NO");

      descalceDeCimientos.clear();
      descalceDeCimientos.addItem("SI", "SI");
      descalceDeCimientos.addItem("NO", "NO");

      pozoNegroMalEstado.clear();
      pozoNegroMalEstado.addItem("SI", "SI");
      pozoNegroMalEstado.addItem("NO", "NO");

      // Hacinamiento
      actividadLaboralEnViv.clear();
      actividadLaboralEnViv.addItem("SI", "SI");
      actividadLaboralEnViv.addItem("NO", "NO");

      // Inundacion
      inundadaAnteriormente.clear();
      inundadaAnteriormente.addItem("SI", "SI");
      inundadaAnteriormente.addItem("NO", "NO");

      irsePorInundacion.clear();
      irsePorInundacion.addItem("SI", "SI");
      irsePorInundacion.addItem("NO", "NO");

      abandonoViviendaPorInund.clear();
      abandonoViviendaPorInund.addItem("SI", "SI");
      abandonoViviendaPorInund.addItem("NO", "NO");

      alojamientoInundacion.clear();
      alojamientoInundacion.addItem("Seleccionar", "0");
      for (ItemConstante i : AlojamientoInundacion.getItems()) {
        alojamientoInundacion.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      persepcionVivienda.clear();
      persepcionVivienda.addItem("Seleccionar", "0");
      for (ItemConstante i : PersepcionVivienda.getItems()) {
        persepcionVivienda.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      aguaEnVivienda.clear();
      aguaEnVivienda.addItem("Seleccionar", "0");
      for (ItemConstante i : AguaEnVivienda.getItems()) {
        aguaEnVivienda.addItem(i.getTexto(),
            String.valueOf(i.getCodigo()));
      }

      cantFamilias.addKeyboardListener(new KeyNumeric());
      cantHabitaciones.addKeyboardListener(new KeyNumeric());
      cantHabDormitorio.addKeyboardListener(new KeyNumeric());
      cantHabTrabajo.addKeyboardListener(new KeyNumeric());
      antiguedadEnCasa.addKeyboardListener(new KeyNumeric());
      cntDiasFuera.addKeyboardListener(new KeyNumeric());
      anios.addKeyboardListener(new KeyNumeric());
      alturaAgua.addKeyboardListener(new KeyNumeric());
     
     
      // Attach the image viewer to the document
        // Create a new uploader panel and attach it to the document
        MultiUploader defaultUploader = new MultiUploader();
    
        // Add a finish handler which will load the image once the upload finishes
        defaultUploader.addOnFinishUploadHandler(onFinishUploaderHandler);
       
        labelFoto.setText("Despues de los arreglos");
       
     
      parcelaDTO = new ParcelaDTO();

      if (a == "modificar" || a == "eliminar") {

        for (ParcelaDTO p : parcelaGlobal) {
          if (p.getId().equals(id)) {
            parcelaDTO = p;
          }
        }
       
       
        photosAntes=new ArrayList<Photo>();
        photosDespues=new ArrayList<Photo>();
        
        for(FotoDTO foto:parcelaDTO.getFotos()){
          if(foto.isAntes()){
            new PreloadedImage("/ImageServer.image?id="+foto.getId(), showImageFotosAntes);
            Photo photo = new Photo("/ImageServer.image?id="+foto.getId());
            photo.setHeight(50);
            photo.setWidth(50);
            photo.setCaption(foto.getNombre());
            photosAntes.add(photo);
            cantFotosAntes++;
          }else{
            new PreloadedImage("/ImageServer.image?id="+foto.getId(), showImageFotosDespues);
            Photo photo = new Photo("/ImageServer.image?id="+foto.getId());
            photo.setHeight(50);
            photo.setWidth(50);
            photo.setCaption(foto.getNombre());
            photosDespues.add(photo);
View Full Code Here

TOP

Related Classes of gwtupload.client.PreloadedImage$OnErrorPreloadedImageHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.