Example usage for javafx.scene.control Alert Alert

List of usage examples for javafx.scene.control Alert Alert

Introduction

In this page you can find the example usage for javafx.scene.control Alert Alert.

Prototype

public Alert(@NamedArg("alertType") AlertType alertType) 

Source Link

Document

Creates an alert with the given AlertType (refer to the AlertType documentation for clarification over which one is most appropriate).

Usage

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @throws IOException Exception d'entre sortie
 *//*  w w  w. j  a  va 2  s . c o m*/
private static void genereVisite() throws IOException {
    if (!bRepertSauveChoisi) {
        setStrRepertoireProjet(getStrCurrentDir());
    }
    if (!isbDejaSauve()) {
        projetSauve();
    }
    if (isbDejaSauve()) {
        String strHTMLRepert = getStrRepertTemp() + "/pagesHTML";
        File fileHTMLRepert = new File(strHTMLRepert);
        if (!fileHTMLRepert.exists()) {
            fileHTMLRepert.mkdirs();
        }
        deleteDirectory(getStrRepertTemp() + "/panovisu/images");
        File fileImagesRepert = new File(getStrRepertTemp() + "/panovisu/images");
        if (!fileImagesRepert.exists()) {
            fileImagesRepert.mkdirs();
        }
        File fileBoutonRepert = new File(getStrRepertTemp() + "/panovisu/images/navigation");
        if (!fileBoutonRepert.exists()) {
            fileBoutonRepert.mkdirs();
        }
        File fileBoussoleRepert = new File(getStrRepertTemp() + "/panovisu/images/boussoles");
        if (!fileBoussoleRepert.exists()) {
            fileBoussoleRepert.mkdirs();
        }
        copieRepertoire(getStrRepertAppli() + File.separator + "panovisu/images/boussoles",
                fileBoussoleRepert.getAbsolutePath());
        File filePlanRepert = new File(getStrRepertTemp() + "/panovisu/images/plan");
        if (!filePlanRepert.exists()) {
            filePlanRepert.mkdirs();
        }
        copieRepertoire(getStrRepertAppli() + File.separator + "panovisu/images/plan",
                filePlanRepert.getAbsolutePath());
        File fileReseauRepert = new File(getStrRepertTemp() + "/panovisu/images/reseaux");
        if (!fileReseauRepert.exists()) {
            fileReseauRepert.mkdirs();
        }
        copieRepertoire(getStrRepertAppli() + File.separator + "panovisu/images/reseaux",
                fileReseauRepert.getAbsolutePath());
        File fileInterfaceRepert = new File(getStrRepertTemp() + "/panovisu/images/interface");
        if (!fileInterfaceRepert.exists()) {
            fileInterfaceRepert.mkdirs();
        }
        copieRepertoire(getStrRepertAppli() + File.separator + "panovisu/images/interface",
                fileInterfaceRepert.getAbsolutePath());
        File fileMARepert = new File(getStrRepertTemp() + "/panovisu/images/MA");
        if (!fileMARepert.exists()) {
            fileMARepert.mkdirs();
        }
        File fileHotspotsRepert = new File(getStrRepertTemp() + "/panovisu/images/hotspots");
        if (!fileHotspotsRepert.exists()) {
            fileHotspotsRepert.mkdirs();
        }
        if (getGestionnaireInterface().getStrVisibiliteBarrePersonnalisee().equals("oui")) {
            File fileTelecommandeRepert = new File(getStrRepertTemp() + "/panovisu/images/telecommande");
            if (!fileTelecommandeRepert.exists()) {
                fileTelecommandeRepert.mkdirs();
            }
            ReadWriteImage.writePng(getGestionnaireInterface().getWiBarrePersonnaliseeCouleur(),
                    getStrRepertTemp() + "/panovisu/images/telecommande" + File.separator + "telecommande.png",
                    false, 0.f);
            copieFichierRepertoire(getStrRepertAppli() + "/theme/telecommandes" + File.separator + "fs.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(getStrRepertAppli() + "/theme/telecommandes" + File.separator + "fs2.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(getStrRepertAppli() + "/theme/telecommandes" + File.separator + "souris.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(
                    getStrRepertAppli() + "/theme/telecommandes" + File.separator + "souris2.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(getStrRepertAppli() + "/theme/telecommandes" + File.separator + "aide.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(getStrRepertAppli() + "/theme/telecommandes" + File.separator + "info.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(
                    getStrRepertAppli() + "/theme/telecommandes" + File.separator + "rotation.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(getStrRepertAppli() + "/theme/telecommandes" + File.separator + "zoomin.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
            copieFichierRepertoire(
                    getStrRepertAppli() + "/theme/telecommandes" + File.separator + "zoomout.png",
                    getStrRepertTemp() + "/panovisu/images/telecommande");
        }
        copieFichierRepertoire(getStrRepertAppli() + "/theme" + File.separator + "chargement.gif",
                getStrRepertTemp() + "/panovisu/images");
        copieFichierRepertoire(getStrRepertAppli() + File.separator + "panovisu" + File.separator + "images"
                + File.separator + "aide_souris.png", getStrRepertTemp() + "/panovisu/images");
        copieFichierRepertoire(getStrRepertAppli() + File.separator + "panovisu" + File.separator + "images"
                + File.separator + "fermer.png", getStrRepertTemp() + "/panovisu/images");
        copieFichierRepertoire(getStrRepertAppli() + File.separator + "panovisu" + File.separator + "images"
                + File.separator + "precedent.png", getStrRepertTemp() + "/panovisu/images");
        copieFichierRepertoire(getStrRepertAppli() + File.separator + "panovisu" + File.separator + "images"
                + File.separator + "suivant.png", getStrRepertTemp() + "/panovisu/images");
        for (int i = 0; i < getGestionnaireInterface().getiNombreImagesBouton() - 2; i++) {
            ReadWriteImage.writePng(
                    getGestionnaireInterface().getWiNouveauxBoutons()[i], fileBoutonRepert.getAbsolutePath()
                            + File.separator + getGestionnaireInterface().getStrNomImagesBoutons()[i],
                    false, 0.f);
        }
        if (!strTypeHS.equals("gif")) {
            ReadWriteImage.writePng(
                    getGestionnaireInterface()
                            .getWiNouveauxBoutons()[getGestionnaireInterface().getiNombreImagesBouton() - 2],
                    fileHotspotsRepert.getAbsolutePath() + File.separator + "hotspot.png", false, 0.f);
        } else {
            copieFichierRepertoire(getStrRepertAppli() + "/theme/hotspots" + File.separator + strNomfichierHS,
                    fileHotspotsRepert.getAbsolutePath() + File.separator);
        }

        if (!strTypeHSImage.equals("gif")) {
            ReadWriteImage.writePng(
                    getGestionnaireInterface()
                            .getWiNouveauxBoutons()[getGestionnaireInterface().getiNombreImagesBouton() - 1],
                    fileHotspotsRepert.getAbsolutePath() + File.separator + "hotspotImage.png", false, 0.f);
        } else {
            copieFichierRepertoire(
                    getStrRepertAppli() + "/theme/photos" + File.separator + strNomfichierHSImage,
                    fileHotspotsRepert.getAbsolutePath() + File.separator);
        }
        if (!strTypeHSHTML.equals("gif")) {
            ReadWriteImage.writePng(
                    getGestionnaireInterface().getWiNouveauxBoutons()[getGestionnaireInterface()
                            .getiNombreImagesBouton()],
                    fileHotspotsRepert.getAbsolutePath() + File.separator + "hotspotHTML.png", false, 0.f);
        } else {
            copieFichierRepertoire(getStrRepertAppli() + "/theme/html" + File.separator + strNomfichierHSHTML,
                    fileHotspotsRepert.getAbsolutePath() + File.separator);
        }

        ReadWriteImage.writePng(getGestionnaireInterface().getWiNouveauxMasque(),
                fileMARepert.getAbsolutePath() + File.separator + "MA.png", false, 0.f);

        if (getGestionnaireInterface().isbAfficheCarte()) {
            File filemarqueursOL = new File(getStrRepertTemp() + "/panovisu/images/marqueursOL");
            if (!filemarqueursOL.exists()) {
                filemarqueursOL.mkdirs();
            }
            copieFichierRepertoire(
                    getStrRepertAppli() + File.separator + "theme" + File.separator + "marqueursOL"
                            + File.separator + "marqueur.png",
                    getStrRepertTemp() + File.separator + "panovisu/images/marqueursOL");
            copieFichierRepertoire(
                    getStrRepertAppli() + File.separator + "theme" + File.separator + "marqueursOL"
                            + File.separator + "home.png",
                    getStrRepertTemp() + File.separator + "panovisu/images/marqueursOL");
            copieFichierRepertoire(
                    getStrRepertAppli() + File.separator + "theme" + File.separator + "marqueursOL"
                            + File.separator + "marqueurActif.png",
                    getStrRepertTemp() + File.separator + "panovisu/images/marqueursOL");
        }
        if (getGestionnaireInterface().isbAfficheBoutonVisiteAuto()) {
            File filemarqueursAT = new File(getStrRepertTemp() + "/panovisu/images/visiteAutomatique");
            if (!filemarqueursAT.exists()) {
                filemarqueursAT.mkdirs();
            }
            copieFichierRepertoire(
                    getStrRepertAppli() + File.separator + "theme" + File.separator + "visiteAutomatique"
                            + File.separator + "playAutoTour.png",
                    getStrRepertTemp() + File.separator + "panovisu/images/visiteAutomatique");
            copieFichierRepertoire(
                    getStrRepertAppli() + File.separator + "theme" + File.separator + "visiteAutomatique"
                            + File.separator + "pauseAutoTour.png",
                    getStrRepertTemp() + File.separator + "panovisu/images/visiteAutomatique");
        }
        File fileXMLRepert = new File(getStrRepertTemp() + File.separator + "xml");
        if (!fileXMLRepert.exists()) {
            fileXMLRepert.mkdirs();
        }
        File fileCSSRepert = new File(getStrRepertTemp() + File.separator + "css");
        if (!fileCSSRepert.exists()) {
            fileCSSRepert.mkdirs();
        }
        File fileJsRepert = new File(getStrRepertTemp() + File.separator + "js");
        if (!fileJsRepert.exists()) {
            fileJsRepert.mkdirs();
        }
        String strContenuFichier;
        File fileXML;
        String strChargeImages = "";
        int iPanoEntree = Integer.parseInt(ordPano.getStrPanos().get(0));
        strPanoEntree = getPanoramiquesProjet()[iPanoEntree].getStrNomFichier()
                .substring(
                        getPanoramiquesProjet()[iPanoEntree].getStrNomFichier().lastIndexOf(File.separator) + 1,
                        getPanoramiquesProjet()[iPanoEntree].getStrNomFichier().length())
                .split("\\.")[0];
        for (int ii = 0; ii < ordPano.getStrPanos().size(); ii++) {
            int i = Integer.parseInt(ordPano.getStrPanos().get(ii));
            String strHTMLPanoRepert = strHTMLRepert + "/" + i;
            File fileHTMLPanoRepert = new File(strHTMLPanoRepert);
            if (!fileHTMLPanoRepert.exists()) {
                fileHTMLPanoRepert.mkdirs();
            }
            String strFichierPano = "panos/panovisu" + i;
            if (getPanoramiquesProjet()[i].getStrTypePanoramique().equals(Panoramique.CUBE)) {
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + "_f.jpg\"\n";
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + "_b.jpg\"\n";
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + "_u.jpg\"\n";
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + "_d.jpg\"\n";
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + "_r.jpg\"\n";
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + "_l.jpg\"\n";
            } else {
                strChargeImages += "                images[" + i + "]=\"" + strFichierPano + ".jpg\"\n";
            }
            String strIntroPetitePlanete = (isbIntroPetitePlanete()) ? "oui" : "non";
            String strAutorotation = (isbAutoRotationDemarre()) ? "oui" : "non";
            String strAutoTour = (isbAutoTourDemarre()) ? "oui" : "non";
            String strAutoTourBouton = (getGestionnaireInterface().isbAfficheBoutonVisiteAuto()) ? "oui"
                    : "non";
            String strAffInfo = (getPanoramiquesProjet()[i].isAfficheInfo()) ? "oui" : "non";
            String strAffTitre = (getGestionnaireInterface().isbAfficheTitre()) ? "oui" : "non";
            String strTitreAdpte = (getGestionnaireInterface().isbTitreAdapte()) ? "oui" : "non";
            double regX;
            double zN;
            if (getPanoramiquesProjet()[i].getStrTypePanoramique().equals(Panoramique.SPHERE)) {
                regX = Math.round(((getPanoramiquesProjet()[i].getRegardX() - 180) % 360) * 10) / 10;
                zN = Math.round(((getPanoramiquesProjet()[i].getZeroNord() - 180) % 360) * 10) / 10;
            } else {
                regX = Math.round(((getPanoramiquesProjet()[i].getRegardX() + 90) % 360) * 10) / 10;
                zN = Math.round(((getPanoramiquesProjet()[i].getZeroNord() + 90) % 360) * 10) / 10;
            }

            Color coulTitre = Color.valueOf(getGestionnaireInterface().getStrCouleurFondTitre());
            int iRouge = (int) (coulTitre.getRed() * 255.d);
            int iBleu = (int) (coulTitre.getBlue() * 255.d);
            int iVert = (int) (coulTitre.getGreen() * 255.d);
            String strCoulFondTitre = "rgba(" + iRouge + "," + iVert + "," + iBleu + ","
                    + getGestionnaireInterface().getTitreOpacite() + ")";

            strContenuFichier = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<!--\n"
                    + "     Visite gnre par l'diteur panoVisu \n" + "\n"
                    + "             Cration L.LANG      le monde  360  : http://lemondea360.fr\n" + "\n"
                    + "             fichier image : " + getPanoramiquesProjet()[i].getStrNomFichier() + "\n"
                    + "\n" + "-->\n" + "\n" + "\n" + "<scene>\n" + "   <pano \n" + "      image=\""
                    + strFichierPano + "\"\n";
            if (getGestionnaireInterface().isbAfficheTitre() && getGestionnaireInterface().isbTitreVisite()
                    && getGestionnaireInterface().isbTitrePanoramique()) {
                String strTit = "";
                TextField tfVisite = (TextField) getVbChoixPanoramique().lookup("#titreVisite");
                if (!tfVisite.getText().equals("")) {
                    strTit = tfVisite.getText();
                }

                strContenuFichier += "      afftitre=\"oui\"\n" + "      titre=\"" + strTit + "\"\n"
                        + "      titre2=\"" + getPanoramiquesProjet()[i].getStrTitrePanoramique() + "\"\n";
            } else if (getGestionnaireInterface().isbAfficheTitre()
                    && getGestionnaireInterface().isbTitreVisite()) {
                String strTit = "";
                TextField tfVisite = (TextField) getVbChoixPanoramique().lookup("#titreVisite");
                if (!tfVisite.getText().equals("")) {
                    strTit = tfVisite.getText();
                }

                strContenuFichier += "      afftitre=\"oui\"\n" + "      titre=\"" + strTit + "\"\n";

            } else if (getGestionnaireInterface().isbAfficheTitre()
                    && getGestionnaireInterface().isbTitrePanoramique()) {
                String strTit = "";
                TextField tfVisite = (TextField) getVbChoixPanoramique().lookup("#titreVisite");
                if (!tfVisite.getText().equals("")) {
                    strTit = tfVisite.getText();
                }

                strContenuFichier += "      afftitre=\"oui\"\n" + "      titre2=\""
                        + getPanoramiquesProjet()[i].getStrTitrePanoramique() + "\"\n";

            } else {
                strContenuFichier += "      afftitre=\"non\"\n";
            }
            int taillePolice2 = (int) Math.round(
                    Double.parseDouble(getGestionnaireInterface().getStrTitrePoliceTaille()) * 3.d / 4.d);
            strContenuFichier += "      titrePosition=\"" + getGestionnaireInterface().getStrTitrePosition()
                    + "\"\n" + "      titreDecalage=\""
                    + Math.round(getGestionnaireInterface().getTitreDecalage()) + "px\"\n"
                    + "      titrePolice=\"" + getGestionnaireInterface().getStrTitrePoliceNom() + "\"\n"
                    + "      titreTaillePolice=\""
                    + Math.round(Double.parseDouble(getGestionnaireInterface().getStrTitrePoliceTaille()))
                    + "px\"\n" + "      titreTaillePolice2=\"" + taillePolice2 + "px\"\n"
                    + "      titreCalque=\"" + getGestionnaireInterface().getiCalqueTitre() + "\"\n";

            if (getGestionnaireInterface().isbTitreAdapte()) {
                strContenuFichier += "      titreTaille=\"adapte\"\n";
            } else {
                strContenuFichier += "      titreTaille=\""
                        + Math.round(getGestionnaireInterface().getTitreTaille()) + "%\"\n";
            }
            strContenuFichier += "      titreFond=\"" + strCoulFondTitre + "\"\n" + "      titreCouleur=\""
                    + getGestionnaireInterface().getStrCouleurTitre() + "\"\n" + "      type=\""
                    + getPanoramiquesProjet()[i].getStrTypePanoramique() + "\"\n" + "      multiReso=\"oui\"\n"
                    + "      nombreNiveaux=\"" + getPanoramiquesProjet()[i].getNombreNiveaux() + "\"\n"
                    + "      zeroNord=\"" + zN + "\"\n" + "      regardX=\"" + regX + "\"\n"
                    + "      regardY=\""
                    + Math.round((getPanoramiquesProjet()[i].getRegardY() * 1000) + 0.002) / 1000 + "\"\n"
                    + "      minFOV=\"" + Math.round((getPanoramiquesProjet()[i].getFovMin() * 200)) / 100
                    + "\"\n" + "      maxFOV=\""
                    + Math.round((getPanoramiquesProjet()[i].getFovMax() * 200)) / 100 + "\"\n"
                    + "      champVisuel=\""
                    + Math.round((getPanoramiquesProjet()[i].getChampVisuel() + 0.002) * 1000) / 1000 + "\"\n";

            if (getPanoramiquesProjet()[i].getMinLat() != -1000 && getPanoramiquesProjet()[i].isbMinLat()) {
                strContenuFichier += "      minLat=\""
                        + Math.round((getPanoramiquesProjet()[i].getMinLat() + 0.002) * 1000) / 1000 + "\"\n";
            }
            if (getPanoramiquesProjet()[i].getMaxLat() != 1000 && getPanoramiquesProjet()[i].isbMaxLat()) {
                strContenuFichier += "      maxLat=\""
                        + Math.round((getPanoramiquesProjet()[i].getMaxLat() + 0.002) * 1000) / 1000 + "\"\n";
            }
            strContenuFichier += "      autorotation=\"" + strAutorotation + "\"\n" + "      vitesseAR=\""
                    + getiAutoRotationVitesse() + "\"\n" + "      autotour=\"" + strAutoTour + "\"\n"
                    + "      atBouton=\"" + strAutoTourBouton + "\"\n" + "      atBoutonTaille=\""
                    + getGestionnaireInterface().getTailleBoutonVisiteAuto() + "\"\n"
                    + "      atBoutonPositionX=\""
                    + getGestionnaireInterface().getStrPositionXBoutonVisiteAuto() + "\"\n"
                    + "      atBoutonPositionY=\""
                    + getGestionnaireInterface().getStrPositionYBoutonVisiteAuto() + "\"\n"
                    + "      atBoutonOffsetX=\"" + getGestionnaireInterface().getOffsetXBoutonVisiteAuto()
                    + "\"\n" + "      atBoutonOffsetY=\""
                    + getGestionnaireInterface().getOffsetYBoutonVisiteAuto() + "\"\n" + "      atCalque=\""
                    + getGestionnaireInterface().getiCalqueVisiteAuto() + "\"\n" + "      typeAT=\""
                    + getStrAutoTourType() + "\"\n" + "      limiteAT=\"" + getiAutoTourLimite() + "\"\n"
                    + "      demarrageAT=\"" + getiAutoTourDemarrage() + "\"\n" + "      affinfo=\""
                    + strAffInfo + "\"\n";
            if (getPanoramiquesProjet()[i].getStrNomFichier()
                    .substring(getPanoramiquesProjet()[i].getStrNomFichier().lastIndexOf(File.separator) + 1,
                            getPanoramiquesProjet()[i].getStrNomFichier().length())
                    .split("\\.")[0].equals(strPanoEntree) && isbPetitePlaneteDemarrage()) {
                strContenuFichier += "      petitePlanete=\"" + strIntroPetitePlanete + "\"\n";
            }
            if (getPanoramiquesProjet()[i].getStrNomFichier()
                    .substring(getPanoramiquesProjet()[i].getStrNomFichier().lastIndexOf(File.separator) + 1,
                            getPanoramiquesProjet()[i].getStrNomFichier().length())
                    .split("\\.")[0].equals(strPanoEntree)
                    && getGestionnaireInterface().isbReplieDemarragePlan()) {
                strContenuFichier += "      repliePlan=\"oui\"\n";
            }
            if (getPanoramiquesProjet()[i].getStrNomFichier()
                    .substring(getPanoramiquesProjet()[i].getStrNomFichier().lastIndexOf(File.separator) + 1,
                            getPanoramiquesProjet()[i].getStrNomFichier().length())
                    .split("\\.")[0].equals(strPanoEntree)
                    && getGestionnaireInterface().isbReplieDemarrageCarte()) {
                strContenuFichier += "      replieCarte=\"oui\"\n";
            }
            if (getPanoramiquesProjet()[i].getStrNomFichier()
                    .substring(getPanoramiquesProjet()[i].getStrNomFichier().lastIndexOf(File.separator) + 1,
                            getPanoramiquesProjet()[i].getStrNomFichier().length())
                    .split("\\.")[0].equals(strPanoEntree)
                    && getGestionnaireInterface().isbReplieDemarrageVignettes()) {
                strContenuFichier += "      replieVignettes=\"oui\"\n";
            }

            strContenuFichier += "   />\n";
            if (getGestionnaireInterface().getStrVisibiliteBarreClassique().equals("oui")) {
                strContenuFichier += "   <!--Dfinition de la Barre de navigation-->\n" + "   <boutons \n"
                        + "      styleBoutons=\"navigation\"\n" + "      couleur=\"rgba(255,255,255,0)\"\n"
                        + "      bordure=\"rgba(255,255,255,0)\"\n" + "      deplacements=\""
                        + getGestionnaireInterface().getStrDeplacementsBarreClassique() + "\" \n"
                        + "      zoom=\"" + getGestionnaireInterface().getStrZoomBarreClassique() + "\" \n"
                        + "      outils=\"" + getGestionnaireInterface().getStrOutilsBarreClassique() + "\"\n"
                        + "      fs=\"" + getGestionnaireInterface().getStrPleinEcranBarreClassique() + "\" \n"
                        + "      souris=\"" + getGestionnaireInterface().getStrSourisBarreClassique() + "\" \n"
                        + "      rotation=\"" + getGestionnaireInterface().getStrRotationBarreClassique()
                        + "\" \n" + "      positionX=\""
                        + getGestionnaireInterface().getStrPositionBarreClassique().split(":")[1] + "\"\n"
                        + "      positionY=\""
                        + getGestionnaireInterface().getStrPositionBarreClassique().split(":")[0] + "\" \n"
                        + "      barreCCalque=\"" + getGestionnaireInterface().getiCalqueBarreClassique()
                        + "\"\n" + "      dX=\"" + getGestionnaireInterface().getOffsetXBarreClassique()
                        + "\" \n" + "      dY=\"" + getGestionnaireInterface().getOffsetYBarreClassique()
                        + "\"\n" + "      espacement=\""
                        + Math.round(getGestionnaireInterface().getEspacementBarreClassique()) + "\"\n"
                        + "      visible=\"" + getGestionnaireInterface().getStrVisibiliteBarreClassique()
                        + "\"\n" + "   />\n";
            }
            if (getGestionnaireInterface().getStrVisibiliteBarrePersonnalisee().equals("oui")) {
                strContenuFichier += "<!--  Barre de Navigation Personnalise -->\n\n" + "    <telecommande\n"
                        + "        fs=\"" + getGestionnaireInterface().getStrPleinEcranBarrePersonnalisee()
                        + "\" \n" + "        souris=\""
                        + getGestionnaireInterface().getStrSourisBarrePersonnalisee() + "\" \n"
                        + "        rotation=\"" + getGestionnaireInterface().getStrRotationBarrePersonnalisee()
                        + "\" \n" + "        info=\""
                        + getGestionnaireInterface().getStrInfoBarrePersonnalisee() + "\"\n" + "        aide=\""
                        + getGestionnaireInterface().getStrAideBarrePersonnalisee() + "\"\n"
                        + "        positionX=\""
                        + getGestionnaireInterface().getStrPositionBarrePersonnalisee().split(":")[1] + "\"\n"
                        + "        positionY=\""
                        + getGestionnaireInterface().getStrPositionBarrePersonnalisee().split(":")[0] + "\" \n"
                        + "        taille=\"" + getGestionnaireInterface().getTailleBarrePersonnalisee()
                        + "\"\n" + "        tailleBouton=\""
                        + getGestionnaireInterface().getTailleIconesBarrePersonnalisee() + "\"\n"
                        + "        dX=\"" + getGestionnaireInterface().getOffsetXBarrePersonnalisee() + "\" \n"
                        + "        dY=\"" + getGestionnaireInterface().getOffsetYBarrePersonnalisee() + "\"\n"
                        + "        barrePCalque=\"" + getGestionnaireInterface().getiCalqueBarrePersonnalisee()
                        + "\"\n" + "        lien1=\""
                        + getGestionnaireInterface().getStrLien1BarrePersonnalisee() + "\"\n"
                        + "        lien2=\"" + getGestionnaireInterface().getStrLien2BarrePersonnalisee()
                        + "\"\n" + "        visible=\"oui\">\n";
                for (int ij = 0; ij < getGestionnaireInterface().getiNombreZonesBarrePersonnalisee(); ij++) {
                    strContenuFichier += "        <zoneNavPerso " + "id=\""
                            + getGestionnaireInterface().getZonesBarrePersonnalisee()[ij].getStrIdZone() + "\" "
                            + "alt=\"\" title=\"\" " + "shape=\""
                            + getGestionnaireInterface().getZonesBarrePersonnalisee()[ij].getStrTypeZone()
                            + "\" " + "coords=\"" + getGestionnaireInterface().getZonesBarrePersonnalisee()[ij]
                                    .getStrCoordonneesZone()
                            + "\"" + " />\n";
                }
                strContenuFichier += "    </telecommande>\n" + "";
            }
            if (getGestionnaireInterface().isbAfficheBoussole()) {
                String strAiguille = (getGestionnaireInterface().isbAiguilleMobileBoussole()) ? "oui" : "non";
                strContenuFichier += "<!--  Boussole -->\n" + "    <boussole \n" + "        affiche=\"oui\"\n"
                        + "        image=\"" + getGestionnaireInterface().getStrImageBoussole() + "\"\n"
                        + "        taille=\"" + getGestionnaireInterface().getTailleBoussole() + "\"\n"
                        + "        positionY=\""
                        + getGestionnaireInterface().getStrPositionBoussole().split(":")[0] + "\"\n"
                        + "        positionX=\""
                        + getGestionnaireInterface().getStrPositionBoussole().split(":")[1] + "\"\n"
                        + "        opacite=\"" + getGestionnaireInterface().getOpaciteBoussole() + "\"\n"
                        + "        dX=\"" + getGestionnaireInterface().getOffsetXBoussole() + "\"\n"
                        + "        dY=\"" + getGestionnaireInterface().getOffsetYBoussole() + "\"\n"
                        + "        boussoleCalque=\"" + getGestionnaireInterface().getiCalqueBoussole() + "\"\n"
                        + "        aiguille=\"" + strAiguille + "\"\n" + "    />\n";
            }
            if (getGestionnaireInterface().isbFenetreInfoPersonnalise()) {
                String strImgInfoURL = "images/"
                        + getGestionnaireInterface().getStrFenetreInfoImage().substring(
                                getGestionnaireInterface().getStrFenetreInfoImage().lastIndexOf(File.separator)
                                        + 1,
                                getGestionnaireInterface().getStrFenetreInfoImage().length());
                strContenuFichier += "<!--  Fentre info personnalise -->\n" + "    <fenetreInfo \n"
                        + "        affiche=\"oui\"\n" + "        image=\"" + strImgInfoURL + "\"\n"
                        + "        taille=\"" + getGestionnaireInterface().getFenetreInfoTaille() + "\"\n"
                        + "        opacite=\"" + getGestionnaireInterface().getFenetreInfoOpacite() + "\"\n"
                        + "        dX=\""
                        + Math.round(getGestionnaireInterface().getFenetreInfoPosX() * 10) / 10 + "\"\n"
                        + "        dY=\""
                        + Math.round(getGestionnaireInterface().getFenetreInfoPosY() * 10) / 10 + "\"\n"
                        + "        URL=\"" + getGestionnaireInterface().getStrFenetreURL() + "\"\n"
                        + "        texteURL=\"" + getGestionnaireInterface().getStrFenetreTexteURL() + "\"\n"
                        + "        couleurURL=\"" + getGestionnaireInterface().getStrFenetreURLCouleur()
                        + "\"\n" + "        TailleURL=\""
                        + Math.round(getGestionnaireInterface().getFenetrePoliceTaille() * 10) / 10 + "\"\n"
                        + "        URLdX=\""
                        + Math.round(getGestionnaireInterface().getFenetreURLPosX() * 10) / 10 + "\"\n"
                        + "        URLdY=\""
                        + Math.round(getGestionnaireInterface().getFenetreURLPosY() * 10) / 10 + "\"\n"
                        + "    />\n";
            }
            if (getGestionnaireInterface().isbFenetreAidePersonnalise()) {
                String strImgAideURL = "images/"
                        + getGestionnaireInterface().getStrFenetreAideImage().substring(
                                getGestionnaireInterface().getStrFenetreAideImage().lastIndexOf(File.separator)
                                        + 1,
                                getGestionnaireInterface().getStrFenetreAideImage().length());
                strContenuFichier += "<!--  Fentre Aide personnalise -->\n" + "    <fenetreAide \n"
                        + "        affiche=\"oui\"\n" + "        image=\"" + strImgAideURL + "\"\n"
                        + "        taille=\"" + getGestionnaireInterface().getFenetreAideTaille() + "\"\n"
                        + "        opacite=\"" + getGestionnaireInterface().getFenetreAideOpacite() + "\"\n"
                        + "        dX=\"" + getGestionnaireInterface().getFenetreAidePosX() + "\"\n"
                        + "        dY=\"" + getGestionnaireInterface().getFenetreAidePosY() + "\"\n"
                        + "    />\n";
            }
            if (getGestionnaireInterface().isbAfficheMenuContextuel()) {
                String strPrecSuiv = (getGestionnaireInterface().isbAffichePrecSuivMC()) ? "oui" : "non";
                String strPlanet = (getGestionnaireInterface().isbAffichePlanetNormalMC()) ? "oui" : "non";
                String strPers1 = (getGestionnaireInterface().isbAffichePersMC1()) ? "oui" : "non";
                String strPers2 = (getGestionnaireInterface().isbAffichePersMC2()) ? "oui" : "non";
                strContenuFichier += "<!--  MenuContextuel -->\n" + "    <menuContextuel \n"
                        + "        affiche=\"oui\"\n" + "        precSuiv=\"" + strPrecSuiv + "\"\n"
                        + "        planete=\"" + strPlanet + "\"\n" + "        pers1=\"" + strPers1 + "\"\n"
                        + "        lib1=\"" + getGestionnaireInterface().getStrPersLib1() + "\"\n"
                        + "        url1=\"" + getGestionnaireInterface().getStrPersURL1() + "\"\n"
                        + "        pers2=\"" + strPers2 + "\"\n" + "        lib2=\""
                        + getGestionnaireInterface().getStrPersLib2() + "\"\n" + "        url2=\""
                        + getGestionnaireInterface().getStrPersURL2() + "\"\n" + "    />\n";
            }

            int iPanoSuivant = (ii == ordPano.getStrPanos().size() - 1) ? 0 : ii + 1;
            int iPanoPrecedent = (ii == 0) ? ordPano.getStrPanos().size() - 1 : ii - 1;
            String strNomPano = "panovisu" + iPanoSuivant;
            String strPanoSuivant = "xml/" + strNomPano + ".xml";
            strNomPano = "panovisu" + iPanoPrecedent;
            String strPanoPrecedent = "xml/" + strNomPano + ".xml";
            strContenuFichier += "<!--  Bouton Suivant Precedent -->\n" + "    <suivantPrecedent\n"
                    + "        suivPrecCalque=\"" + getGestionnaireInterface().getiCalqueSuivPrec() + "\"\n"
                    + "        suivant=\"" + strPanoSuivant + "\"            \n" + "        precedent=\""
                    + strPanoPrecedent + "\"            \n";
            if (getGestionnaireInterface().isbSuivantPrecedent()) {
                strContenuFichier += "        afficheSuivantPrecedent=\"oui\"            \n";

            }
            strContenuFichier += "    />    \n" + "";
            String strbAffichemasque = (getGestionnaireInterface().isbAfficheMasque()) ? "oui" : "non";
            String strNavigation = (getGestionnaireInterface().isbMasqueNavigation()) ? "oui" : "non";
            String strBoussole = (getGestionnaireInterface().isbMasqueBoussole()) ? "oui" : "non";
            String strTitre = (getGestionnaireInterface().isbMasqueTitre()) ? "oui" : "non";
            String strPlan = (getGestionnaireInterface().isbMasquePlan()) ? "oui" : "non";
            String strReseaux = (getGestionnaireInterface().isbMasqueReseaux()) ? "oui" : "non";
            String strVignettes = (getGestionnaireInterface().isbMasqueVignettes()) ? "oui" : "non";
            String strCombo = (getGestionnaireInterface().isbMasqueCombo()) ? "oui" : "non";
            String strSuivPrec = (getGestionnaireInterface().isbMasqueSuivPrec()) ? "oui" : "non";
            String strHotspots = (getGestionnaireInterface().isbMasqueHotspots()) ? "oui" : "non";
            strContenuFichier += "<!--  Bouton de Masquage -->\n" + "    <marcheArret \n" + "        affiche=\""
                    + strbAffichemasque + "\"\n" + "        image=\"MA.png\"\n" + "        taille=\""
                    + getGestionnaireInterface().getTailleMasque() + "\"\n" + "        positionY=\""
                    + getGestionnaireInterface().getStrPositionMasque().split(":")[0] + "\"\n"
                    + "        positionX=\"" + getGestionnaireInterface().getStrPositionMasque().split(":")[1]
                    + "\"\n" + "        opacite=\"" + getGestionnaireInterface().getOpaciteMasque() + "\"\n"
                    + "        dX=\"" + getGestionnaireInterface().getdXMasque() + "\"\n" + "        dY=\""
                    + getGestionnaireInterface().getdYMasque() + "\"\n" + "        navigation=\""
                    + strNavigation + "\"\n" + "        boussole=\"" + strBoussole + "\"\n" + "        titre=\""
                    + strTitre + "\"\n" + "        plan=\"" + strPlan + "\"\n" + "        reseaux=\""
                    + strReseaux + "\"\n" + "        masquageCalque=\""
                    + getGestionnaireInterface().getiCalqueMasquage() + "\"\n" + "        vignettes=\""
                    + strVignettes + "\"\n" + "        combo=\"" + strCombo + "\"\n" + "        suivPrec=\""
                    + strSuivPrec + "\"\n" + "        hotspots=\"" + strHotspots + "\"\n" + "    />\n";

            if (getGestionnaireInterface().isbAfficheReseauxSociaux()) {
                String strTwitter = (getGestionnaireInterface().isbReseauxSociauxTwitter()) ? "oui" : "non";
                String strGoogle = (getGestionnaireInterface().isbReseauxSociauxGoogle()) ? "oui" : "non";
                String strFacebook = (getGestionnaireInterface().isbReseauxSociauxFacebook()) ? "oui" : "non";
                String strEmail = (getGestionnaireInterface().isbReseauxSociauxEmail()) ? "oui" : "non";
                strContenuFichier += "<!--  Rseaux Sociaux -->\n" + "    <reseauxSociaux \n"
                        + "        affiche=\"oui\"\n" + "        taille=\""
                        + getGestionnaireInterface().getTailleReseauxSociaux() + "\"\n" + "        positionY=\""
                        + getGestionnaireInterface().getStrPositionReseauxSociaux().split(":")[0] + "\"\n"
                        + "        positionX=\""
                        + getGestionnaireInterface().getStrPositionReseauxSociaux().split(":")[1] + "\"\n"
                        + "        opacite=\"" + getGestionnaireInterface().getOpaciteReseauxSociaux() + "\"\n"
                        + "        dX=\"" + getGestionnaireInterface().getdXReseauxSociaux() + "\"\n"
                        + "        dY=\"" + getGestionnaireInterface().getdYReseauxSociaux() + "\"\n"
                        + "        partageCalque=\"" + getGestionnaireInterface().getiCalquePartage() + "\"\n"
                        + "        twitter=\"" + strTwitter + "\"\n" + "        google=\"" + strGoogle + "\"\n"
                        + "        facebook=\"" + strFacebook + "\"\n" + "        email=\"" + strEmail + "\"\n"
                        + "    />\n";
            }
            if (getGestionnaireInterface().isbAfficheVignettes()) {
                int iRougeVig = (int) (Color.valueOf(getGestionnaireInterface().getStrCouleurFondVignettes())
                        .getRed() * 255.d);
                int iBleuVig = (int) (Color.valueOf(getGestionnaireInterface().getStrCouleurFondVignettes())
                        .getBlue() * 255.d);
                int iVertVig = (int) (Color.valueOf(getGestionnaireInterface().getStrCouleurFondVignettes())
                        .getGreen() * 255.d);
                String strCoulVig = "rgba(" + iRougeVig + "," + iVertVig + "," + iBleuVig + ","
                        + getGestionnaireInterface().getOpaciteVignettes() + ")";
                String strAfficheVignettes = (getGestionnaireInterface().isbAfficheVignettes()) ? "oui" : "non";
                strContenuFichier += "<!-- Barre des vignettes -->" + "    <vignettes \n" + "        affiche=\""
                        + strAfficheVignettes + "\"\n" + "        tailleImage=\""
                        + getGestionnaireInterface().getTailleImageVignettes() + "\"\n"
                        + "        fondCouleur=\"" + strCoulVig + "\"\n" + "        texteCouleur=\""
                        + getGestionnaireInterface().getStrCouleurTexteVignettes() + "\"\n"
                        + "        opacite=\"1.0\"\n" + "        vignettesCalque=\""
                        + getGestionnaireInterface().getiCalqueVignettes() + "\"\n" + "        position=\""
                        + getGestionnaireInterface().getStrPositionVignettes() + "\"\n" + "    >\n";
                for (int jj = 0; jj < ordPano.getStrPanos().size(); jj++) {
                    int j = Integer.parseInt(ordPano.getStrPanos().get(jj));
                    String strNomPan1 = getPanoramiquesProjet()[j].getStrNomFichier();
                    String strFichier = "panovisu" + j + "Vignette.jpg";
                    String strXML = "panovisu" + j + ".xml";
                    ReadWriteImage.writeJpeg(getPanoramiquesProjet()[j].getImgVignettePanoramique(),
                            getStrRepertTemp() + "/panos/" + strFichier, 1.0f, false, 0.0f);
                    strContenuFichier += "        <imageVignette \n" + "            image=\"panos/" + strFichier
                            + "\"\n" + "            xml=\"xml/" + strXML + "\"\n" + "            infoBulle=\""
                            + getPanoramiquesProjet()[j].getStrTitrePanoramique() + "\"\n" + "        />\n";
                }
                strContenuFichier += "    </vignettes>       \n" + "";

            }
            if (getGestionnaireInterface().isbAfficheComboMenu()) {
                String strAfficheComboMenu = (getGestionnaireInterface().isbAfficheComboMenu()) ? "oui" : "non";
                TextField tfTitreVisite = (TextField) getVbChoixPanoramique().lookup("#titreVisite");
                String strTitreVisite1 = tfTitreVisite.getText();
                strContenuFichier += "<!-- Barre des comboMenu -->" + "    <comboMenu \n" + "        affiche=\""
                        + strAfficheComboMenu + "\"\n" + "        positionX=\""
                        + getGestionnaireInterface().getStrPositionXComboMenu() + "\"\n"
                        + "        positionY=\"" + getGestionnaireInterface().getStrPositionYComboMenu()
                        + "\"\n" + "        dX=\"" + getGestionnaireInterface().getOffsetXComboMenu() + "\"\n"
                        + "        comboCalque=\"" + getGestionnaireInterface().getiCalqueMenuPanoramiques()
                        + "\"\n" + "        dY=\"" + getGestionnaireInterface().getOffsetYComboMenu() + "\"\n"
                        + "    >\n";
                for (int jj = 0; jj < ordPano.getStrPanos().size(); jj++) {
                    int j = Integer.parseInt(ordPano.getStrPanos().get(jj));
                    String strNomPan2 = getPanoramiquesProjet()[j].getStrNomFichier();
                    String strFichier = "panovisu" + j + "Vignette.jpg";
                    String strXML = "panovisu" + j + ".xml";
                    ReadWriteImage.writeJpeg(getPanoramiquesProjet()[j].getImgVignettePanoramique(),
                            getStrRepertTemp() + "/panos/" + strFichier, 1.0f, false, 0.0f);

                    strContenuFichier += "        <imageComboMenu \n";
                    if (getGestionnaireInterface().isbAfficheComboMenuImages()) {
                        strContenuFichier += "            image=\"panos/" + strFichier + "\"\n";
                    }
                    if (i == j) {
                        strContenuFichier += "            selectionne=\"selected\"\n";
                    }
                    strContenuFichier += "            xml=\"xml/" + strXML + "\"\n" + "            titre=\""
                            + getPanoramiquesProjet()[j].getStrTitrePanoramique() + "\"\n"
                            + "            sousTitre=\"" + strTitreVisite1 + "\"\n" + "        />\n";
                }
                strContenuFichier += "    </comboMenu>       \n" + "";

            }

            strContenuFichier += "    <!--Dfinition des hotspots-->  \n" + "   <hotspots>\n";
            for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspots(); j++) {
                HotSpot HS = getPanoramiquesProjet()[i].getHotspot(j);
                double longit;
                if (getPanoramiquesProjet()[i].getStrTypePanoramique().equals(Panoramique.SPHERE)) {
                    longit = HS.getLongitude() - 180;
                } else {
                    longit = HS.getLongitude() + 90;
                }
                String strAnime = (HS.isAnime()) ? "true" : "false";
                strContenuFichier += "      <point \n" + "           type=\"panoramique\"\n"
                        + "           long=\"" + longit + "\"\n" + "           lat=\"" + HS.getLatitude()
                        + "\"\n" + "           tailleHS=\""
                        + getGestionnaireInterface().getiTailleHotspotsPanoramique() + "px\"\n";
                if (!strTypeHS.equals("gif")) {
                    strContenuFichier += "           image=\"panovisu/images/hotspots/hotspot.png\"\n";
                } else {
                    String strNomHSGif = strNomfichierHS
                            .substring(strNomfichierHS.lastIndexOf(File.separator) + 1);
                    strContenuFichier += "           image=\"panovisu/images/hotspots/" + strNomHSGif + "\"\n";
                }
                strContenuFichier += "           xml=\"xml/panovisu" + HS.getNumeroPano() + ".xml\"\n";
                if (HS.getRegardX() != 1000) {
                    strContenuFichier += "           regardX=\"" + HS.getRegardX() + "\"\n";
                }
                if (HS.getRegardY() != 1000) {
                    strContenuFichier += "           regardY=\"" + HS.getRegardY() + "\"\n";
                }
                if (HS.getChampVisuel() != 0) {
                    strContenuFichier += "           champVisuel=\"" + HS.getChampVisuel() + "\"\n";
                }
                strContenuFichier += "           info=\""
                        + HS.getStrInfo().replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;")
                        + "\"\n" + "           anime=\"" + strAnime + "\"\n" + "      />\n";
            }
            for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspotHTML(); j++) {
                HotspotHTML HS = getPanoramiquesProjet()[i].getHotspotHTML(j);
                String strUrlHTML;
                if (!HS.isbLienExterieur()) {
                    HS.creeHTML(strHTMLPanoRepert + "/page" + j);
                    strUrlHTML = "pagesHTML/" + i + "/page" + j + "/index.html";
                } else {
                    strUrlHTML = HS.getStrURLExterieure();
                }
                Color coulTitreHTML = Color.valueOf(HS.getStrCouleurHTML());
                iRouge = (int) (coulTitreHTML.getRed() * 255.d);
                iBleu = (int) (coulTitreHTML.getBlue() * 255.d);
                iVert = (int) (coulTitreHTML.getGreen() * 255.d);
                String strCoulHTML = "rgba(" + iRouge + "," + iVert + "," + iBleu + ","
                        + Math.round(HS.getOpaciteHTML() * 100.d) / 100.d + ")";
                double longit;
                if (getPanoramiquesProjet()[i].getStrTypePanoramique().equals(Panoramique.SPHERE)) {
                    longit = HS.getLongitude() - 180;
                } else {
                    longit = HS.getLongitude() + 90;
                }
                String strAnime = (HS.isAnime()) ? "true" : "false";

                strContenuFichier += "      <point \n" + "           type=\"html\"\n" + "           long=\""
                        + longit + "\"\n" + "           lat=\"" + HS.getLatitude() + "\"\n"
                        + "           tailleHS=\"" + getGestionnaireInterface().getiTailleHotspotsHTML()
                        + "px\"\n";
                if (!strTypeHSHTML.equals("gif")) {
                    strContenuFichier += "           image=\"panovisu/images/hotspots/hotspotHTML.png\"\n";
                } else {
                    String strNomHSGif = strNomfichierHSHTML
                            .substring(strNomfichierHSHTML.lastIndexOf(File.separator) + 1);
                    strContenuFichier += "           image=\"panovisu/images/hotspots/" + strNomHSGif + "\"\n";
                }
                strContenuFichier += "           url=\"" + strUrlHTML + "\"\n" + "           info=\""
                        + HS.getStrInfo().replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;")
                        + "\"\n" + "           taille=\"" + Math.round(HS.getLargeurHTML()) + "px\"\n"
                        + "           position=\"" + HS.getStrPositionHTML() + "\"\n" + "           couleur=\""
                        + strCoulHTML + "\"\n" + "           anime=\"" + strAnime + "\"\n" + "      />\n";
            }

            for (int j = 0; j < getPanoramiquesProjet()[i].getiNombreHotspotDiapo(); j++) {
                HotspotDiaporama HS = getPanoramiquesProjet()[i].getHotspotDiapo(j);
                String strUrlHTML;

                strUrlHTML = "diaporama/diapo" + HS.getiNumDiapo() + ".html";

                Color coulTitreHTML = Color.valueOf(diaporamas[HS.getiNumDiapo()].getStrCouleurFondDiaporama());
                iRouge = (int) (coulTitreHTML.getRed() * 255.d);
                iBleu = (int) (coulTitreHTML.getBlue() * 255.d);
                iVert = (int) (coulTitreHTML.getGreen() * 255.d);
                String strCoulHTML = "rgba(" + iRouge + "," + iVert + "," + iBleu + ","
                        + Math.round(diaporamas[HS.getiNumDiapo()].getOpaciteDiaporama() * 100.d) / 100.d + ")";
                double longit;
                if (getPanoramiquesProjet()[i].getStrTypePanoramique().equals(Panoramique.SPHERE)) {
                    longit = HS.getLongitude() - 180;
                } else {
                    longit = HS.getLongitude() + 90;
                }
                String strAnime = (HS.isbAnime()) ? "true" : "false";

                strContenuFichier += "      <point \n" + "           type=\"html\"\n" + "           long=\""
                        + longit + "\"\n" + "           lat=\"" + HS.getLatitude() + "\"\n"
                        + "           tailleHS=\"" + getGestionnaireInterface().getiTailleHotspotsImage()
                        + "px\"\n";
                if (!strTypeHSImage.equals("gif")) {
                    strContenuFichier += "           image=\"panovisu/images/hotspots/hotspotImage.png\"\n";
                } else {
                    String strNomHSGif = strNomfichierHSImage
                            .substring(strNomfichierHSImage.lastIndexOf(File.separator) + 1);
                    strContenuFichier += "           image=\"panovisu/images/hotspots/" + strNomHSGif + "\"\n";
                }
                strContenuFichier += "           url=\"" + strUrlHTML + "\"\n" + "           taille=\"90%\"\n"
                        + "           info=\""
                        + HS.getStrInfo().replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;")
                        + "\"\n" + "           couleur=\"" + strCoulHTML + "\"\n" + "           anime=\""
                        + strAnime + "\"\n" + "      />\n";
            }

            for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspotImage(); j++) {
                HotspotImage HS = getPanoramiquesProjet()[i].getHotspotImage(j);
                String strCouleurFondImage = HS.getStrCouleurFond();
                if (strCouleurFondImage.equals("")) {
                    strCouleurFondImage = "#"
                            + getGestionnaireInterface().getCouleurFondTheme().toString().substring(2, 8);
                }
                double opaciteImage = HS.getOpacite();
                if (opaciteImage == -1) {
                    opaciteImage = getGestionnaireInterface().getOpaciteTheme();
                }
                Color coulImage = Color.valueOf(strCouleurFondImage);
                iRouge = (int) (coulImage.getRed() * 255.d);
                iBleu = (int) (coulImage.getBlue() * 255.d);
                iVert = (int) (coulImage.getGreen() * 255.d);
                String strCoulImage = "rgba(" + iRouge + "," + iVert + "," + iBleu + ","
                        + Math.round(opaciteImage * 100.d) / 100.d + ")";

                double longit;
                if (getPanoramiquesProjet()[i].getStrTypePanoramique().equals(Panoramique.SPHERE)) {
                    longit = HS.getLongitude() - 180;
                } else {
                    longit = HS.getLongitude() + 90;
                }
                String strAnime = (HS.isAnime()) ? "true" : "false";
                strContenuFichier += "      <point \n" + "           type=\"image\"\n" + "           long=\""
                        + longit + "\"\n" + "           lat=\"" + HS.getLatitude() + "\"\n"
                        + "           tailleHS=\"" + getGestionnaireInterface().getiTailleHotspotsImage()
                        + "px\"\n";
                if (!strTypeHSImage.equals("gif")) {
                    strContenuFichier += "           image=\"panovisu/images/hotspots/hotspotImage.png\"\n";
                } else {
                    String strNomHSGif = strNomfichierHSImage
                            .substring(strNomfichierHSImage.lastIndexOf(File.separator) + 1);
                    strContenuFichier += "           image=\"panovisu/images/hotspots/" + strNomHSGif + "\"\n";
                }
                strContenuFichier += "           img=\"images/" + HS.getStrLienImg() + "\"\n"
                        + "           info=\""
                        + HS.getStrInfo().replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;")
                        + "\"\n" + "           couleur=\"" + strCoulImage + "\"\n" + "           anime=\""
                        + strAnime + "\"\n" + "      />\n";
            }
            strContenuFichier += "   </hotspots>\n";
            strContenuFichier += "\n" + "<!-- Dfinition des images de fond -->\n" + "\n";
            if (getGestionnaireInterface().getiNombreImagesFond() > 0) {
                for (int k = 0; k < getGestionnaireInterface().getiNombreImagesFond(); k++) {
                    ImageFond imgFond = getGestionnaireInterface().getImagesFond()[k];
                    String strImgFond = "images/" + imgFond.getStrFichierImage().substring(
                            imgFond.getStrFichierImage().lastIndexOf(File.separator) + 1,
                            imgFond.getStrFichierImage().length());
                    String strMasquable = (imgFond.isMasquable()) ? "oui" : "non";

                    strContenuFichier += "    <imageFond\n"
                            + "        fichier=\"" + strImgFond + "\"\n" + "        posX=\"" + imgFond
                                    .getStrPosX()
                            + "\" \n" + "        posY=\"" + imgFond.getStrPosY() + "\" \n"
                            + "        offsetX=\"" + imgFond.getOffsetX() + "\" \n" + "        offsetY=\""
                            + imgFond.getOffsetY() + "\" \n" + "        tailleX=\"" + imgFond.getTailleX()
                            + "\" \n" + "        tailleY=\"" + imgFond.getTailleY() + "\" \n"
                            + "        opacite=\"" + imgFond.getOpacite() + "\" \n" + "        cible=\""
                            + imgFond.getStrCible() + "\" \n" + "        calque=\"" + imgFond.getiCalqueImage()
                            + "\"\n" + "        masquable=\"" + strMasquable + "\" \n" + "        url=\""
                            + imgFond.getStrUrl() + "\" \n" + "        infobulle=\"" + imgFond.getStrInfobulle()
                                    .replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;")
                            + "\" \n" + "    />\n" + "";
                }
            }
            if (getGestionnaireInterface().isbAffichePlan() && getPanoramiquesProjet()[i].isAffichePlan()) {
                int iNumPlan = getPanoramiquesProjet()[i].getNumeroPlan();
                Plan planPano = getPlans()[iNumPlan];
                iRouge = (int) (getGestionnaireInterface().getCouleurFondPlan().getRed() * 255.d);
                iBleu = (int) (getGestionnaireInterface().getCouleurFondPlan().getBlue() * 255.d);
                iVert = (int) (getGestionnaireInterface().getCouleurFondPlan().getGreen() * 255.d);
                String strAfficheRadar = (getGestionnaireInterface().isbAfficheRadar()) ? "oui" : "non";
                String strCoulFond = "rgba(" + iRouge + "," + iVert + "," + iBleu + ","
                        + getGestionnaireInterface().getOpacitePlan() + ")";
                strContenuFichier += "    <plan\n" + "        affiche=\"oui\" \n" + "        image=\"images/"
                        + planPano.getStrImagePlan() + "\"\n" + "        largeur=\""
                        + getGestionnaireInterface().getLargeurPlan() + "\"\n" + "        position=\""
                        + getGestionnaireInterface().getStrPositionPlan() + "\"\n" + "        couleurFond=\""
                        + strCoulFond + "\"\n" + "        couleurTexte=\"#"
                        + getGestionnaireInterface().getStrCouleurTextePlan() + "\"\n" + "        nord=\""
                        + planPano.getDirectionNord() + "\"\n" + "        planCalque=\""
                        + getGestionnaireInterface().getiCalquePlan() + "\"\n" + "        boussolePosition=\""
                        + planPano.getStrPosition() + "\"\n" + "        boussoleX=\"" + planPano.getPositionX()
                        + "\"\n" + "        boussoleY=\"" + planPano.getPositionX() + "\"\n"
                        + "        radarAffiche=\"" + strAfficheRadar + "\"\n" + "        radarTaille=\""
                        + Math.round(getGestionnaireInterface().getTailleRadar()) + "\"\n"
                        + "        radarCouleurFond=\"#" + getGestionnaireInterface().getStrCouleurFondRadar()
                        + "\"\n" + "        radarCouleurLigne=\"#"
                        + getGestionnaireInterface().getStrCouleurLigneRadar() + "\"\n"
                        + "        radarOpacite=\""
                        + Math.round(getGestionnaireInterface().getOpaciteRadar() * 100.d) / 100.d + "\"\n"
                        + "    >\n";
                for (int iPoint = 0; iPoint < planPano.getNombreHotspots(); iPoint++) {
                    double posX = planPano.getHotspot(iPoint).getLongitude()
                            * getGestionnaireInterface().getLargeurPlan();
                    double posY = planPano.getHotspot(iPoint).getLatitude() * planPano.getHauteurPlan()
                            * getGestionnaireInterface().getLargeurPlan() / planPano.getLargeurPlan();
                    if (planPano.getHotspot(iPoint).getNumeroPano() == i) {
                        strContenuFichier += "        <pointPlan\n" + "            positX=\"" + posX + "\"\n"
                                + "            positY=\"" + posY + "\"\n" + "            xml=\"actif\"\n"
                                + "            />  \n";

                    } else {
                        strContenuFichier += "        <pointPlan\n" + "            positX=\"" + posX + "\"\n"
                                + "            positY=\"" + posY + "\"\n" + "            xml=\"xml/panovisu"
                                + planPano.getHotspot(iPoint).getNumeroPano() + ".xml\"\n"
                                + "            texte=\"" + planPano.getHotspot(iPoint).getStrInfo() + "\"\n"
                                + "            />  \n";
                    }
                }
                strContenuFichier += "    </plan>\n";
            }

            if (getGestionnaireInterface().isbAfficheCarte()) {
                iRouge = (int) (getGestionnaireInterface().getCouleurFondCarte().getRed() * 255.d);
                iBleu = (int) (getGestionnaireInterface().getCouleurFondCarte().getBlue() * 255.d);
                iVert = (int) (getGestionnaireInterface().getCouleurFondCarte().getGreen() * 255.d);
                String strAfficheRadarCarte = (getGestionnaireInterface().isbAfficheRadarCarte()) ? "oui"
                        : "non";
                String strCoulFond = "rgba(" + iRouge + "," + iVert + "," + iBleu + ","
                        + getGestionnaireInterface().getOpaciteCarte() + ")";
                CoordonneesGeographiques coords;
                if (getGestionnaireInterface().getCoordCentreCarte() != null) {
                    coords = getGestionnaireInterface().getCoordCentreCarte();
                } else {
                    coords = getGestionnaireInterface().navigateurCarteOL.recupereCoordonnees();
                }
                strContenuFichier += "    <carte\n" + "        affiche=\"oui\" \n" + "        largeur=\""
                        + getGestionnaireInterface().getLargeurCarte() + "\"\n" + "        hauteur=\""
                        + getGestionnaireInterface().getHauteurCarte() + "\"\n" + "        zoom=\""
                        + (getGestionnaireInterface().getiFacteurZoomCarte() + 1) + "\"\n"
                        + "        coordCentreLong=\"" + coords.getLongitude() + "\"\n"
                        + "        coordCentreLat=\"" + coords.getLatitude() + "\"\n" + "        nomLayer=\""
                        + getGestionnaireInterface().getStrNomLayers() + "\"\n" + "        position=\""
                        + getGestionnaireInterface().getStrPositionCarte() + "\"\n" + "        carteCalque=\""
                        + getGestionnaireInterface().getiCalqueCarte() + "\"\n" + "        bingAPIKey=\""
                        + getStrBingAPIKey() + "\"\n" + "        couleurFond=\"" + strCoulFond + "\"\n"
                        + "        couleurTexte=\"#" + getGestionnaireInterface().getStrCouleurTexteCarte()
                        + "\"\n" + "        radarCarteAffiche=\"" + strAfficheRadarCarte + "\"\n"
                        + "        radarCarteTaille=\""
                        + Math.round(getGestionnaireInterface().getTailleRadarCarte()) + "\"\n"
                        + "        radarCarteCouleurFond=\"#"
                        + getGestionnaireInterface().getStrCouleurFondRadarCarte() + "\"\n"
                        + "        radarCarteCouleurLigne=\"#"
                        + getGestionnaireInterface().getStrCouleurLigneRadarCarte() + "\"\n"
                        + "        radarCarteOpacite=\""
                        + Math.round(getGestionnaireInterface().getOpaciteRadarCarte() * 100.d) / 100.d + "\"\n"
                        + "    >\n";
                for (int iPoint2 = 0; iPoint2 < getiNombrePanoramiques(); iPoint2++) {
                    if (getPanoramiquesProjet()[iPoint2].getMarqueurGeolocatisation() != null) {
                        double posX = getPanoramiquesProjet()[iPoint2].getMarqueurGeolocatisation()
                                .getLongitude();
                        double posY = getPanoramiquesProjet()[iPoint2].getMarqueurGeolocatisation()
                                .getLatitude();
                        String strFichierPano2 = getPanoramiquesProjet()[iPoint2].getStrNomFichier()
                                .substring(
                                        getPanoramiquesProjet()[iPoint2].getStrNomFichier()
                                                .lastIndexOf(File.separator) + 1,
                                        getPanoramiquesProjet()[iPoint2].getStrNomFichier().length())
                                .split("\\.")[0];
                        String strHTML = "<span style='font-family : Verdana,Arial,sans-serif;font-weight:bold;font-size : 12px;'>"
                                + getPanoramiquesProjet()[iPoint2].getStrTitrePanoramique() + "</span>";
                        strHTML = strHTML.replace("<", "&lt;").replace(">", "&gt;");
                        String strFichierXML = "panovisu" + iPoint2;
                        if (iPoint2 == i) {
                            strContenuFichier += "        <pointCarte\n" + "            positX=\"" + posX
                                    + "\"\n" + "            positY=\"" + posY + "\"\n"
                                    + "            xml=\"actif\"\n" + "            image=\"panos/"
                                    + strFichierXML + "Vignette.jpg\"\n" + "            html=\"" + strHTML
                                    + "\"\n" + "            />  \n";

                        } else {
                            strContenuFichier += "        <pointCarte\n" + "            positX=\"" + posX
                                    + "\"\n" + "            positY=\"" + posY + "\"\n"
                                    + "            xml=\"xml/" + strFichierXML + ".xml\"\n"
                                    + "            image=\"panos/" + strFichierXML + "Vignette.jpg\"\n"
                                    + "            html=\"" + strHTML + "\"\n" + "            />  \n";
                        }

                    }
                }
                strContenuFichier += "    </carte>\n";
            }

            strContenuFichier += "</scene>\n";
            String strFichPano = getPanoramiquesProjet()[i].getStrNomFichier();
            String strNomXMLFile = "panovisu" + i + ".xml";
            fileXML = new File(fileXMLRepert + File.separator + strNomXMLFile);
            fileXML.setWritable(true);
            OutputStreamWriter oswFichierXML = new OutputStreamWriter(new FileOutputStream(fileXML), "UTF-8");
            try (BufferedWriter bwFichierXML = new BufferedWriter(oswFichierXML)) {
                bwFichierXML.write(strContenuFichier);
            }
        }
        Rectangle2D tailleEcran = Screen.getPrimary().getBounds();
        int iHauteur = (int) tailleEcran.getHeight() - 200;
        String strTitreVis = "Panovisu - visualiseur 100% html5 (three.js)";
        TextField tfVisite = (TextField) getVbChoixPanoramique().lookup("#titreVisite");
        if (!tfVisite.getText().equals("")) {
            strTitreVis = tfVisite.getText();
        }
        String strNomPano1 = getPanoramiquesProjet()[0].getStrNomFichier();
        String strFPano1 = "panos/" + strNomPano1.substring(strNomPano1.lastIndexOf(File.separator) + 1,
                strNomPano1.lastIndexOf(".")) + "Vignette.jpg";

        String strFichierHTML = "<!DOCTYPE html>\n" + "<html lang=\"fr\">\n" + "    <head>\n"
                + "        <title>" + strTitreVis + "</title>\n" + "        <meta charset=\"utf-8\">\n"
                + "        <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0\">\n"
                + "        <link rel=\"stylesheet\" media=\"screen\" href=\"panovisu/libs/jquerymenu/jquery.contextMenu.css\" type=\"text/css\"/>\n"
                + "        <link rel=\"stylesheet\" type=\"text/css\" href=\"panovisu/css/msdropdown/dd.css\" />\n"
                + "        <meta name=\"url\" property=\"og:url\" content=\"\" />\n"
                + "        <meta property=\"og:title\"  name=\"twitter:title\" content=\"" + strTitreVis
                + "\" />\n"
                + "        <meta itemprop=\"description\" property=\"og:description\" name=\"twitter:description\" content=\"Une page cre avec panoVisu Editeur : 100% Libre 100% HTML5\" />\n"
                + "        <meta name=\"img\" property=\"og:image\" itemprop=\"image primaryImageOfPage\" content=\"./"
                + strFPano1 + "\" />\n"
                + "        <script type=\"text/javascript\" src=\"panovisu/libs/openlayers/OpenLayers.js\"></script>\n"
                + "        <script type=\"text/javascript\" src=\"panovisu/libs/openlayers/OpenStreetMap.js\"></script>\n"
                + "        <script src=\"http://maps.google.com/maps/api/js?v=3.5&sensor=false\" style=\"\"></script>\n"
                + "        <script src=\"http://maps.gstatic.com/maps-api-v3/api/js/20/13/intl/fr_ALL/main.js\"></script>\n"
                + "        <style>\n" + "            .olControlLayerSwitcher\n" + "            {\n"
                + "                font-family: Verdana,Arial,sans-serif!important;\n"
                + "                margin-top: 3px;\n" + "                margin-left: 3px;\n"
                + "                margin-bottom: 3px;\n" + "                font-size: 10pt!important;\n"
                + "                color: white;\n" + "                background-color: transparent;\n"
                + "                z-index: 10000;\n" + "                background-color: #999!important;\n"
                + "                color : #ff0!important;\n" + "                max-width: 180px!important;\n"
                + "                opacity: 0.95!important;\n" + "            }\n"
                + "            .olControlLayerSwitcher .layersDiv\n" + "            {\n"
                + "                padding-top: 5px;\n" + "                padding-left: 10px;\n"
                + "                padding-bottom: 5px;\n" + "                padding-right: 10px;\n"
                + "                background-color: #aaa!important;\n"
                + "                color : #fff!important;\n"
                + "                font-family: Verdana,Arial,sans-serif!important;\n"
                + "                font-size: 10pt!important;\n"
                + "                font-weight: normal!important;\n"
                + "                max-width: 180px!important;\n"
                + "                overflow: hidden!important;\n" + "                opacity: 0.95!important;\n"
                + "            }        \n" + "\n" + "            #infoBulle {\n"
                + "                background: " + getGestionnaireInterface().strCouleurFondInfoBulle + ";\n"
                + "                border-top: " + getGestionnaireInterface().iTailleBordureTop + "px solid "
                + getGestionnaireInterface().strCouleurBordureInfoBulle + ";\n"
                + "                border-bottom: " + getGestionnaireInterface().iTailleBordureBottom
                + "px solid " + getGestionnaireInterface().strCouleurBordureInfoBulle + ";\n"
                + "                border-left: " + getGestionnaireInterface().iTailleBordureLeft + "px solid "
                + getGestionnaireInterface().strCouleurBordureInfoBulle + ";\n"
                + "                border-right: " + getGestionnaireInterface().iTailleBordureRight
                + "px solid " + getGestionnaireInterface().strCouleurBordureInfoBulle + ";\n"
                + "                padding: 3px 10px;\n" + "                opacity: "
                + Math.round(getGestionnaireInterface().opaciteInfoBulle * 10) / 10.0 + ";\n"
                + "                color : " + getGestionnaireInterface().strCouleurTexteInfoBulle + ";\n"
                + "                font-family: " + getGestionnaireInterface().strPoliceInfoBulle
                + ",Arial,sans-serif!important;  \n" + "                border-radius: "
                + getGestionnaireInterface().iArrondiTL + "px  " + getGestionnaireInterface().iArrondiTR + "px "
                + getGestionnaireInterface().iArrondiBR + "px " + getGestionnaireInterface().iArrondiBL
                + "px;  \n";
        if (getGestionnaireInterface().bOmbreInfoBulle) {
            strFichierHTML += "                box-shadow: 5px 5px 10px #444;\n";
        }
        strFichierHTML += "                font-size : " + getGestionnaireInterface().taillePoliceInfoBulle
                + "px;           \n" + "                z-index : 10000000;\n" + "            } \n" + "\n"
                + "        </style>\n" + "" + "    </head>\n"
                + "    <body style='background-color:#777; margin-top: 8px; margin-bottom: 2px;overflow: hidden;'>\n"
                + "        <header>\n" + "\n" + "        </header>\n" + "        <article style=\"height : "
                + iHauteur + "px;\">\n" + "            <div style='background-color : #777' id=\"pano\">\n"
                + "            </div>\n" + "        </article>\n"
                + "        <script src=\"panovisu/panovisuInit.js\"></script>\n"
                + "        <script src=\"panovisu/panovisu.js\"></script>\n" + "        <script>\n" + "\n"
                + "            $(function() {\n"
                + "                $('meta[name=img]').attr('content', document.location.href+\"" + strFPano1
                + "\");\n" + "                $('meta[name=url]').attr('content', document.location.href);\n"
                + "                $(window).resize(function(){\n"
                + "                    $(\"article\").height($(window).height()-17);\n"
                + "                    $(\"#pano\").height($(window).height()-17);\n" + "                })\n"
                + "                $(\"article\").height($(window).height()-17);\n"
                + "                $(\"#pano\").height($(window).height()-17);\n"
                + "                ajoutePano({\n" + "                    langue : \"" + getLocale().toString()
                + "\",\n" + "                    panoramique: \"pano\",\n" + "                    minFOV: "
                + (navigateurPanoramique.getMinFov() * 2) + ",\n" + "                    maxFOV: "
                + (navigateurPanoramique.getMaxFov() * 2) + ",\n" + "                    fenX: \"100%\",\n"
                + "                    fenY: \"100%\",\n" + "                    xml: \"xml/PANO.xml\"\n"
                + "                });\n"
                + "                $(\".reseauSocial-twitter\").on(\"click\", function() {\n"
                + "                    window.open(\n"
                + "                            \"https://twitter.com/share?url=\" + document.location.href\n"
                + "                            );\n" + "                    return false;\n"
                + "                });\n"
                + "                $(\".reseauSocial-fb\").on(\"click\", function() {\n"
                + "                    url=\"http://www.facebook.com/sharer.php?s=100&p[url]=\" + encodeURIComponent(document.location.href)\n"
                + "                            + \"&p[images][0]=\" + encodeURIComponent(document.location.href + \""
                + strFPano1 + "\")\n" + "                            + \"&p[title]=\" + encodeURIComponent(\""
                + strTitreVis + "\")\n"
                + "                            + \"&p[summary]=\" + encodeURIComponent(\"Une page cre avec panoVisu Editeur : 100% Libre 100% HTML5\");\n"
                + "                    window.open(url);\n" + "                    return false;\n"
                + "                });\n"
                + "                $(\".reseauSocial-google\").on(\"click\", function() {\n"
                + "                    window.open(\n"
                + "                            \"https://plus.google.com/share?url=\" + document.location.href + \"&amp;hl=fr\"\n"
                + "                            );\n" + "                    return false;\n"
                + "                });\n"
                + "                $(\".reseauSocial-email\").attr(\"href\",\"mailto:?body=\" + document.location.href + \"&amp;hl=fr\");\n"
                + "            });\n" + "        </script>\n" + "    </body>\n" + "</html>\n";
        int i = Integer.parseInt(ordPano.getStrPanos().get(0));
        strFichierHTML = strFichierHTML.replace("PANO", "panovisu" + i);
        File fileIndexHTML = new File(getStrRepertTemp() + File.separator + "index.html");
        fileIndexHTML.setWritable(true);
        OutputStreamWriter oswFichierHTML = new OutputStreamWriter(new FileOutputStream(fileIndexHTML),
                "UTF-8");
        try (BufferedWriter bwFichierHTML = new BufferedWriter(oswFichierHTML)) {
            bwFichierHTML.write(strFichierHTML);
        }
        DirectoryChooser dcRepertChoix = new DirectoryChooser();
        dcRepertChoix.setTitle("Choix du repertoire de sauvegarde de la visite");
        File fileRepert = new File(EditeurPanovisu.getStrRepertoireProjet());
        dcRepertChoix.setInitialDirectory(fileRepert);
        File fileRepertVisite = dcRepertChoix.showDialog(null);
        if (fileRepertVisite != null) {
            String strNomRepertVisite = fileRepertVisite.getAbsolutePath();
            copieRepertoire(getStrRepertTemp(), strNomRepertVisite);
            Alert alert = new Alert(AlertType.INFORMATION);
            alert.setHeaderText(null);
            alert.setTitle(rbLocalisation.getString("main.dialog.generationVisite"));
            alert.setContentText(
                    rbLocalisation.getString("main.dialog.generationVisiteMessage") + strNomRepertVisite);
            alert.showAndWait();
            Application app = new Application() {
                @Override
                public void start(Stage stage) {
                }
            };
            app.getHostServices().showDocument(strNomRepertVisite + File.separator + "index.html");
        }
    } else {
        Alert alert = new Alert(AlertType.ERROR);
        alert.setTitle(rbLocalisation.getString("main.dialog.generationVisite"));
        alert.setHeaderText(null);
        alert.setContentText(rbLocalisation.getString("main.dialog.generationVisiteMessageErreur"));
        alert.showAndWait();

    }
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @throws IOException Exception d'entre sortie
 * @throws InterruptedException Exception interruption
 *///w ww  . j  a v  a  2 s . co m
private static void projetCharge() throws IOException, InterruptedException {
    if (!bRepertSauveChoisi) {
        setStrRepertoireProjet(getStrCurrentDir());
    }
    ButtonType reponse = null;
    ButtonType buttonTypeOui = new ButtonType(rbLocalisation.getString("main.oui"));
    ButtonType buttonTypeNon = new ButtonType(rbLocalisation.getString("main.non"));
    ButtonType buttonTypeAnnule = new ButtonType(rbLocalisation.getString("main.annuler"));
    if (!isbDejaSauve()) {
        Alert alert = new Alert(AlertType.CONFIRMATION);
        alert.setHeaderText(null);
        alert.setTitle(rbLocalisation.getString("main.dialog.chargeProjet"));
        alert.setContentText(rbLocalisation.getString("main.dialog.chargeProjetMessage"));
        alert.getButtonTypes().clear();
        alert.getButtonTypes().setAll(buttonTypeOui, buttonTypeNon, buttonTypeAnnule);
        Optional<ButtonType> actReponse = alert.showAndWait();
        reponse = actReponse.get();
    }
    if (reponse == buttonTypeOui) {
        try {
            projetSauve();

        } catch (IOException ex) {
            Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    if ((reponse == buttonTypeOui) || (reponse == buttonTypeNon) || (reponse == null)) {
        panePanoramique.getChildren().clear();
        panePanoramique.getChildren().add(ivImagePanoramique);
        getApAttends().setVisible(true);
        mbarPrincipal.setDisable(true);
        bbarPrincipal.setDisable(true);
        hbBarreBouton.setDisable(true);
        tpEnvironnement.setDisable(true);
        setbDejaSauve(true);
        FileChooser fcRepertChoix = new FileChooser();
        FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("fichier panoVisu (*.pvu)",
                "*.pvu");
        fcRepertChoix.getExtensionFilters().add(extFilter);
        File fileRepert = new File(getStrRepertoireProjet() + File.separator);
        fcRepertChoix.setInitialDirectory(fileRepert);
        fileProjet = null;
        fileProjet = fcRepertChoix.showOpenDialog(getStPrincipal());
        if (fileProjet != null) {
            getStPrincipal().setTitle(
                    "Panovisu v" + strNumVersion.split("-")[0] + " : " + fileProjet.getAbsolutePath());
            lblDragDrop.setVisible(false);
            setStrRepertoireProjet(fileProjet.getParent());
            ajouteFichierHisto(fileProjet.getAbsolutePath());
            bRepertSauveChoisi = true;
            deleteDirectory(getStrRepertTemp());
            String strRepertPanovisu = getStrRepertTemp() + File.separator + "panovisu";
            File fileRptPanovisu = new File(strRepertPanovisu);
            fileRptPanovisu.mkdirs();
            copieRepertoire(getStrRepertAppli() + File.separator + "panovisu", strRepertPanovisu);
            mnuPanoramique.setDisable(false);
            btnMnuPanoramique.setDisable(false);
            ivAjouterPano.setDisable(false);
            ivAjouterPano.setOpacity(1.0);
            ivSauveProjet.setDisable(false);
            ivSauveProjet.setOpacity(1.0);
            ivVisiteGenere.setDisable(false);
            ivVisiteGenere.setOpacity(1.0);

            getVbChoixPanoramique().setVisible(false);

            mniSauveProjet.setDisable(false);
            mniSauveSousProjet.setDisable(false);
            mniVisiteGenere.setDisable(false);
            setiNumPoints(0);
            setiNumImages(0);
            setiNombreDiapo(0);
            diaporamas = new Diaporama[100];
            setiNumHTML(0);
            ivImagePanoramique.setImage(null);
            cbListeChoixPanoramique.getItems().clear();
            try {
                String strTexte;
                try (BufferedReader brFichierPVU = new BufferedReader(
                        new InputStreamReader(new FileInputStream(fileProjet), "UTF-8"))) {
                    strTexte = "";
                    String strLigneTexte;
                    setiNombrePanoramiquesFichier(0);
                    while ((strLigneTexte = brFichierPVU.readLine()) != null) {
                        if (strLigneTexte.contains("Panoramique=>")) {
                            setiNombrePanoramiquesFichier(getiNombrePanoramiquesFichier() + 1);
                        }
                        strTexte += strLigneTexte + "\n";
                    }
                }
                Task taskAnalysePVU;
                taskAnalysePVU = tskAnalyseFichierPVU(strTexte);
                Thread thrAnalysePVU = new Thread(taskAnalysePVU);
                thrAnalysePVU.setDaemon(true);
                thrAnalysePVU.start();

            } catch (FileNotFoundException ex) {
                Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
            }

        }
    }
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @param strNomFich nom du fichier  charger
 * @throws IOException Exception d'entre sortie
 * @throws InterruptedException Exception interruption
 *//*  w  w  w  .ja v  a  2 s .c o  m*/
private static void projetChargeNom(String strNomFich) throws IOException, InterruptedException {
    File fileProjet1 = new File(strNomFich);
    if (fileProjet1.exists()) {
        ButtonType reponse = null;
        ButtonType buttonTypeOui = new ButtonType(rbLocalisation.getString("main.oui"));
        ButtonType buttonTypeNon = new ButtonType(rbLocalisation.getString("main.non"));
        ButtonType buttonTypeAnnule = new ButtonType(rbLocalisation.getString("main.annuler"));
        if (!isbDejaSauve()) {
            Alert alert = new Alert(AlertType.CONFIRMATION);
            alert.setTitle(rbLocalisation.getString("main.dialog.chargeProjet"));
            alert.setHeaderText(null);
            alert.setContentText(rbLocalisation.getString("main.dialog.chargeProjetMessage"));
            alert.getButtonTypes().clear();
            alert.getButtonTypes().setAll(buttonTypeOui, buttonTypeNon, buttonTypeAnnule);
            Optional<ButtonType> actReponse = alert.showAndWait();
            reponse = actReponse.get();
        }
        if (reponse == buttonTypeOui) {
            try {
                projetSauve();

            } catch (IOException ex) {
                Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if ((reponse == buttonTypeOui) || (reponse == buttonTypeNon) || (reponse == null)) {
            panePanoramique.getChildren().clear();
            panePanoramique.getChildren().add(ivImagePanoramique);
            getApAttends().setVisible(true);
            mbarPrincipal.setDisable(true);
            bbarPrincipal.setDisable(true);
            hbBarreBouton.setDisable(true);
            tpEnvironnement.setDisable(true);
            lblDragDrop.setVisible(false);
            setbDejaSauve(true);
            fileProjet = fileProjet1;
            ajouteFichierHisto(fileProjet.getAbsolutePath());
            getStPrincipal().setTitle(
                    "Panovisu  v" + strNumVersion.split("-")[0] + " : " + fileProjet.getAbsolutePath());
            setStrRepertoireProjet(fileProjet.getParent());
            bRepertSauveChoisi = true;
            deleteDirectory(getStrRepertTemp());
            String strRepertPanovisu = getStrRepertTemp() + File.separator + "panovisu";
            File fileRptPanovisu = new File(strRepertPanovisu);
            fileRptPanovisu.mkdirs();
            copieRepertoire(getStrRepertAppli() + File.separator + "panovisu", strRepertPanovisu);
            mnuPanoramique.setDisable(false);
            btnMnuPanoramique.setDisable(false);
            ivAjouterPano.setDisable(false);
            ivAjouterPano.setOpacity(1.0);
            ivSauveProjet.setDisable(false);
            ivSauveProjet.setOpacity(1.0);
            ivVisiteGenere.setDisable(false);
            ivVisiteGenere.setOpacity(1.0);

            getVbChoixPanoramique().setVisible(false);

            mniSauveProjet.setDisable(false);
            mniSauveSousProjet.setDisable(false);
            mniVisiteGenere.setDisable(false);
            setiNumPoints(0);
            setiNumImages(0);
            setiNumHTML(0);

            ivImagePanoramique.setImage(null);
            cbListeChoixPanoramique.getItems().clear();
            try {
                String strTexte;
                try (BufferedReader br = new BufferedReader(
                        new InputStreamReader(new FileInputStream(fileProjet), "UTF-8"))) {
                    strTexte = "";
                    String strLigneTexte;
                    setiNombrePanoramiquesFichier(0);
                    while ((strLigneTexte = br.readLine()) != null) {
                        if (strLigneTexte.contains("Panoramique=>")) {
                            setiNombrePanoramiquesFichier(getiNombrePanoramiquesFichier() + 1);
                        }
                        strTexte += strLigneTexte + "\n";
                    }
                }
                Task taskAnalysePVU;
                taskAnalysePVU = tskAnalyseFichierPVU(strTexte);
                Thread thrAnalysePVU = new Thread(taskAnalysePVU);
                thrAnalysePVU.setDaemon(true);
                thrAnalysePVU.start();

            } catch (FileNotFoundException ex) {
                Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @throws IOException Exception d'entre sortie
 *//* w  w w .ja va2 s.  c  o m*/
private static void sauveFichierProjet() throws IOException {
    setStrRepertoireProjet(fileProjet.getParent());
    bRepertSauveChoisi = true;
    File fileFichierProjet = new File(fileProjet.getAbsolutePath());
    if (!fileFichierProjet.exists()) {
        fileFichierProjet.createNewFile();
    }
    setbDejaSauve(true);
    getStPrincipal()
            .setTitle("Panovisu v" + strNumVersion.split("-")[0] + " : " + fileProjet.getAbsolutePath());

    String strContenuFichier = "";
    TextField tfVisite = (TextField) getVbChoixPanoramique().lookup("#titreVisite");
    if (!tfVisite.getText().equals("")) {
        strContenuFichier += "[titreVisite=>" + tfVisite.getText() + "]\n";
    }
    if (!strPanoEntree.equals("")) {
        strContenuFichier += "[PanoEntree=>" + strPanoEntree + "]\n";
    }
    strContenuFichier += "[introLP=>" + isbIntroPetitePlanete() + "]\n";
    strContenuFichier += "[arDemarre=>" + isbAutoRotationDemarre() + "]\n";
    strContenuFichier += "[arVitesse=>" + getiAutoRotationVitesse() + "]\n";
    strContenuFichier += "[atDemarre=>" + isbAutoTourDemarre() + "]\n";
    strContenuFichier += "[atVitesse=>" + getiAutoTourLimite() + "]\n";
    strContenuFichier += "[atDemarrage=>" + getiAutoTourDemarrage() + "]\n";
    strContenuFichier += "[atType=>" + getStrAutoTourType() + "]\n";
    strOrdrePanos = "";
    ordPano.getStrPanos().stream().forEach((strOrd) -> {
        strOrdrePanos += strOrd + ",";
    });
    strOrdrePanos = strOrdrePanos.substring(0, strOrdrePanos.length() - 1);
    strContenuFichier += "[OrdrePanos=>" + strOrdrePanos + "]\n";
    for (int i = 0; i < getiNombrePanoramiques(); i++) {
        strContenuFichier += "[Panoramique=>" + "fichier:"
                + strEncodeFichier(getPanoramiquesProjet()[i].getStrNomFichier()) + ";nb:"
                + getPanoramiquesProjet()[i].getNombreHotspots() + ";nbImg:"
                + getPanoramiquesProjet()[i].getNombreHotspotImage() + ";nbHTML:"
                + getPanoramiquesProjet()[i].getNombreHotspotHTML() + ";nbDiapo:"
                + getPanoramiquesProjet()[i].getiNombreHotspotDiapo() + ";titre:"
                + getPanoramiquesProjet()[i].getStrTitrePanoramique() + "" + ";type:"
                + getPanoramiquesProjet()[i].getStrTypePanoramique() + ";afficheInfo:"
                + getPanoramiquesProjet()[i].isAfficheInfo() + ";afficheTitre:"
                + getPanoramiquesProjet()[i].isAfficheTitre() + ";regardX:"
                + getPanoramiquesProjet()[i].getRegardX() + ";regardY:"
                + getPanoramiquesProjet()[i].getRegardY() + ";minLat:" + getPanoramiquesProjet()[i].getMinLat()
                + ";maxLat:" + getPanoramiquesProjet()[i].getMaxLat() + ";bMinLat:"
                + getPanoramiquesProjet()[i].isbMinLat() + ";bMaxLat:" + getPanoramiquesProjet()[i].isbMaxLat()
                + ";fov:" + (getPanoramiquesProjet()[i].getChampVisuel() * 2) + ";minfov:"
                + (getPanoramiquesProjet()[i].getFovMin() * 2) + ";maxfov:"
                + (getPanoramiquesProjet()[i].getFovMax() * 2) + ";zeroNord:"
                + getPanoramiquesProjet()[i].getZeroNord() + ";affichePlan:"
                + getPanoramiquesProjet()[i].isAffichePlan() + ";numeroPlan:"
                + getPanoramiquesProjet()[i].getNumeroPlan();
        if (getPanoramiquesProjet()[i].getMarqueurGeolocatisation() != null) {
            strContenuFichier += ";longitudeGeo:"
                    + getPanoramiquesProjet()[i].getMarqueurGeolocatisation().getLongitude() + ";latitudeGeo:"
                    + getPanoramiquesProjet()[i].getMarqueurGeolocatisation().getLatitude();
        }
        strContenuFichier += "]\n";
        for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspots(); j++) {
            HotSpot HS = getPanoramiquesProjet()[i].getHotspot(j);
            strContenuFichier += "   [hotspot==>" + "longitude:" + HS.getLongitude() + ";latitude:"
                    + HS.getLatitude() + ";image:" + HS.getStrFichierImage() + ";xml:" + HS.getStrFichierXML()
                    + ";numXML:" + HS.getNumeroPano() + ";info:"
                    + HS.getStrInfo().replace(";", "&pv").replace(":", "&dp") + ";anime:" + HS.isAnime();
            if (HS.getRegardX() != 1000) {
                strContenuFichier += ";regardX:" + HS.getRegardX();
            }
            if (HS.getRegardY() != 1000) {
                strContenuFichier += ";regardY:" + HS.getRegardY();
            }
            if (HS.getChampVisuel() != 0) {
                strContenuFichier += ";champVisuel:" + (HS.getChampVisuel() * 2);
            }
            strContenuFichier += "]\n";
        }
        for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspotImage(); j++) {
            HotspotImage HS = getPanoramiquesProjet()[i].getHotspotImage(j);
            strContenuFichier += "   [hotspotImage==>" + "longitude:" + HS.getLongitude() + ";latitude:"
                    + HS.getLatitude() + ";image:" + HS.getStrFichierImage() + ";img:" + HS.getStrLienImg()
                    + ";urlImg:" + HS.getStrUrlImage() + ";couleur:" + HS.getStrCouleurFond() + ";opacite:"
                    + HS.getOpacite() + ";info:" + HS.getStrInfo().replace(";", "&pv").replace(":", "&dp")
                    + ";anime:" + HS.isAnime() + "]\n";
        }
        for (int j = 0; j < getPanoramiquesProjet()[i].getiNombreHotspotDiapo(); j++) {
            HotspotDiaporama HS = getPanoramiquesProjet()[i].getHotspotDiapo(j);
            strContenuFichier += "   [hotspotDiapo==>" + "longitude:" + HS.getLongitude() + ";latitude:"
                    + HS.getLatitude() + ";numDiapo:" + HS.getiNumDiapo() + ";info:"
                    + HS.getStrInfo().replace(";", "&pv").replace(":", "&dp") + ";anime:" + HS.isbAnime()
                    + "]\n";
        }
        for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspotHTML(); j++) {
            HotspotHTML HS = getPanoramiquesProjet()[i].getHotspotHTML(j);
            strContenuFichier += "   [hotspotHTML==>" + "longitude:" + HS.getLongitude() + ";latitude:"
                    + HS.getLatitude() + ";lienExterieur:" + HS.isbLienExterieur() + ";url:"
                    + HS.getStrURLExterieure() + ";info:"
                    + HS.getStrInfo().replace(";", "&pv").replace(":", "&dp") + ";anime:" + HS.isAnime()
                    + ";position:" + HS.getStrPositionHTML() + ";couleur:" + HS.getStrCouleurHTML()
                    + ";opacite:" + HS.getOpaciteHTML() + ";largeur:" + HS.getLargeurHTML() + "]\n";
        }
    }
    for (int i = 0; i < getiNombreDiapo(); i++) {
        strContenuFichier += "[Diaporama=>" + "nom:" + diaporamas[i].getStrNomDiaporama() + ";fichier:"
                + diaporamas[i].getStrFichierDiaporama() + ";opacite:" + diaporamas[i].getOpaciteDiaporama()
                + ";nbImages:" + diaporamas[i].getiNombreImages() + ";delai:"
                + diaporamas[i].getDelaiDiaporama() + ";coul:" + diaporamas[i].getStrCouleurFondDiaporama()
                + "]\n";
        for (int j = 0; j < diaporamas[i].getiNombreImages(); j++) {
            strContenuFichier += "   [imageDiapo==>" + "fichierImage:" + diaporamas[i].getStrFichiersImage(j)
                    + ";fichiers:" + diaporamas[i].getStrFichiers(j) + ";libelles:"
                    + diaporamas[i].getStrLibellesImages(j).replace("\n", "");
            strContenuFichier += "]\n";
        }
    }

    strContenuFichier += "[Interface=>\n" + getGestionnaireInterface().strGetTemplate() + "]\n";
    strContenuFichier += getGestionnairePlan().getTemplate();
    for (int i = 0; i < getiNombrePanoramiques(); i++) {
        for (int j = 0; j < getPanoramiquesProjet()[i].getNombreHotspotHTML(); j++) {
            if (!panoramiquesProjet[i].getHotspotHTML(j).isbLienExterieur()) {
                HotspotHTML HS = getPanoramiquesProjet()[i].getHotspotHTML(j);
                strContenuFichier += "[pageHTML=>" + "numPano:" + i + "\n" + "numHSHTML:" + j + "\n"
                        + "texteHTML:"
                        + HS.getStrTexteHTML().replace("\n", "&nl").replace(":", "&dp").replace(";", "&pv")
                        + "\n" + "numImages:" + HS.getiNombreImages() + "\n";
                for (int k = 0; k < HS.getiNombreImages(); k++) {
                    strContenuFichier += "imagePath:" + HS.getImagesEditeur()[k].getStrImagePath() + "\n";

                }
                strContenuFichier += "]\n";
            }
        }
    }
    fileProjet.setWritable(true);
    OutputStreamWriter oswFichierPVU = new OutputStreamWriter(new FileOutputStream(fileProjet), "UTF-8");
    try (BufferedWriter bwFichierPVU = new BufferedWriter(oswFichierPVU)) {
        bwFichierPVU.write(strContenuFichier);
    }
    Alert alert = new Alert(AlertType.INFORMATION);
    alert.setTitle(rbLocalisation.getString("main.dialog.sauveProjet"));
    alert.setHeaderText(null);
    alert.setContentText(rbLocalisation.getString("main.dialog.sauveProjetMessage"));
    alert.showAndWait();
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @throws IOException Exception d'entre sortie exception
 *///w w w . j  av a 2s .  c o  m
private static void projetsFermer() throws IOException {
    try {
        sauvePreferences();
    } catch (IOException ex) {
        Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
    }

    ButtonType reponse = null;
    ButtonType buttonTypeOui = new ButtonType(rbLocalisation.getString("main.oui"));
    ButtonType buttonTypeNon = new ButtonType(rbLocalisation.getString("main.non"));
    ButtonType buttonTypeAnnule = new ButtonType(rbLocalisation.getString("main.annuler"));
    if (!isbDejaSauve()) {
        Alert alert = new Alert(AlertType.CONFIRMATION);
        alert.setTitle(rbLocalisation.getString("main.dialog.quitterApplication"));
        alert.setHeaderText(null);
        alert.setContentText(rbLocalisation.getString("main.dialog.chargeProjetMessage"));
        alert.getButtonTypes().clear();
        alert.getButtonTypes().setAll(buttonTypeOui, buttonTypeNon, buttonTypeAnnule);
        Optional<ButtonType> actReponse = alert.showAndWait();
    }
    if (reponse == buttonTypeOui) {
        try {
            projetSauve();

        } catch (IOException ex) {
            Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    if ((reponse == buttonTypeOui) || (reponse == buttonTypeNon) || (reponse == null)) {
        sauveHistoFichiers();
        deleteDirectory(getStrRepertTemp());
        File fileTemp = new File(getStrRepertTemp());
        fileTemp.delete();
        Platform.exit();
    }
}

From source file:fr.amap.lidar.amapvox.gui.MainFrameController.java

@FXML
private void onActionButtonOpenSopMatrixFile(ActionEvent event) {

    if (lastFCOpenSopMatrixFile != null) {
        fileChooserOpenSopMatrixFile.setInitialDirectory(lastFCOpenSopMatrixFile.getParentFile());
    }/*from w w  w . j  a  va 2 s.  c o m*/

    File selectedFile = fileChooserOpenSopMatrixFile.showOpenDialog(stage);
    if (selectedFile != null) {

        lastFCOpenSopMatrixFile = selectedFile;

        String extension = FileManager.getExtension(selectedFile);
        Matrix4d mat;

        switch (extension) {
        case ".rsp":

            Rsp tempRsp = new Rsp();
            try {
                tempRsp.read(selectedFile);

                //scan unique
                if (comboboxModeTLS.getSelectionModel().getSelectedIndex() == 0) {

                    File scanFile;
                    if (textFieldInputFileTLS.getText().equals("")) {
                        scanFile = null;
                    } else {
                        scanFile = new File(textFieldInputFileTLS.getText());
                    }

                    if (scanFile != null && Files.exists(scanFile.toPath())) {
                        RxpScan rxpScan = tempRsp.getRxpScanByName(scanFile.getName());
                        if (rxpScan != null) {
                            sopMatrix = new Matrix4d(rxpScan.getSopMatrix());
                        } else {
                            Alert alert = new Alert(AlertType.ERROR);
                            alert.setTitle("Error");
                            alert.setHeaderText("Cannot get sop matrix from rsp file");
                            alert.setContentText("Check rsp file!");

                            alert.showAndWait();
                        }
                    } else {
                        Alert alert = new Alert(AlertType.ERROR);
                        alert.setTitle("Error");
                        alert.setHeaderText("Cannot get sop matrix from rsp file");
                        alert.setContentText("TLS input file should be a valid rxp file!");

                        alert.showAndWait();
                    }
                }

            } catch (JDOMException ex) {
                logger.error("Cannot parse rsp project file", ex);
            } catch (IOException ex) {
                logger.error("Cannot read rsp project file", ex);
            }

            break;
        default:
            try {
                mat = MatrixFileParser.getMatrixFromFile(selectedFile);
                if (mat != null) {
                    sopMatrix = mat;
                } else {
                    showMatrixFormatErrorDialog();
                }
            } catch (IOException ex) {
                logger.error("Cannot read matrix file", ex);
            }
        }

        updateResultMatrix();
    }

}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 *//*from   w w  w .j  a  v  a 2s.  c o  m*/
private static void projetsNouveau() {
    ButtonType reponse = null;
    ButtonType buttonTypeOui = new ButtonType(rbLocalisation.getString("main.oui"));
    ButtonType buttonTypeNon = new ButtonType(rbLocalisation.getString("main.non"));
    ButtonType buttonTypeAnnule = new ButtonType(rbLocalisation.getString("main.annuler"));
    if (!isbDejaSauve()) {
        Alert alert = new Alert(AlertType.CONFIRMATION);
        alert.setTitle(rbLocalisation.getString("main.dialog.nouveauProjet"));
        alert.setHeaderText(null);
        alert.setContentText(rbLocalisation.getString("main.dialog.chargeProjetMessage"));
        alert.getButtonTypes().clear();
        alert.getButtonTypes().setAll(buttonTypeOui, buttonTypeNon, buttonTypeAnnule);
        Optional<ButtonType> actReponse = alert.showAndWait();
        reponse = actReponse.get();
    }
    if (reponse == buttonTypeOui) {
        try {
            projetSauve();

        } catch (IOException ex) {
            Logger.getLogger(EditeurPanovisu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    if ((reponse == buttonTypeOui) || (reponse == buttonTypeNon) || (reponse == null)) {
        apVignettesPano.getChildren().clear();
        strPanoEntree = "";
        deleteDirectory(getStrRepertTemp());
        String strRepertPanovisu = getStrRepertTemp() + File.separator + "panovisu";
        File fileRptPanovisu = new File(strRepertPanovisu);
        fileRptPanovisu.mkdirs();
        copieRepertoire(getStrRepertAppli() + File.separator + "panovisu", strRepertPanovisu);
        mnuPanoramique.setDisable(false);
        btnMnuPanoramique.setDisable(false);

        ivAjouterPano.setDisable(false);
        ivAjouterPano.setOpacity(1.0);
        ivSauveProjet.setDisable(false);
        ivSauveProjet.setOpacity(1.0);
        mniSauveProjet.setDisable(false);
        mniSauveSousProjet.setDisable(false);
        mniVisiteGenere.setDisable(false);
        fileProjet = null;
        getVbChoixPanoramique().setVisible(false);
        setPanoramiquesProjet(new Panoramique[50]);
        setiNombrePanoramiques(0);
        retireAffichageLigne();
        dejaCharge = false;
        retireAffichageHotSpots();
        retireAffichagePointsHotSpots();
        setiNumPoints(0);
        setiNumImages(0);
        setiNumHTML(0);
        getGestionnaireInterface().setiNombreImagesFond(0);
        getGestionnairePlan().setiPlanActuel(-1);
        ivImagePanoramique.setImage(null);
        cbListeChoixPanoramique.getItems().clear();
        lblDragDrop.setVisible(true);
        Node nodAncienNord = (Node) panePanoramique.lookup("#Nord");
        if (nodAncienNord != null) {
            panePanoramique.getChildren().remove(nodAncienNord);
        }
        Node nodAncienPoV = (Node) panePanoramique.lookup("#PoV");
        if (nodAncienPoV != null) {
            panePanoramique.getChildren().remove(nodAncienPoV);
        }

        getGestionnairePlan().getLblDragDropPlan().setVisible(true);
        setiNombrePlans(0);
        setPlans(new Plan[100]);
        getGestionnairePlan().creeInterface(iLargeurInterface, iHauteurInterface - 60);
        Pane panePanneauPlan = getGestionnairePlan().getPaneInterface();
        getMniAffichagePlan().setDisable(true);
        getTabPlan().setDisable(true);
        getTabPlan().setContent(panePanneauPlan);
        spVuePanoramique.setOnDragOver((DragEvent event) -> {
            Dragboard dbFichiersPanoramiques = event.getDragboard();
            if (dbFichiersPanoramiques.hasFiles()) {
                event.acceptTransferModes(TransferMode.ANY);
            } else {
                event.consume();
            }
        });
        spVuePanoramique.setOnDragDropped((DragEvent event) -> {
            Platform.runLater(() -> {
                getApAttends().setVisible(true);
            });
            Dragboard dbFichiersPanoramiques = event.getDragboard();
            boolean bSucces = false;
            if (dbFichiersPanoramiques.hasFiles()) {
                getApAttends().setVisible(true);
                mbarPrincipal.setDisable(true);
                bbarPrincipal.setDisable(true);
                hbBarreBouton.setDisable(true);
                tpEnvironnement.setDisable(true);
                pbarAvanceChargement.setProgress(-1);
                bSucces = true;
                String strFichierPath = null;
                File[] fileList = new File[100];
                int i = 0;
                for (File filePano : dbFichiersPanoramiques.getFiles()) {
                    strFichierPath = filePano.getAbsolutePath();
                    fileList[i] = filePano;
                    i++;
                }
                int iNb = i;
                if (fileList != null) {
                    lblDragDrop.setVisible(false);
                    Task taskChargeFichiers;
                    taskChargeFichiers = tskChargeListeFichiers(fileList, iNb);
                    Thread thChargeFichiers = new Thread(taskChargeFichiers);
                    thChargeFichiers.setDaemon(true);
                    thChargeFichiers.start();
                }

            }
            event.setDropCompleted(bSucces);
            event.consume();
        });
        apVignettesPano.getChildren().add(rectVignettePano);
        rectVignettePano.setVisible(false);
    }
}

From source file:fr.amap.lidar.amapvox.gui.MainFrameController.java

public void showMatrixFormatErrorDialog() {

    Alert alert = new Alert(AlertType.ERROR);
    alert.setTitle("Error");
    alert.setHeaderText("Impossible to parse matrix file");
    alert.setContentText(MATRIX_FORMAT_ERROR_MSG);

    alert.showAndWait();//from   w w w  .j  ava2 s.  c o m
}

From source file:fr.amap.lidar.amapvox.gui.MainFrameController.java

public TaskElement addFileToTaskList(final File file) {

    ObservableList<TaskElement> taskElements = listViewTaskList.getItems();

    int idxCfgToReplace = -1;

    //don't add the task if it is already inside the task list
    int index = 0;
    for (TaskElement taskElement : taskElements) {
        if (file.equals(taskElement.getLinkedFile())) {
            idxCfgToReplace = index;/*from   www  . jav a 2 s  .  co m*/
            break;
        }
        index++;
    }

    //get the task type
    String type;

    try {
        type = Configuration.readType(file);
    } catch (JDOMException | IOException ex) {
        showErrorDialog(ex);
        return null;
    }

    TaskElement element = null;

    switch (type) {

    case "voxelisation-ALS":

        element = new TaskElement(file, new ServiceProvider() {
            @Override
            public Service provide() {
                return new ALSVoxelizationService(file);
            }
        });

        //element = new TaskElement(s, file);
        element.setTaskIcon(TaskElement.VOXELIZATION_IMG);

        element.addTaskListener(new TaskAdapter() {

            @Override
            public void onSucceeded(Service service) {
                Platform.runLater(new Runnable() {
                    @Override
                    public void run() {

                        File outputFile = ((ALSVoxelizationService) service).getValue();
                        if (outputFile != null) {
                            addFileToProductsList(outputFile);
                        }
                    }
                });
            }
        });

        break;

    case "voxelisation-TLS":

        final TLSVoxCfg tLSVoxCfg = new TLSVoxCfg();
        try {
            tLSVoxCfg.readConfiguration(file);
        } catch (Exception ex) {
            showErrorDialog(ex);
            return null;
        }

        switch (tLSVoxCfg.getInputType()) {

        case RSP_PROJECT:

            element = new TaskElement(file, new ServiceProvider() {
                @Override
                public Service provide() {
                    if (tlsVoxNbThreads == -1) {
                        return new RSPVoxelizationService(file, (int) sliderRSPCoresToUse.getValue());
                    } else {
                        return new RSPVoxelizationService(file, tlsVoxNbThreads);
                    }
                }
            });
            element.setTaskIcon(TaskElement.VOXELIZATION_IMG);

            element.addTaskListener(new TaskAdapter() {
                @Override
                public void onSucceeded(Service service) {
                    Platform.runLater(new Runnable() {
                        @Override
                        public void run() {
                            List<File> voxFiles = ((RSPVoxelizationService) service).getValue();

                            for (File voxFile : voxFiles) {
                                addFileToProductsList(voxFile);
                            }
                        }
                    });
                }
            });

            break;

        case RXP_SCAN:

            element = new TaskElement(file, new ServiceProvider() {
                @Override
                public Service provide() {
                    return new RXPVoxelizationService(file);
                }
            });

            element.setTaskIcon(TaskElement.VOXELIZATION_IMG);

            element.addTaskListener(new TaskAdapter() {
                @Override
                public void onSucceeded(Service service) {
                    Platform.runLater(new Runnable() {
                        @Override
                        public void run() {
                            addFileToProductsList(tLSVoxCfg.getOutputFile());
                        }
                    });
                }
            });

            break;

        case PTG_PROJECT:

            element = new TaskElement(file, new ServiceProvider() {
                @Override
                public Service provide() {
                    if (tlsVoxNbThreads == -1) {
                        return new PTGVoxelizationService(file, (int) sliderRSPCoresToUse.getValue());
                    } else {
                        return new PTGVoxelizationService(file, tlsVoxNbThreads);
                    }
                }
            });

            element.setTaskIcon(TaskElement.VOXELIZATION_IMG);

            element.addTaskListener(new TaskAdapter() {
                @Override
                public void onSucceeded(Service service) {
                    Platform.runLater(new Runnable() {
                        @Override
                        public void run() {
                            List<File> voxFiles = ((PTGVoxelizationService) service).getValue();

                            for (File voxFile : voxFiles) {
                                addFileToProductsList(voxFile);
                            }
                        }
                    });
                }
            });
            break;

        case PTX_PROJECT:

            element = new TaskElement(file, new ServiceProvider() {
                @Override
                public Service provide() {
                    if (tlsVoxNbThreads == -1) {
                        return new PTXVoxelizationService(file, (int) sliderRSPCoresToUse.getValue());
                    } else {
                        return new PTXVoxelizationService(file, tlsVoxNbThreads);
                    }
                }
            });

            element.setTaskIcon(TaskElement.VOXELIZATION_IMG);

            element.addTaskListener(new TaskAdapter() {
                @Override
                public void onSucceeded(Service service) {
                    Platform.runLater(new Runnable() {
                        @Override
                        public void run() {
                            List<File> voxFiles = ((PTXVoxelizationService) service).getValue();

                            for (File voxFile : voxFiles) {
                                addFileToProductsList(voxFile);
                            }
                        }
                    });
                }
            });
            break;
        }

        break;

    case "transmittance":

        /*TransmittanceCfg transCfg = new TransmittanceCfg(new TransmittanceParameters());
                
        try {
            transCfg.readConfiguration(file);
        } catch (JDOMException | IOException ex) {
            showErrorDialog(ex);
            return null;
        }*/

        element = new TaskElement(file, new ServiceProvider() {
            @Override
            public Service provide() {
                return new TransmittanceSimService(file);
            }
        });

        element.setTaskIcon(TaskElement.TRANSMITTANCE_IMG);

        element.addTaskListener(new TaskAdapter() {
            @Override
            public void onSucceeded(Service service) {
                Platform.runLater(new Runnable() {
                    @Override
                    public void run() {

                        //if(transCfg.getParameters().isGenerateBitmapFile()){

                        List<File> bitmapFiles = ((TransmittanceSimService) service).getValue()
                                .getOutputBitmapFiles();

                        if (bitmapFiles != null) {

                            for (File file : bitmapFiles) {
                                addFileToProductsList(file);
                            }
                        }
                        //}
                    }
                });
            }
        });

        break;

    case "LAI2000":
    case "LAI2200":

        element = new TaskElement(file, new ServiceProvider() {
            @Override
            public Service provide() {
                return new Lai2xxxSimService(file);
            }
        });

        element.setTaskIcon(TaskElement.CANOPEE_ANALYZER_IMG);

        break;

    case "Hemi-Photo":

        element = new TaskElement(file, new ServiceProvider() {
            @Override
            public Service provide() {
                return new HemiPhotoSimService(file);
            }
        });

        element.setTaskIcon(TaskElement.HEMI_IMG);

        element.addTaskListener(new TaskAdapter() {
            @Override
            public void onSucceeded(Service service) {
                Platform.runLater(new Runnable() {
                    @Override
                    public void run() {

                        File outputFile = ((HemiPhotoSimService) service).getValue();

                        if (outputFile != null) {
                            addFileToProductsList(outputFile);
                        }
                    }
                });
            }
        });

        break;

    case "merging":

        element = new TaskElement(file, new ServiceProvider() {
            @Override
            public Service provide() {
                return new VoxFileMergingService(file);
            }
        });

        element.setTaskIcon(TaskElement.MISC_IMG);

        element.addTaskListener(new TaskAdapter() {
            @Override
            public void onSucceeded(Service service) {
                Platform.runLater(new Runnable() {
                    @Override
                    public void run() {

                        File outputFile = ((VoxFileMergingService) service).getValue();
                        if (outputFile != null) {
                            addFileToProductsList(outputFile);
                        }

                    }
                });
            }
        });

        break;

    case "butterfly-removing":

        element = new TaskElement(file, new ServiceProvider() {
            @Override
            public Service provide() {
                return new ButterflyRemoverService(file);
            }
        });

        element.setTaskIcon(TaskElement.MISC_IMG);

        element.addTaskListener(new TaskAdapter() {
            @Override
            public void onSucceeded(Service service) {
                Platform.runLater(new Runnable() {
                    @Override
                    public void run() {

                        File outputFile = ((ButterflyRemoverService) service).getValue();

                        if (outputFile != null) {
                            addFileToProductsList(outputFile);
                        }
                    }
                });
            }
        });

        break;
    }

    if (element != null) {

        if (idxCfgToReplace != -1) {
            if (listViewTaskList.getItems().get(idxCfgToReplace)
                    .getButtonType() == TaskElement.ButtonType.CANCEL) {
                Alert alert = new Alert(AlertType.WARNING);
                alert.setContentText("This task is currently running, cancel the operation first.");
                alert.show();
            } else {
                listViewTaskList.getItems().set(idxCfgToReplace, element);
            }

        } else {
            listViewTaskList.getItems().add(element);
        }

        element.addTaskListener(new TaskAdapter() {

            @Override
            public void onFailed(Exception ex) {
                showErrorDialog(ex);
            }
        });
    }

    return element;
}

From source file:fr.amap.lidar.amapvox.gui.MainFrameController.java

@FXML
private void onActionButtonLoadSelectedTask(ActionEvent event) {

    File selectedFile = listViewTaskList.getSelectionModel().getSelectedItem().getLinkedFile();

    if (selectedFile != null) {

        try {/*from  w ww  .j  a  v  a  2s  .  c o  m*/

            String type = Configuration.readType(selectedFile);

            MultiResCfg cfg1;

            if (type.equals("multi-resolutions")) {

                showErrorDialog(new Exception("This mode is not supported anymore"));

            } else if (type.equals("Hemi-Photo")) {

                tabPaneMain.getSelectionModel().select(1);
                tabPaneVirtualMeasures.getSelectionModel().select(2);

                HemiPhotoCfg cfg = HemiPhotoCfg.readCfg(selectedFile);
                HemiParameters hemiParameters = cfg.getParameters();

                switch (hemiParameters.getMode()) {
                case ECHOS:
                    listViewHemiPhotoScans.getItems().setAll(hemiParameters.getRxpScansList());
                    break;
                case PAD:
                    textfieldVoxelFilePathHemiPhoto.setText(hemiParameters.getVoxelFile().getAbsolutePath());
                    listViewHemiPhotoSensorPositions.getItems().setAll(hemiParameters.getSensorPositions());
                    break;
                }

                textfieldPixelNumber.setText(String.valueOf(hemiParameters.getPixelNumber()));
                textfieldAzimutsNumber.setText(String.valueOf(hemiParameters.getAzimutsNumber()));
                textfieldZenithsNumber.setText(String.valueOf(hemiParameters.getZenithsNumber()));

                checkboxGenerateSectorsTextFileHemiPhoto.setSelected(hemiParameters.isGenerateTextFile());

                if (hemiParameters.isGenerateTextFile()) {
                    textfieldHemiPhotoOutputTextFile
                            .setText(hemiParameters.getOutputTextFile().getAbsolutePath());
                }

                checkboxHemiPhotoGenerateBitmapFile.setSelected(hemiParameters.isGenerateBitmapFile());

                if (hemiParameters.isGenerateBitmapFile()) {
                    comboboxHemiPhotoBitmapOutputMode.getSelectionModel()
                            .select(hemiParameters.getBitmapMode().getMode());
                    textfieldHemiPhotoOutputBitmapFile
                            .setText(hemiParameters.getOutputBitmapFile().getAbsolutePath());

                }

            } else if (type.equals("transmittance") || type.equals("LAI2000") || type.equals("LAI2200")) {

                tabPaneMain.getSelectionModel().select(1);

                TransmittanceCfg cfg = TransmittanceCfg.readCfg(selectedFile);

                //cfg.readConfiguration(selectedFile);
                TransmittanceParameters params = cfg.getParameters();

                if (type.equals("transmittance")) {

                    textfieldVoxelFilePathTransmittance.setText(params.getInputFile().getAbsolutePath());

                    tabPaneVirtualMeasures.getSelectionModel().select(0);
                    comboboxChooseDirectionsNumber.getSelectionModel()
                            .select(new Integer(params.getDirectionsNumber()));
                    textfieldDirectionRotationTransmittanceMap
                            .setText(String.valueOf(params.getDirectionsRotation()));
                    checkboxTransmittanceMapToricity.setSelected(params.isToricity());

                    checkboxGenerateBitmapFile.setSelected(params.isGenerateBitmapFile());

                    if (params.isGenerateBitmapFile() && params.getBitmapFile() != null) {
                        textfieldOutputBitmapFilePath.setText(params.getBitmapFile().getAbsolutePath());
                    }

                    checkboxGenerateTextFile.setSelected(params.isGenerateTextFile());

                    if (params.isGenerateTextFile() && params.getTextFile() != null) {
                        textfieldOutputTextFilePath.setText(params.getTextFile().getAbsolutePath());
                    }

                    if (params.getPositions() != null) {
                        listViewTransmittanceMapSensorPositions.getItems().setAll(params.getPositions());
                    }

                    textfieldLatitudeRadians.setText(String.valueOf(params.getLatitudeInDegrees()));

                    data.clear();

                    List<SimulationPeriod> simulationPeriods = params.getSimulationPeriods();

                    if (simulationPeriods != null) {
                        data.addAll(simulationPeriods);
                    }

                } else {

                    textfieldVoxelFilePathCanopyAnalyzer.setText(params.getInputFile().getAbsolutePath());

                    if (type.equals("LAI2000")) {
                        toggleButtonLAI2000Choice.setSelected(true);
                    } else if (type.equals("LAI2200")) {
                        toggleButtonLAI2200Choice.setSelected(true);
                    }

                    tabPaneVirtualMeasures.getSelectionModel().select(1);

                    comboboxChooseCanopyAnalyzerSampling.getSelectionModel()
                            .select(Integer.valueOf(params.getDirectionsNumber()));

                    boolean[] masks = params.getMasks();
                    if (masks != null && masks.length == 5) {
                        toggleButtonCanopyAnalyzerRingMask1.setSelected(masks[0]);
                        toggleButtonCanopyAnalyzerRingMask2.setSelected(masks[1]);
                        toggleButtonCanopyAnalyzerRingMask3.setSelected(masks[2]);
                        toggleButtonCanopyAnalyzerRingMask4.setSelected(masks[3]);
                        toggleButtonCanopyAnalyzerRingMask5.setSelected(masks[4]);
                    }

                    checkboxGenerateLAI2xxxFormat.setSelected(params.isGenerateLAI2xxxTypeFormat());

                    List<Point3d> positions = params.getPositions();
                    if (positions != null) {
                        listViewCanopyAnalyzerSensorPositions.getItems().setAll(positions);
                    }

                    checkboxGenerateCanopyAnalyzerTextFile.setSelected(params.isGenerateTextFile());
                    if (params.isGenerateTextFile() && params.getTextFile() != null) {
                        textfieldOutputCanopyAnalyzerTextFile.setText(params.getTextFile().getAbsolutePath());
                    }

                }

            } else if (type.equals("merging")) {

                VoxMergingCfg cfg = new VoxMergingCfg();
                cfg.readConfiguration(selectedFile);

                tabPaneVoxelisation.getSelectionModel().select(2);

                List<File> files = cfg.getFiles();

                if (files != null) {
                    listViewProductsFiles.getItems().addAll(files);
                }
                textFieldOutputFileMerging.setText(cfg.getOutputFile().getAbsolutePath());
                textFieldPADMax.setText(String.valueOf(cfg.getVoxelParameters().infos.getMaxPAD()));

            } else if (type.equals("voxelisation-ALS") || type.equals("voxelisation-TLS")
                    || type.equals("multi-voxelisation")) {

                Configuration cfg;

                if (type.equals("voxelisation-ALS")) {
                    cfg = new ALSVoxCfg();
                } else if (type.equals("voxelisation-TLS")) {
                    cfg = new TLSVoxCfg();
                } else {
                    cfg = new MultiVoxCfg();
                }

                cfg.readConfiguration(selectedFile);

                //VoxelisationConfiguration cfg = new VoxelisationConfiguration();

                VoxelParameters voxelParameters = ((VoxelAnalysisCfg) cfg).getVoxelParameters();
                checkboxWriteShotSegment.setSelected(((VoxelAnalysisCfg) cfg).isExportShotSegment());

                LaserSpecification laserSpecification = voxelParameters.getLaserSpecification();
                if (laserSpecification != null) {
                    if (laserSpecification.getName().equals("custom")) {
                        checkboxCustomLaserSpecification.setSelected(true);
                        DecimalFormatSymbols symb = new DecimalFormatSymbols();
                        symb.setDecimalSeparator('.');
                        DecimalFormat formatter = new DecimalFormat("#####.######", symb);

                        textFieldBeamDiameterAtExit
                                .setText(formatter.format(laserSpecification.getBeamDiameterAtExit()));
                        textFieldBeamDivergence
                                .setText(formatter.format(laserSpecification.getBeamDivergence()));
                    } else {
                        checkboxCustomLaserSpecification.setSelected(false);
                        comboboxLaserSpecification.getSelectionModel().select(laserSpecification);
                    }
                }

                textFieldResolution.setText(String.valueOf(voxelParameters.infos.getResolution()));

                DTMFilteringParams dtmFilteringParams = voxelParameters.getDtmFilteringParams();
                if (dtmFilteringParams == null) {
                    dtmFilteringParams = new DTMFilteringParams();
                }

                checkboxUseDTMFilter.setSelected(dtmFilteringParams.useDTMCorrection());
                File tmpFile = dtmFilteringParams.getDtmFile();
                if (tmpFile != null) {
                    textfieldDTMPath.setText(tmpFile.getAbsolutePath());
                    textfieldDTMValue.setText(String.valueOf(dtmFilteringParams.getMinDTMDistance()));
                    checkboxApplyVOPMatrix.setSelected(dtmFilteringParams.isUseVOPMatrix());
                }

                checkboxUsePointcloudFilter.setSelected(voxelParameters.isUsePointCloudFilter());
                List<PointcloudFilter> pointcloudFilters = voxelParameters.getPointcloudFilters();
                if (pointcloudFilters != null) {

                    clearPointcloudFiltersPane();

                    for (PointcloudFilter filter : pointcloudFilters) {
                        PointCloudFilterPaneComponent pane = addPointcloudFilterComponent();
                        pane.setCSVFile(filter.getPointcloudFile());
                        pane.getTextfieldPointCloudErrorMargin()
                                .setText(String.valueOf(filter.getPointcloudErrorMargin()));

                        int index;
                        if (filter.isKeep()) {
                            index = 0;
                        } else {
                            index = 1;
                        }
                        pane.getComboboxPointCloudFilteringType().getSelectionModel().select(index);
                    }
                }

                checkboxUsePopMatrix.setSelected(((VoxelAnalysisCfg) cfg).isUsePopMatrix());
                checkboxUseSopMatrix.setSelected(((VoxelAnalysisCfg) cfg).isUseSopMatrix());
                checkboxUseVopMatrix.setSelected(((VoxelAnalysisCfg) cfg).isUseVopMatrix());

                if (type.equals("voxelisation-ALS") || type.equals("multi-voxelisation")) {

                    List<Integer> classifiedPointsToDiscard = ((ALSVoxCfg) cfg).getClassifiedPointsToDiscard();

                    for (Integer i : classifiedPointsToDiscard) {
                        listviewClassifications.getItems().get(i).setSelected(false);
                    }
                } else if (type.equals("voxelisation-TLS")) {

                    filteringPaneController.setFilters(((TLSVoxCfg) cfg).getEchoFilters());
                    checkboxEmptyShotsFilter.setSelected(((TLSVoxCfg) cfg).isEnableEmptyShotsFiltering());
                }

                textFieldPADMax.setText(
                        String.valueOf(((VoxelAnalysisCfg) cfg).getVoxelParameters().infos.getMaxPAD()));

                popMatrix = ((VoxelAnalysisCfg) cfg).getPopMatrix();
                sopMatrix = ((VoxelAnalysisCfg) cfg).getSopMatrix();
                vopMatrix = ((VoxelAnalysisCfg) cfg).getVopMatrix();

                if (popMatrix == null) {
                    popMatrix = new Matrix4d();
                    popMatrix.setIdentity();
                }

                if (sopMatrix == null) {
                    sopMatrix = new Matrix4d();
                    sopMatrix.setIdentity();
                }

                if (vopMatrix == null) {
                    vopMatrix = new Matrix4d();
                    vopMatrix.setIdentity();
                }

                updateResultMatrix();

                List<Filter> filters = ((VoxelAnalysisCfg) cfg).getShotFilters();
                if (filters != null) {
                    listviewFilters.getItems().clear();
                    listviewFilters.getItems().addAll(filters);
                }

                if (((VoxelAnalysisCfg) cfg).getVoxelParameters().getEchoesWeightParams()
                        .getWeightingMode() == EchoesWeightParams.WEIGHTING_NONE) {
                    checkboxEnableWeighting.setSelected(false);
                } else {
                    checkboxEnableWeighting.setSelected(true);
                    fillWeightingData(((VoxelAnalysisCfg) cfg).getVoxelParameters().getEchoesWeightParams()
                            .getWeightingData());
                }

                LADParams ladParameters = voxelParameters.getLadParams();
                if (ladParameters == null) {
                    ladParameters = new LADParams();
                }

                comboboxLADChoice.getSelectionModel().select(ladParameters.getLadType());
                radiobuttonLADHomogeneous.setSelected(ladParameters.getLadEstimationMode() == 0);
                textFieldTwoBetaAlphaParameter
                        .setText(String.valueOf(ladParameters.getLadBetaFunctionAlphaParameter()));
                textFieldTwoBetaBetaParameter
                        .setText(String.valueOf(ladParameters.getLadBetaFunctionBetaParameter()));

                /*comboboxTransMode.getSelectionModel().select(new Integer(voxelParameters.getTransmittanceMode()));
                comboboxPathLengthMode.getSelectionModel().select(voxelParameters.getPathLengthMode());*/

                if (type.equals("voxelisation-ALS") || type.equals("multi-voxelisation")) {

                    tabPaneVoxelisation.getSelectionModel().select(0);

                    if (((ALSVoxCfg) cfg).getInputType() != SHOTS_FILE) {
                        textFieldTrajectoryFileALS
                                .setText(((ALSVoxCfg) cfg).getTrajectoryFile().getAbsolutePath());
                        trajectoryFile = ((ALSVoxCfg) cfg).getTrajectoryFile();
                    }

                    GroundEnergyParams groundEnergyParameters = ((ALSVoxCfg) cfg).getVoxelParameters()
                            .getGroundEnergyParams();
                    if (groundEnergyParameters == null) {
                        groundEnergyParameters = new GroundEnergyParams();
                    }

                    checkboxCalculateGroundEnergy.setSelected(groundEnergyParameters.isCalculateGroundEnergy());
                    if (groundEnergyParameters.getGroundEnergyFile() != null) {
                        comboboxGroundEnergyOutputFormat.getSelectionModel()
                                .select(groundEnergyParameters.getGroundEnergyFileFormat());
                        textFieldOutputFileGroundEnergy
                                .setText(groundEnergyParameters.getGroundEnergyFile().getAbsolutePath());
                    }

                    if (type.equals("voxelisation-ALS")) {

                        textFieldInputFileALS.setText(((ALSVoxCfg) cfg).getInputFile().getAbsolutePath());
                        selectALSInputMode(((ALSVoxCfg) cfg).getInputFile());

                        textFieldOutputFileALS.setText(((ALSVoxCfg) cfg).getOutputFile().getAbsolutePath());
                        checkboxMultiResAfterMode2.setSelected(
                                ((ALSVoxCfg) cfg).getVoxelParameters().getNaNsCorrectionParams().isActivate());
                        textfieldNbSamplingThresholdMultires.setText(String.valueOf(((ALSVoxCfg) cfg)
                                .getVoxelParameters().getNaNsCorrectionParams().getNbSamplingThreshold()));
                        checkboxMultiFiles.setSelected(false);

                    } else if (type.equals("multi-voxelisation")) {

                        List<Input> inputs = ((MultiVoxCfg) cfg).getMultiProcessInputs();
                        StringBuilder inputFiles = new StringBuilder();

                        for (Input input : inputs) {
                            inputFiles.append(input.inputFile.getAbsolutePath()).append(";");
                        }

                        textFieldInputFileALS.setText(inputFiles.toString());

                        if (inputs.size() > 0) {
                            textFieldOutputFileALS
                                    .setText(inputs.get(0).outputFile.getParentFile().getAbsolutePath());
                            textFieldResolution.setText(
                                    String.valueOf(inputs.get(0).voxelParameters.infos.getResolution()));
                        }

                        checkboxMultiFiles.setSelected(true);
                    }
                } else {

                    tabPaneVoxelisation.getSelectionModel().select(1);

                    textFieldInputFileTLS.setText(((TLSVoxCfg) cfg).getInputFile().getAbsolutePath());
                    textFieldOutputPathTLS.setText(((TLSVoxCfg) cfg).getOutputFile().getAbsolutePath());

                    switch (((TLSVoxCfg) cfg).getInputType()) {
                    case RSP_PROJECT:
                        comboboxModeTLS.getSelectionModel().select(1);
                        break;
                    case RXP_SCAN:
                        comboboxModeTLS.getSelectionModel().select(0);
                        break;
                    case POINTS_FILE:
                        comboboxModeTLS.getSelectionModel().select(2);
                        break;
                    case SHOTS_FILE:
                        comboboxModeTLS.getSelectionModel().select(5);
                        break;
                    case PTG_PROJECT:
                        comboboxModeTLS.getSelectionModel().select(3);
                        break;
                    case PTX_PROJECT:
                        comboboxModeTLS.getSelectionModel().select(2);
                        break;
                    }

                    checkboxMergeAfter.setSelected(((TLSVoxCfg) cfg).getVoxelParameters().isMergingAfter());

                    if (((TLSVoxCfg) cfg).getVoxelParameters().getMergedFile() != null) {
                        textFieldMergedFileName
                                .setText(((TLSVoxCfg) cfg).getVoxelParameters().getMergedFile().getName());
                    }

                    List<LidarScan> matricesAndFiles = ((TLSVoxCfg) cfg).getLidarScans();
                    if (matricesAndFiles != null) {
                        items = matricesAndFiles;
                        listviewRxpScans.getItems().setAll(items);
                    }
                }

                if (type.equals("voxelisation-ALS") || type.equals("voxelisation-TLS")) {

                    voxelSpacePanelVoxelizationController.getTextFieldEnterXMin()
                            .setText(String.valueOf(voxelParameters.infos.getMinCorner().x));
                    voxelSpacePanelVoxelizationController.getTextFieldEnterYMin()
                            .setText(String.valueOf(voxelParameters.infos.getMinCorner().y));
                    voxelSpacePanelVoxelizationController.getTextFieldEnterZMin()
                            .setText(String.valueOf(voxelParameters.infos.getMinCorner().z));

                    voxelSpacePanelVoxelizationController.getTextFieldEnterXMax()
                            .setText(String.valueOf(voxelParameters.infos.getMaxCorner().x));
                    voxelSpacePanelVoxelizationController.getTextFieldEnterYMax()
                            .setText(String.valueOf(voxelParameters.infos.getMaxCorner().y));
                    voxelSpacePanelVoxelizationController.getTextFieldEnterZMax()
                            .setText(String.valueOf(voxelParameters.infos.getMaxCorner().z));

                    voxelSpacePanelVoxelizationController.getTextFieldXNumber()
                            .setText(String.valueOf(voxelParameters.infos.getSplit().x));
                    voxelSpacePanelVoxelizationController.getTextFieldYNumber()
                            .setText(String.valueOf(voxelParameters.infos.getSplit().y));
                    voxelSpacePanelVoxelizationController.getTextFieldZNumber()
                            .setText(String.valueOf(voxelParameters.infos.getSplit().z));

                }
            }

        } catch (Exception e) {

            logger.error("Configuration file cannot be load", e);
            Alert alert = new Alert(AlertType.CONFIRMATION);
            alert.setHeaderText("Incorrect file");
            alert.setContentText("File is corrupted or cannot be read!\n" + "Do you want to keep it?");
            Optional<ButtonType> result = alert.showAndWait();
            if (result.get() == ButtonType.CANCEL) {
                listViewTaskList.getItems().remove(selectedFile);
            }
        }
    }

}