Examples of Alerta


Examples of com.GestDB.swing.Alerta

                            fileTarget.renameTo(new File("updates/gestdb_" + Gestor.Version + ".jar"));

                            // Tenemos que abrir el zip y descomprimirlo sobre nuestro directorio.
                            Unzip.UnzipDist(fileSource, new File("."));

                            Alerta al = new Alerta(Gestor.elGestorActivo, Gestor.GetLiteral("gestor.error_1","Error"), true,
                                Gestor.GetLiteral("gestor.alert_update_complete","El programa se ha actualizado. Reinicie la aplicaci�n para tener los nuevos cambios."), Alerta.OK);
                            al.setVisible(true);
                            al = null;
                        }
                        else
                        {
                            Alerta al = new Alerta(Gestor.elGestorActivo, Gestor.GetLiteral("gestor.error_1","Error"), true,
                                Gestor.GetLiteral("gestor.alert_update_avalaible","Hay disponible una nueva versi�n del programa. la puede descargar en la siguiente direcci�n.") +
                                sUrlDescarga + sb.toString(), Alerta.OK);
                            al.setVisible(true);
                            al = null;
                        }

                    } catch(Exception e)
                    {
                        Alerta al = new Alerta(Gestor.elGestorActivo, Gestor.GetLiteral("gestor.error_1","Error"), true,
                            Gestor.GetLiteral("gestor.alert_update_avalaible","Hay disponible una nueva versi�n del programa. la puede descargar en la siguiente direcci�n.") +
                            sUrlDescarga + sb.toString(), Alerta.OK);
                        al.setVisible(true);
                        al = null;
                    }
                }
                else
                {
                    Alerta al = new Alerta(Gestor.elGestorActivo, Gestor.GetLiteral("gestor.error_1","Error"), true,
                        Gestor.GetLiteral("gestor.alert_update_avalaible","Hay disponible una nueva versi�n del programa. la puede descargar en la siguiente direcci�n.") +
                        sUrlDescarga + sb.toString(), Alerta.OK);
                    al.setVisible(true);
                    al = null;
                }
            }
        } catch(Throwable e)
        {
View Full Code Here

Examples of com.GestDB.swing.Alerta

                            }
                        }

                    }catch(Exception e)
                    {
                        Alerta al = new Alerta(this,Gestor.GetLiteral("gestor.alert","Aviso"),true,
                            Gestor.GetLiteral("gestor.error_1","Error") + ": " + e.getMessage(),Alerta.OK);
                        al.setVisible(true);
                        al = null;
                    }
                } catch (Exception ex)
                {
                    if(fin != null)
                    {
                        try {
                            fin.close();
                        }catch(Exception ee){
                            ;
                        }
                    }
                    if(fout != null)
                    {
                        try {
                            fout.close();
                        }catch(Exception ee){
                            ;
                        }
                    }
                    // se tiene que borrar el archivo de destino
                    if(archivoDestino.exists())
                        archivoDestino.delete();
                   
                   
                    Alerta al = new Alerta(this,Gestor.GetLiteral("gestor.alert","Aviso"),true,
                        Gestor.GetLiteral("gestor.error_1","Error") + ": " + ex.getMessage(),Alerta.OK);
                    al.setVisible(true);
                    al = null;
                }
               
            }
            else
            {
                // Espa�ol: no se puee leer el archivo origen.
                // English: Reading error with source file
                Alerta al = new Alerta(this,Gestor.GetLiteral("gestor.alert","Aviso"),true,
                    Gestor.GetLiteral("gestor.error_1","Error") + ": " +
                    Gestor.GetLiteral("addlibrary.error_reading","El archivo no se puede leer") +
                    ". " + archivo.getAbsolutePath(),Alerta.OK);
                al.setVisible(true);
                al = null;
            }
        }       
    }
View Full Code Here

Examples of com.GestDB.swing.Alerta

        return sb.toString();
    }
   
    public static void showAlert(String textSend)
    {
        Alerta al = new Alerta((java.awt.Frame)null, Gestor.GetLiteral("gestor.error_1","Error"), true, Gestor.GetLiteral("trackbug.send_developer","Se ha producido un error en la aplicaci�n. �Desea enviar el error al desarrollador?"), Alerta.OKCANCEL);
        al.setVisible(true);
        if(al.getReturnStatus() == al.RET_OK)
        {
            // Mandamos el error al servidor
            registroServer.fatal(textSend);
        }
    }
View Full Code Here

Examples of com.GestDB.swing.Alerta

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        String cadena = jtArchivo.getText();
        if(cadena == null || cadena.trim().length() < 1)
        {
            // es necesario seleccionar un archivo o directorio
            al = new Alerta(new javax.swing.JDialog(),Gestor.GetLiteral("gestor.alert","Atenci�n"),true,
                Gestor.GetLiteral("importardlg.error_1","Tiene que indicar un archivo o directorio"),Alerta.OK);
            al.setVisible(true);
            return;
        }
       
        // comprueba que en el n�mero de commit no se metan letras
        if(jckCommit.isSelected())
        {
            cadena = jtRegistros.getText();
            if(cadena == null || cadena.trim().length() < 1)
            {
                al = new Alerta(new javax.swing.JDialog(),
                    Gestor.GetLiteral("gestor.alert","Atenci�n"),true,
                        Gestor.GetLiteral("importardlg.error_2","Tiene que indicar cada cuantos registros se realiza un commit."),Alerta.OK);
                al.setVisible(true);
                return;
            }
            else
            {
                cadena = cadena.trim();
                try {
                    Integer.parseInt(cadena);
                } catch(java.lang.NumberFormatException ne)
                {
                    al = new Alerta(new javax.swing.JDialog(),
                        Gestor.GetLiteral("gestor.alert","Atenci�n"),true,
                        Gestor.GetLiteral("importardlg.error_3","S�lo se aceptan numeros en el recudro de registros."),Alerta.OK);
                    al.setVisible(true);
                    return;
                }
            }
        }
       
        // si el tipo es archivo se tiene que comprobar que existe.
        File fArchivo = new File(jtArchivo.getText().trim());
        if(rbArchivo.isSelected() && (!fArchivo.exists() || !fArchivo.isFile()))
        {
            al = new Alerta(new javax.swing.JDialog(),
                Gestor.GetLiteral("gestor.alert","Atenci�n"),true,Gestor.GetLiteral("importardlg.error_4","El archivo") + " " +
                jtArchivo.getText().trim() + " " + Gestor.GetLiteral("importardlg.error_5","no existe o no se encuentra."),Alerta.OK);
            al.setVisible(true);
            return;
        }
        else if(rbDirectorio.isSelected())
        {
            // comprueba si existe
            if( !fArchivo.exists() )
            {
                al = new Alerta(new javax.swing.JDialog(),
                    Gestor.GetLiteral("gestor.alert","Atenci�n"),true,Gestor.GetLiteral("importardlg.error_6","El directorio") + " " +
                    jtArchivo.getText().trim() + " " + Gestor.GetLiteral("importardlg.error_7","no existe o no se encuentra."),Alerta.OK);
                al.setVisible(true);
                return;
            }
           
            // comprueba si hay archivos con extensi�n sql
            FiltroArchivos fa = null;
      if(rbQuery.isSelected())
        fa = new FiltroArchivos(".sql");
      else
        fa = new FiltroArchivos(".dat");
            File archivos[] = fArchivo.listFiles(fa);
            if( archivos == null || archivos.length < 1)
            {
                al = new Alerta(new javax.swing.JDialog(),
                    Gestor.GetLiteral("gestor.alert","Atenci�n"),true,Gestor.GetLiteral("importardlg.error_6","El directorio") + " " +
                    jtArchivo.getText().trim() + " " + Gestor.GetLiteral("importardlg.error_8","no contiene archivos") +
                    " " + (rbQuery.isSelected()?"SQL":"DAT") + ".",Alerta.OK);
                al.setVisible(true);
                return;
View Full Code Here

Examples of com.GestDB.swing.Alerta

            if(esCrear)
            {
                try {
                    if(!gestor.skins.createTheme(sskin,themeName,ptheme))
                    {
                        Alerta al = new Alerta(new javax.swing.JDialog(),Gestor.GetLiteral("gestor.alert","Aviso"),true,
                           Gestor.GetLiteral("editskin.error5","Error guardando el tema"),Alerta.OK);
                        al.setVisible(true);
                        al = null;
                    }
                    else
                    {
                        // tenemos que actualizar la ventana de configuraci�n
                        conf.CargaSkins();
                    }
                } catch(Exception e)
                {
                    Alerta al = new Alerta(new javax.swing.JDialog(),Gestor.GetLiteral("gestor.alert","Aviso"),true,
                        e.getMessage(),Alerta.OK);
                    al.setVisible(true);
                    al = null;
                }
            }
            else
            {
                try {
                    if(!gestor.skins.saveTheme(sskin,themeName,stema,ptheme))
                    {
                        Alerta al = new Alerta(new javax.swing.JDialog(),Gestor.GetLiteral("gestor.alert","Aviso"),true,
                           Gestor.GetLiteral("editskin.error5","Error guardando el tema"),Alerta.OK);
                        al.setVisible(true);
                        al = null;
                    }
                    else
                    {
                        // tenemos que actualizar la ventana de configuraci�n
                        conf.CargaSkins();
                    }
                } catch(Exception e)
                {
                    Alerta al = new Alerta(new javax.swing.JDialog(),Gestor.GetLiteral("gestor.alert","Aviso"),true,
                        e.getMessage(),Alerta.OK);
                    al.setVisible(true);
                    al = null;
                }
            }
           
            this.setVisible(false);
View Full Code Here

Examples of com.GestDB.swing.Alerta

        if(mensaje.length() == 0)
            return true;
       
        // tenemos que notificarselo al usuario.
        Alerta al = new Alerta(new javax.swing.JDialog(),Gestor.GetLiteral("gestor.alert","Aviso"),true,
            mensaje,Alerta.OK);
        al.setVisible(true);
        al = null;
       
       
        return false;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.