Example usage for javafx.stage Screen getPrimary

List of usage examples for javafx.stage Screen getPrimary

Introduction

In this page you can find the example usage for javafx.stage Screen getPrimary.

Prototype

public static Screen getPrimary() 

Source Link

Document

The primary Screen .

Usage

From source file:org.openbase.display.DisplayView.java

private Screen getScreen() {
    try {//from   www .  j  av a 2s .  co  m

        // setup display property
        JPOutput.Display display;
        try {
            display = JPService.getProperty(JPOutput.class).getValue();
        } catch (JPServiceException ex) {
            ExceptionPrinter.printHistory(new CouldNotPerformException(
                    "Could not detect output property! Try to use default display.", ex), logger);
            display = JPOutput.Display.PRIMARY;
        }

        // select screen
        switch (display) {
        case PRIMARY:
            return Screen.getPrimary();
        case SECONDARY:
            for (Screen screen : Screen.getScreens()) {
                if (!screen.equals(Screen.getPrimary())) {
                    return screen;
                }
            }
            throw new NotAvailableException(Screen.class, JPOutput.Display.SECONDARY.name());
        default:
            return Screen.getScreens().get(display.getId());
        }
    } catch (Exception ex) {
        ExceptionPrinter.printHistory(
                new CouldNotPerformException("Could not detect display! Use display 0 instead.", ex), logger);
        return Screen.getScreens().get(0);
    }
}

From source file:jp.co.heppokoact.autocapture.FXMLDocumentController.java

/**
 * ???????????/*from www .  j ava 2  s  .  co  m*/
 * ????????
 * ???ESC????????
 *
 * @return ???????
 * @throws IOException ?????
 */
private Stage createTransparentStage() throws IOException {
    // ??????????
    Stage transparentStage = new Stage(StageStyle.TRANSPARENT);
    transparentStage.initOwner(anchorPane.getScene().getWindow());
    transparentStage.initModality(Modality.APPLICATION_MODAL);
    transparentStage.setResizable(false);
    Rectangle2D rect = Screen.getPrimary().getVisualBounds();
    transparentStage.setWidth(rect.getWidth());
    transparentStage.setHeight(rect.getHeight());

    // ???
    java.awt.Rectangle awtRect = new java.awt.Rectangle((int) rect.getWidth(), (int) rect.getHeight());
    BufferedImage captureImage = robot.createScreenCapture(awtRect);

    // ??????
    ByteArrayInputStream in = ImageUtil.convToInputStream(captureImage);
    BackgroundImage bgImage = new BackgroundImage(new Image(in), BackgroundRepeat.NO_REPEAT,
            BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT);
    Pane pane = new Pane();
    pane.setBackground(new Background(bgImage));
    pane.setStyle("-fx-border-color: rgba(255, 255, 0, 0.5); -fx-border-style: solid; -fx-border-width: 15;");

    // ???ESC?????
    Scene scene = new Scene(pane);
    transparentStage.setScene(scene);
    scene.setOnKeyPressed(e -> {
        if (e.getCode() == KeyCode.ESCAPE) {
            transparentStage.close();
        }
    });

    return transparentStage;
}

From source file:org.jevis.jeconfig.JEConfig.java

/**
 * maximized the given stage/*ww w.ja v a 2  s .  com*/
 *
 * @param primaryStage
 */
public static void maximize(Stage primaryStage) {
    Screen screen = Screen.getPrimary();
    Rectangle2D bounds = screen.getVisualBounds();

    primaryStage.setX(bounds.getMinX());
    primaryStage.setY(bounds.getMinY());
    primaryStage.setWidth(bounds.getWidth());
    primaryStage.setHeight(bounds.getHeight());
}

From source file:org.eclipse.jubula.rc.javafx.driver.RobotJavaFXImpl.java

/**
 * Refreshes the complete layout and returns the bounds of the given
 * Component./* w w  w.ja  v  a  2  s  .  c  o m*/
 *
 * @param comp
 *            the Component
 * @param clickOp
 *            not used
 * @return Rectangle with the Bounds
 */
private Rectangle getComponentBounds(final Object comp, ClickOptions clickOp) {

    ComponentHandler.syncStageResize();
    Rectangle bounds = null;
    if (comp instanceof Stage) {
        Stage s = (Stage) comp;
        bounds = new Rectangle(new Point(Rounding.round(s.getX()), Rounding.round(s.getY())));

        // This is not multi display compatible
        Screen screen = Screen.getPrimary();
        final Rectangle2D screenBounds = screen.getBounds();
        int displayWidth = Rounding.round(screenBounds.getWidth());
        int displayHeight = Rounding.round(screenBounds.getHeight());
        if (s.isFullScreen()) {
            bounds.width = Rounding.round(displayWidth);
            bounds.height = Rounding.round(displayHeight);
        } else if (s.isMaximized()) {
            int x = Rounding.round(s.getX());
            int y = Rounding.round(s.getY());
            // trimming the bounds to the display if necessary
            bounds.width = Rounding.round(s.getWidth());
            bounds.height = Rounding.round(s.getHeight());
            if (x < 0 || y < 0) {
                bounds.x = 0;
                bounds.y = 0;
                if (bounds.width > displayWidth) {
                    bounds.width = displayWidth;
                }
                if (bounds.height > displayHeight) {
                    bounds.height = displayHeight;
                }
            }
        } else {
            bounds.width = Rounding.round(s.getWidth());
            bounds.height = Rounding.round(s.getHeight());
        }
    } else {
        final Node node = (Node) comp;
        if (clickOp.isScrollToVisible()) {
            ensureComponentVisible(node);
        }
        bounds = EventThreadQueuerJavaFXImpl.invokeAndWait("Robot get node bounds", new Callable<Rectangle>() { //$NON-NLS-1$

            @Override
            public Rectangle call() throws Exception {
                Rectangle bs = new Rectangle(getLocation(node, new Point(0, 0)));
                Bounds b = node.getBoundsInParent();
                bs.width = Rounding.round(b.getWidth());
                bs.height = Rounding.round(b.getHeight());
                return bs;
            }
        });

    }
    return bounds;
}

From source file:snpviewer.SnpViewer.java

private void fixStageSize(Stage stage, boolean fix) {
    /*provides a fix for annoying bug which means that 
     * setResizable(false) causing windows to grow in size in Windows
     *///from  w  w  w. j  a v  a2s  .  c  om
    if (fix) {
        stage.setMaxHeight(stage.getHeight());
        stage.setMinHeight(stage.getHeight());
        stage.setMaxWidth(stage.getWidth());
        stage.setMinWidth(stage.getWidth());
    } else {
        Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
        stage.setMaxHeight(primaryScreenBounds.getHeight());
        stage.setMinHeight(300);
        stage.setMaxWidth(primaryScreenBounds.getWidth());
        stage.setMinWidth(500);
    }
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @throws IOException Exception d'entre sortie
 *///  w  w  w  .java  2  s.co 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

/**
 *
 * @param strLstPano//from   w w w .ja v a 2  s.  c om
 * @param iNumPano
 * @return
 */
public static Pane paneAffichageHS(String strLstPano, int iNumPano) {

    Pane paneHotSpots = new Pane();
    paneHotSpots.setTranslateY(10);
    paneHotSpots.setTranslateX(10);
    VBox vbHotspots = new VBox(5);
    paneHotSpots.getChildren().add(vbHotspots);
    Label lblPoint;
    int io;
    for (io = 0; io < getPanoramiquesProjet()[iNumPano].getNombreHotspots(); io++) {
        Label lblSep = new Label(" ");
        Label lblSep1 = new Label(" ");
        VBox vbPanneauHS = new VBox();
        double deplacement = 0;
        vbPanneauHS.setLayoutX(deplacement);
        Pane paneHsPanoramique = new Pane(vbPanneauHS);
        paneHsPanoramique.setPrefHeight(300);
        paneHsPanoramique.setMinHeight(300);
        paneHsPanoramique.setMaxHeight(300);

        int iNum1 = io;
        Timeline timBouge = new Timeline(new KeyFrame(Duration.millis(500), (ActionEvent event) -> {
            Circle c1 = (Circle) panePanoramique.lookup("#point" + iNum1);
            if (c1 != null) {
                if (c1.getFill() == Color.RED) {
                    c1.setFill(Color.YELLOW);
                    c1.setStroke(Color.RED);
                } else {
                    c1.setFill(Color.RED);
                    c1.setStroke(Color.YELLOW);
                }
            }
        }));
        timBouge.setCycleCount(Timeline.INDEFINITE);
        timBouge.pause();
        paneHsPanoramique.setOnMouseEntered((e) -> {
            timBouge.play();
        });
        paneHsPanoramique.setOnMouseExited((e) -> {
            timBouge.pause();
            Circle c1 = (Circle) panePanoramique.lookup("#point" + iNum1);
            if (c1 != null) {
                c1.setFill(Color.YELLOW);
                c1.setStroke(Color.RED);
            }
        });
        paneHsPanoramique
                .setStyle("-fx-border-color : #777777;-fx-border-width : 1px;-fx-border-radius : 3px;");
        paneHsPanoramique.setId("HS" + io);
        lblPoint = new Label("Point #" + (io + 1));
        lblPoint.setPadding(new Insets(5, 10, 5, 5));
        lblPoint.setTranslateX(-deplacement);
        lblPoint.getStyleClass().add("titreOutil");
        Separator sepHotspots = new Separator(Orientation.HORIZONTAL);
        sepHotspots.setTranslateX(-deplacement);
        sepHotspots.setPrefWidth(321);
        sepHotspots.setTranslateX(2);
        paneHsPanoramique.setPrefWidth(325);
        vbPanneauHS.getChildren().addAll(lblPoint, sepHotspots);
        if (strLstPano != null) {

            Label lblLien = new Label(rbLocalisation.getString("main.panoramiqueDestination"));
            lblLien.setTranslateX(10);
            ComboBox cbDestPano = new ComboBox();
            String[] strListe = strLstPano.split(";");
            cbDestPano.getItems().addAll(Arrays.asList(strListe));
            int iNum11 = getPanoramiquesProjet()[iNumPano].getHotspot(io).getNumeroPano();
            cbDestPano.setTranslateX(10);
            cbDestPano.setId("cbpano" + io);
            cbDestPano.getSelectionModel().select(iNum11);
            cbDestPano.getSelectionModel().selectedIndexProperty().addListener((ov, t, t1) -> {
                valideHS();
                if (dejaCharge) {
                    dejaCharge = false;
                    retireAffichageHotSpots();
                    Pane affHS1 = paneAffichageHS(strListePano(), iNumPano);
                    affHS1.setId("labels");
                    vbVisuHotspots.getChildren().add(affHS1);
                }
            });
            if (iNum11 != -1) {
                int iNumPan = iNum11;
                ImageView ivAfficheVignettePano = new ImageView(
                        getPanoramiquesProjet()[iNum11].getImgPanoRect());
                ivAfficheVignettePano.setPreserveRatio(true);
                ivAfficheVignettePano.setFitWidth(300);
                ivAfficheVignettePano.setLayoutY(10);
                ivAfficheVignettePano.setCursor(Cursor.HAND);
                ivAfficheVignettePano.setOnMouseClicked((e) -> {
                    affichePanoChoisit(iNumPan);
                });
                AnchorPane apVisuVignettePano = new AnchorPane(ivAfficheVignettePano);
                apVisuVignettePano.setPrefHeight(170);
                apVisuVignettePano.setTranslateX(10);
                vbPanneauHS.getChildren().addAll(lblLien, cbDestPano, apVisuVignettePano, lblSep);
            } else {
                vbPanneauHS.getChildren().addAll(lblLien, cbDestPano, lblSep);
            }

        }
        Label lblTexteHS = new Label(rbLocalisation.getString("main.texteHotspot"));
        lblTexteHS.setTranslateX(10);
        TextField tfTexteHS = new TextField();
        if (getPanoramiquesProjet()[iNumPano].getHotspot(io).getStrInfo() != null) {
            tfTexteHS.setText(getPanoramiquesProjet()[iNumPano].getHotspot(io).getStrInfo());
        }
        tfTexteHS.textProperty().addListener((final ObservableValue<? extends String> observable,
                final String oldValue, final String newValue) -> {
            valideHS();
        });

        tfTexteHS.setId("txtHS" + io);
        tfTexteHS.setPrefSize(200, 25);
        tfTexteHS.setMaxSize(200, 20);
        tfTexteHS.setTranslateX(60);
        vbPanneauHS.getChildren().addAll(lblTexteHS, tfTexteHS, lblSep1);
        vbHotspots.getChildren().addAll(paneHsPanoramique, lblSep);
    }
    int iNbHS = io;
    int iTaillePane = io * 325;
    for (io = 0; io < getPanoramiquesProjet()[iNumPano].getNombreHotspotImage(); io++) {
        Label lblSep = new Label(" ");
        Label lblSep1 = new Label(" ");
        VBox vbPanneauHsImage = new VBox();
        Pane paneHsImage = new Pane(vbPanneauHsImage);
        int iNum = io;
        Timeline timBouge = new Timeline(new KeyFrame(Duration.millis(500), (ActionEvent event) -> {
            Circle c1 = (Circle) panePanoramique.lookup("#img" + iNum);
            if (c1 != null) {
                if (c1.getFill() == Color.BLUE) {
                    c1.setFill(Color.YELLOW);
                    c1.setStroke(Color.BLUE);
                } else {
                    c1.setFill(Color.BLUE);
                    c1.setStroke(Color.YELLOW);
                }
            }
        }));
        timBouge.setCycleCount(Timeline.INDEFINITE);
        timBouge.pause();
        paneHsImage.setOnMouseEntered((e) -> {
            timBouge.play();
        });
        paneHsImage.setOnMouseExited((e) -> {
            Circle c1 = (Circle) panePanoramique.lookup("#img" + iNum);
            if (c1 != null) {

                c1.setFill(Color.BLUE);
                c1.setStroke(Color.YELLOW);
            }
            timBouge.pause();
        });
        paneHsImage.setStyle("-fx-border-color : #777777;-fx-border-width : 1px;-fx-border-radius : 3px;");
        paneHsImage.setId("HSImg" + io);
        lblPoint = new Label("Image #" + (io + 1));
        lblPoint.setPadding(new Insets(5, 10, 5, 5));
        lblPoint.getStyleClass().add("titreOutil");
        Separator sepHS = new Separator(Orientation.HORIZONTAL);
        sepHS.setPrefWidth(321);
        sepHS.setTranslateX(2);

        paneHsImage.setPrefWidth(325);
        vbPanneauHsImage.getChildren().addAll(lblPoint, sepHS);
        Label lblLien = new Label(rbLocalisation.getString("main.imageChoisie"));
        lblLien.setTranslateX(10);

        String strF1XML = getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getStrLienImg();
        Image imgChoisie = new Image(
                "file:" + getStrRepertTemp() + File.separator + "images" + File.separator + strF1XML);
        ImageView ivChoisie = new ImageView(imgChoisie);
        ivChoisie.setTranslateX(100);
        ivChoisie.setFitWidth(100);
        ivChoisie.setFitHeight(imgChoisie.getHeight() / imgChoisie.getWidth() * 100);

        vbPanneauHsImage.getChildren().addAll(lblLien, ivChoisie, lblSep);
        Label lblTexteHS = new Label(rbLocalisation.getString("main.texteHotspot"));
        lblTexteHS.setTranslateX(10);

        TextField tfTexteHS = new TextField();
        if (getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getStrInfo() != null) {
            tfTexteHS.setText(getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getStrInfo());
        }
        tfTexteHS.textProperty().addListener((final ObservableValue<? extends String> observable,
                final String oldValue, final String newValue) -> {
            valideHS();
        });

        tfTexteHS.setId("txtHSImage" + io);
        tfTexteHS.setPrefSize(200, 25);
        tfTexteHS.setMaxSize(200, 20);
        tfTexteHS.setTranslateX(60);
        vbPanneauHsImage.getChildren().addAll(lblTexteHS, tfTexteHS, lblSep1);
        Label lblCoulFond = new Label(rbLocalisation.getString("diapo.couleurFond"));
        lblCoulFond.setTranslateX(10);
        Label lblOpacite = new Label(rbLocalisation.getString("diapo.opacite"));
        lblOpacite.setTranslateX(10);
        if (getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getStrCouleurFond().equals("")) {
            getPanoramiquesProjet()[iNumPano].getHotspotImage(io).setStrCouleurFond(
                    "#" + getGestionnaireInterface().getCouleurFondTheme().toString().substring(2, 8));
        }
        ColorPicker cpCouleurFond = new ColorPicker(
                Color.valueOf(getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getStrCouleurFond()));
        if (getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getOpacite() == -1) {
            getPanoramiquesProjet()[iNumPano].getHotspotImage(io)
                    .setOpacite(getGestionnaireInterface().getOpaciteTheme());
        }
        cpCouleurFond.setTranslateX(100);
        int i = io;
        cpCouleurFond.valueProperty().addListener((ov, av, nv) -> {
            if (getiNombrePanoramiques() != 0) {
                setbDejaSauve(false);
                getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");
            }
            getPanoramiquesProjet()[iNumPano].getHotspotImage(i)
                    .setStrCouleurFond("#" + cpCouleurFond.getValue().toString().substring(2, 8));
        });
        Slider slOpacite = new Slider(0, 1, getPanoramiquesProjet()[iNumPano].getHotspotImage(io).getOpacite());
        slOpacite.valueProperty().addListener((ov, av, nv) -> {
            if (getiNombrePanoramiques() != 0) {
                setbDejaSauve(false);
                getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");
            }
            getPanoramiquesProjet()[iNumPano].getHotspotImage(i).setOpacite(slOpacite.getValue());
        });
        slOpacite.setTranslateX(100);
        slOpacite.setPrefWidth(130);
        slOpacite.setMinWidth(130);
        slOpacite.setMaxWidth(130);
        vbPanneauHsImage.getChildren().addAll(lblCoulFond, cpCouleurFond, lblOpacite, slOpacite);

        vbHotspots.getChildren().addAll(paneHsImage, lblSep);
        iTaillePane += 225 + ivChoisie.getFitHeight();
        paneHsImage.setPrefHeight(200 + ivChoisie.getFitHeight());
        paneHsImage.setMinHeight(200 + ivChoisie.getFitHeight());
        paneHsImage.setMaxHeight(200 + ivChoisie.getFitHeight());
    }

    iNbHS += io;

    for (io = 0; io < getPanoramiquesProjet()[iNumPano].getNombreHotspotHTML(); io++) {
        Label lblSep = new Label(" ");
        int iNum = io;
        VBox vbPanneauHS = new VBox();
        Pane paneHsHtml = new Pane(vbPanneauHS);
        Timeline timBouge = new Timeline(new KeyFrame(Duration.millis(500), (ActionEvent event) -> {
            Circle c1 = (Circle) panePanoramique.lookup("#html" + iNum);
            if (c1 != null) {

                if (c1.getFill() == Color.DARKGREEN) {
                    c1.setFill(Color.YELLOWGREEN);
                    c1.setStroke(Color.DARKGREEN);
                } else {
                    c1.setFill(Color.DARKGREEN);
                    c1.setStroke(Color.YELLOWGREEN);
                }
            }
        }));
        timBouge.setCycleCount(Timeline.INDEFINITE);
        timBouge.pause();
        paneHsHtml.setOnMouseEntered((e) -> {
            timBouge.play();
        });
        paneHsHtml.setOnMouseExited((e) -> {
            timBouge.pause();
            Circle c1 = (Circle) panePanoramique.lookup("#html" + iNum);
            if (c1 != null) {
                c1.setFill(Color.DARKGREEN);
                c1.setStroke(Color.YELLOWGREEN);
            }
        });
        paneHsHtml.setStyle("-fx-border-color : #777777;-fx-border-width : 1px;-fx-border-radius : 3px;");
        paneHsHtml.setId("HSHTML" + io);
        lblPoint = new Label("Hotspot HTML #" + (io + 1));
        lblPoint.setPadding(new Insets(5, 10, 5, 5));
        lblPoint.getStyleClass().add("titreOutil");
        Separator sepHS = new Separator(Orientation.HORIZONTAL);
        sepHS.setPrefWidth(321);
        sepHS.setTranslateX(2);
        paneHsHtml.setPrefWidth(325);
        Label lblTexteHS = new Label(rbLocalisation.getString("main.texteHotspot"));
        lblTexteHS.setTranslateX(10);
        TextField tfTexteHS = new TextField();
        if (getPanoramiquesProjet()[iNumPano].getHotspotHTML(io).getStrInfo() != null) {
            tfTexteHS.setText(getPanoramiquesProjet()[iNumPano].getHotspotHTML(io).getStrInfo());
        }
        tfTexteHS.textProperty().addListener((final ObservableValue<? extends String> observable,
                final String oldValue, final String newValue) -> {
            valideHS();
        });

        tfTexteHS.setId("txtHSHTML" + io);
        tfTexteHS.setPrefSize(200, 25);
        tfTexteHS.setMaxSize(200, 20);
        tfTexteHS.setTranslateX(60);
        vbPanneauHS.getChildren().addAll(lblPoint, sepHS, lblTexteHS, tfTexteHS);
        Button btnEditeHSHTML = new Button(rbLocalisation.getString("main.editeHTML"));
        btnEditeHSHTML.setPrefWidth(80);
        btnEditeHSHTML.setTranslateX(paneHsHtml.getPrefWidth() - btnEditeHSHTML.getPrefWidth() - 10);
        vbPanneauHS.getChildren().addAll(btnEditeHSHTML);
        btnEditeHSHTML.setOnAction((e) -> {
            EditeurHTML editHTML = new EditeurHTML();
            HotspotHTML HS = getPanoramiquesProjet()[iNumPano].getHotspotHTML(iNum);
            editHTML.setHsHTML(HS);
            Rectangle2D tailleEcran = Screen.getPrimary().getBounds();
            int iHauteur = (int) tailleEcran.getHeight() - 100;
            int iLargeur = (int) tailleEcran.getWidth() - 100;
            editHTML.affiche(iLargeur, iHauteur);
            editHTML.addPropertyChangeListener("bValide", (ev) -> {
                if (ev.getNewValue().toString().equals("true")) {
                    getPanoramiquesProjet()[iNumPano].setHotspotHTML(editHTML.getHsHTML(), iNum);
                    dejaCharge = false;
                    retireAffichageHotSpots();
                    Pane affHS1 = paneAffichageHS(strListePano(), iNumPano);
                    affHS1.setId("labels");
                    vbVisuHotspots.getChildren().add(affHS1);
                }
            });

        });

        vbHotspots.getChildren().addAll(paneHsHtml, lblSep);
        paneHsHtml.setPrefHeight(120);
        paneHsHtml.setMinHeight(120);
        paneHsHtml.setMaxHeight(120);
        iTaillePane += 145;
    }
    iNbHS += io;
    for (io = 0; io < getPanoramiquesProjet()[iNumPano].getiNombreHotspotDiapo(); io++) {
        Label lblSep = new Label(" ");
        int iNum = io;
        VBox vbPanneauHS = new VBox();
        Pane paneHsDiapo = new Pane(vbPanneauHS);
        Timeline timBouge = new Timeline(new KeyFrame(Duration.millis(500), (ActionEvent event) -> {
            Circle c1 = (Circle) panePanoramique.lookup("#dia" + iNum);
            if (c1 != null) {

                if (c1.getFill() == Color.TURQUOISE) {
                    c1.setFill(Color.ORANGE);
                    c1.setStroke(Color.TURQUOISE);
                } else {
                    c1.setFill(Color.TURQUOISE);
                    c1.setStroke(Color.ORANGE);
                }
            }
        }));
        timBouge.setCycleCount(Timeline.INDEFINITE);
        timBouge.pause();
        paneHsDiapo.setOnMouseEntered((e) -> {
            timBouge.play();
        });
        paneHsDiapo.setOnMouseExited((e) -> {
            timBouge.pause();
            Circle c1 = (Circle) panePanoramique.lookup("#html" + iNum);
            if (c1 != null) {
                c1.setFill(Color.TURQUOISE);
                c1.setStroke(Color.ORANGE);
            }
        });
        paneHsDiapo.setStyle("-fx-border-color : #777777;-fx-border-width : 1px;-fx-border-radius : 3px;");
        paneHsDiapo.setId("DIAPO" + io);
        lblPoint = new Label("Hotspot Diaporama #" + (io + 1));
        lblPoint.setPadding(new Insets(5, 10, 5, 5));
        lblPoint.getStyleClass().add("titreOutil");
        Separator sepHS = new Separator(Orientation.HORIZONTAL);
        sepHS.setPrefWidth(321);
        sepHS.setTranslateX(2);
        paneHsDiapo.setPrefWidth(325);
        Label lblTexteHS = new Label(rbLocalisation.getString("main.texteHotspot"));
        lblTexteHS.setTranslateX(10);
        TextField tfTexteHS = new TextField();
        if (getPanoramiquesProjet()[iNumPano].getHotspotDiapo(io).getStrInfo() != null) {
            tfTexteHS.setText(getPanoramiquesProjet()[iNumPano].getHotspotDiapo(io).getStrInfo());
        }
        tfTexteHS.textProperty().addListener((final ObservableValue<? extends String> observable,
                final String oldValue, final String newValue) -> {
            valideHS();
        });

        tfTexteHS.setId("txtDIA" + io);
        tfTexteHS.setPrefSize(200, 25);
        tfTexteHS.setMaxSize(200, 20);
        tfTexteHS.setTranslateX(60);
        vbPanneauHS.getChildren().addAll(lblPoint, sepHS, lblTexteHS, tfTexteHS);
        ComboBox cbListeDiapo = new ComboBox();
        for (int i = 0; i < getiNombreDiapo(); i++) {
            cbListeDiapo.getItems().add(diaporamas[i].getStrNomDiaporama());
        }
        cbListeDiapo.getSelectionModel()
                .select(getPanoramiquesProjet()[iNumPano].getHotspotDiapo(io).getiNumDiapo());
        int iii = io;
        cbListeDiapo.getSelectionModel().selectedIndexProperty().addListener((ov, av, nv) -> {
            getPanoramiquesProjet()[iNumPano].getHotspotDiapo(iii).setiNumDiapo((int) nv);
        });
        cbListeDiapo.setTranslateX(60);
        vbPanneauHS.getChildren().addAll(cbListeDiapo);
        //Ajouter Liste Diaporamas
        vbHotspots.getChildren().addAll(paneHsDiapo, lblSep);
        paneHsDiapo.setPrefHeight(120);
        paneHsDiapo.setMinHeight(120);
        paneHsDiapo.setMaxHeight(120);
        iTaillePane += 145;
    }
    valideHS();
    iNbHS += io;
    dejaCharge = true;
    paneHotSpots.setPrefHeight(iTaillePane);
    paneHotSpots.setMinHeight(iTaillePane);
    paneHotSpots.setMaxHeight(iTaillePane);
    paneHotSpots.setId("labels");
    apVisuHS.setPrefHeight(paneHotSpots.getPrefHeight());
    apVisuHS.setMinHeight(paneHotSpots.getPrefHeight());
    apVisuHS.setMaxHeight(paneHotSpots.getPrefHeight());
    vbVisuHotspots.setPrefHeight(paneHotSpots.getPrefHeight());
    vbVisuHotspots.setMinHeight(paneHotSpots.getPrefHeight());
    vbVisuHotspots.setMaxHeight(paneHotSpots.getPrefHeight());

    return paneHotSpots;
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @param i//from  ww w  .j  a  va2s. c o  m
 * @param longitude
 * @param latitude
 */
private static void afficheHSHTML(int i, double longitude, double latitude) {
    double largeur = ivImagePanoramique.getFitWidth();
    double X = (longitude + 180.0d) * largeur / 360.0d + ivImagePanoramique.getLayoutX();
    double Y = (90.0d - latitude) * largeur / 360.0d;
    Circle circPoint = new Circle(X, Y, 5);
    circPoint.setFill(Color.DARKGREEN);
    circPoint.setStroke(Color.YELLOWGREEN);
    circPoint.setId("html" + i);
    circPoint.setCursor(Cursor.DEFAULT);
    panePanoramique.getChildren().add(circPoint);
    Tooltip tltpHSImage = new Tooltip("HTML #" + (i + 1));
    tltpHSImage.setStyle(getStrTooltipStyle());
    Tooltip.install(circPoint, tltpHSImage);
    circPoint.setOnDragDetected((mouseEvent1) -> {
        circPoint.setFill(Color.YELLOWGREEN);
        circPoint.setStroke(Color.DARKGREEN);
        bDragDrop = true;
        mouseEvent1.consume();

    });
    circPoint.setOnMouseDragged((mouseEvent1) -> {
        double XX = mouseEvent1.getX() - ivImagePanoramique.getLayoutX();
        if (XX < 0) {
            XX = 0;
        }
        if (XX > ivImagePanoramique.getFitWidth()) {
            XX = ivImagePanoramique.getFitWidth();
        }
        circPoint.setCenterX(XX + ivImagePanoramique.getLayoutX());
        double YY = mouseEvent1.getY();
        if (YY < 0) {
            YY = 0;
        }
        if (YY > ivImagePanoramique.getFitHeight()) {
            YY = ivImagePanoramique.getFitHeight();
        }
        circPoint.setCenterY(YY);
        afficheLoupe(XX, YY);
        mouseEvent1.consume();

    });
    circPoint.setOnMouseReleased((mouseEvent1) -> {
        String strPoint = circPoint.getId();
        strPoint = strPoint.substring(4, strPoint.length());
        int iNumeroPoint = Integer.parseInt(strPoint);
        double X1 = mouseEvent1.getSceneX();
        double Y1 = mouseEvent1.getSceneY();
        double mouseX = X1 - ivImagePanoramique.getLayoutX();
        if (mouseX < 0) {
            mouseX = 0;
        }
        if (mouseX > ivImagePanoramique.getFitWidth()) {
            mouseX = ivImagePanoramique.getFitWidth();
        }
        double mouseY = Y1 - panePanoramique.getLayoutY() - 130 - getiDecalageMac();
        if (mouseY < 0) {
            mouseY = 0;
        }
        if (mouseY > ivImagePanoramique.getFitHeight()) {
            mouseY = ivImagePanoramique.getFitHeight();
        }

        double longit, lat;
        double larg = ivImagePanoramique.getFitWidth();
        String strLong, strLat;
        longit = 360.0f * mouseX / larg - 180;
        lat = 90.0d - 2.0f * mouseY / larg * 180.0f;
        getPanoramiquesProjet()[getiPanoActuel()].getHotspotHTML(iNumeroPoint).setLatitude(lat);
        getPanoramiquesProjet()[getiPanoActuel()].getHotspotHTML(iNumeroPoint).setLongitude(longit);
        circPoint.setFill(Color.DARKGREEN);
        circPoint.setStroke(Color.YELLOWGREEN);
        mouseEvent1.consume();

    });

    circPoint.setOnMouseClicked((mouseEvent1) -> {
        String strPoint = circPoint.getId();
        strPoint = strPoint.substring(4, strPoint.length());
        int iNum = Integer.parseInt(strPoint);
        Node nodePointImage;
        nodePointImage = (Node) panePanoramique.lookup("#html" + strPoint);

        if (mouseEvent1.isControlDown()) {
            valideHS();
            setbDejaSauve(false);
            getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");
            panePanoramique.getChildren().remove(nodePointImage);

            for (int io = iNum + 1; io < getiNumImages(); io++) {
                nodePointImage = (Node) panePanoramique.lookup("#html" + Integer.toString(io));
                nodePointImage.setId("img" + Integer.toString(io - 1));
            }
            /**
             * on retire les anciennes indication de HS
             */
            retireAffichageHotSpots();
            setiNumHTML(getiNumHTML() - 1);
            getPanoramiquesProjet()[getiPanoActuel()].removeHotspotHTML(iNum);
            /**
             * On les cre les nouvelles
             */
            ajouteAffichageHotspots();
            mouseEvent1.consume();
        } else {
            if (!bDragDrop) {
                EditeurHTML editHTML = new EditeurHTML();
                HotspotHTML HS = getPanoramiquesProjet()[getiPanoActuel()].getHotspotHTML(iNum);
                editHTML.setHsHTML(HS);
                Rectangle2D tailleEcran = Screen.getPrimary().getBounds();
                int iHauteur = (int) tailleEcran.getHeight() - 100;
                int iLargeur = (int) tailleEcran.getWidth() - 100;
                editHTML.affiche(iLargeur, iHauteur);
                editHTML.addPropertyChangeListener("bValide", (ev) -> {
                    if (ev.getNewValue().toString().equals("true")) {
                        getPanoramiquesProjet()[getiPanoActuel()].setHotspotHTML(editHTML.getHsHTML(), iNum);
                        dejaCharge = false;
                        retireAffichageHotSpots();
                        Pane affHS1 = paneAffichageHS(strListePano(), getiPanoActuel());
                        affHS1.setId("labels");
                        vbVisuHotspots.getChildren().add(affHS1);
                    }
                });
            } else {
                bDragDrop = false;
            }
            mouseEvent1.consume();
        }

    });
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @param X/*from  w  w  w . ja va  2  s. c om*/
 * @param Y
 */
private static void panoAjouteHTML(double X, double Y) {
    if (X > 0 && X < ivImagePanoramique.getFitWidth()) {
        valideHS();
        setbDejaSauve(false);
        getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");
        double mouseX = X;
        double mouseY = Y - panePanoramique.getLayoutY() - 130 - getiDecalageMac();
        double longitude, latitude;
        double largeur = ivImagePanoramique.getFitWidth();
        longitude = 360.0f * mouseX / largeur - 180;
        latitude = 90.0d - 2.0f * mouseY / largeur * 180.0f;
        Circle circPoint = new Circle(mouseX + ivImagePanoramique.getLayoutX(), mouseY, 5);
        circPoint.setFill(Color.DARKGREEN);
        circPoint.setStroke(Color.YELLOWGREEN);
        circPoint.setId("html" + getiNumHTML());
        circPoint.setCursor(Cursor.DEFAULT);
        panePanoramique.getChildren().add(circPoint);
        Tooltip tltpImage = new Tooltip("HTML n " + (getiNumHTML() + 1));
        tltpImage.setStyle(getStrTooltipStyle());
        Tooltip.install(circPoint, tltpImage);
        EditeurHTML editHTML = new EditeurHTML();
        HotspotHTML HS = new HotspotHTML();
        editHTML.setHsHTML(HS);
        HS.setLongitude(longitude);
        HS.setLatitude(latitude);
        Rectangle2D tailleEcran = Screen.getPrimary().getBounds();
        int iHauteur = (int) tailleEcran.getHeight() - 100;
        int iLargeur = (int) tailleEcran.getWidth() - 100;

        editHTML.affiche(iLargeur, iHauteur);

        editHTML.addPropertyChangeListener("bValide", (e) -> {
            if (e.getNewValue().toString().equals("true")) {
                setiNumHTML(getiNumHTML() + 1);
                getPanoramiquesProjet()[getiPanoActuel()].addHotspotHTML(editHTML.getHsHTML());
                retireAffichageHotSpots();
                dejaCharge = false;
                Pane affHS1 = paneAffichageHS(strListePano(), getiPanoActuel());
                affHS1.setId("labels");
                vbVisuHotspots.getChildren().add(affHS1);
                spPanneauOutils.setVvalue(spPanneauOutils.getVvalue() + 145);
            }
        });
        editHTML.addPropertyChangeListener("bAnnule", (e) -> {
            if (e.getNewValue().toString().equals("true")) {
                String strPoint = circPoint.getId();
                strPoint = strPoint.substring(4, strPoint.length());
                Node nodeImage = (Node) panePanoramique.lookup("#html" + strPoint);
                panePanoramique.getChildren().remove(nodeImage);
            }
        });

        valideHS();
        circPoint.setOnDragDetected((mouseEvent1) -> {
            circPoint.setFill(Color.YELLOWGREEN);
            circPoint.setStroke(Color.DARKGREEN);
            bDragDrop = true;
            mouseEvent1.consume();

        });
        circPoint.setOnMouseDragged((mouseEvent1) -> {
            double XX = mouseEvent1.getX() - ivImagePanoramique.getLayoutX();
            if (XX < 0) {
                XX = 0;
            }
            if (XX > ivImagePanoramique.getFitWidth()) {
                XX = ivImagePanoramique.getFitWidth();
            }
            circPoint.setCenterX(XX + ivImagePanoramique.getLayoutX());
            double YY = mouseEvent1.getY();
            if (YY < 0) {
                YY = 0;
            }
            if (YY > ivImagePanoramique.getFitHeight()) {
                YY = ivImagePanoramique.getFitHeight();
            }
            circPoint.setCenterY(YY);
            afficheLoupe(XX, YY);
            mouseEvent1.consume();

        });
        circPoint.setOnMouseReleased((mouseEvent1) -> {
            setbDejaSauve(false);
            getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");
            String strPoint = circPoint.getId();
            strPoint = strPoint.substring(4, strPoint.length());
            int iNumeroPoint = Integer.parseInt(strPoint);
            double X1 = mouseEvent1.getSceneX();
            double Y1 = mouseEvent1.getSceneY();
            double mouseX1 = X1 - ivImagePanoramique.getLayoutX();
            if (mouseX1 < 0) {
                mouseX1 = 0;
            }
            if (mouseX1 > ivImagePanoramique.getFitWidth()) {
                mouseX1 = ivImagePanoramique.getFitWidth();
            }

            double mouseY1 = Y1 - panePanoramique.getLayoutY() - 130 - getiDecalageMac();
            if (mouseY1 < 0) {
                mouseY1 = 0;
            }
            if (mouseY1 > ivImagePanoramique.getFitHeight()) {
                mouseY1 = ivImagePanoramique.getFitHeight();
            }

            double longit, lat;
            double larg = ivImagePanoramique.getFitWidth();
            longit = 360.0f * mouseX1 / larg - 180;
            lat = 90.0d - 2.0f * mouseY1 / larg * 180.0f;
            getPanoramiquesProjet()[getiPanoActuel()].getHotspotHTML(iNumeroPoint).setLatitude(lat);
            getPanoramiquesProjet()[getiPanoActuel()].getHotspotHTML(iNumeroPoint).setLongitude(longit);
            circPoint.setFill(Color.DARKGREEN);
            circPoint.setStroke(Color.YELLOWGREEN);
            mouseEvent1.consume();

        });

        circPoint.setOnMouseClicked((mouseEvent1) -> {
            String strPoint = circPoint.getId();
            strPoint = strPoint.substring(4, strPoint.length());
            int iNum = Integer.parseInt(strPoint);
            if (mouseEvent1.isControlDown()) {
                setbDejaSauve(false);
                getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");
                Node nodeImage;
                nodeImage = (Node) panePanoramique.lookup("#html" + strPoint);
                panePanoramique.getChildren().remove(nodeImage);

                for (int io = iNum + 1; io < getiNumHTML(); io++) {
                    nodeImage = (Node) panePanoramique.lookup("#html" + Integer.toString(io));
                    nodeImage.setId("html" + Integer.toString(io - 1));
                }
                /**
                 * on retire les anciennes indication de HS
                 */
                retireAffichageHotSpots();
                setiNumHTML(getiNumHTML() - 1);
                getPanoramiquesProjet()[getiPanoActuel()].removeHotspotHTML(iNum);
                /**
                 * On les cre les nouvelles
                 */
                ajouteAffichageHotspots();
            } else {
                if (!bDragDrop) {
                    setbDejaSauve(false);
                    getStPrincipal().setTitle(getStPrincipal().getTitle().replace(" *", "") + " *");

                    EditeurHTML editHTML1 = new EditeurHTML();
                    HotspotHTML HS1 = getPanoramiquesProjet()[getiPanoActuel()].getHotspotHTML(iNum);
                    editHTML1.setHsHTML(HS1);
                    Rectangle2D tailleEcran1 = Screen.getPrimary().getBounds();
                    int iHauteur1 = (int) tailleEcran1.getHeight() - 100;
                    int iLargeur1 = (int) tailleEcran1.getWidth() - 100;
                    editHTML1.affiche(iLargeur1, iHauteur1);
                    editHTML1.addPropertyChangeListener("bValide", (ev) -> {
                        if (ev.getNewValue().toString().equals("true")) {
                            getPanoramiquesProjet()[getiPanoActuel()].setHotspotHTML(editHTML1.getHsHTML(),
                                    iNum);
                            retireAffichageHotSpots();
                            dejaCharge = false;
                            Pane affHS1 = paneAffichageHS(strListePano(), getiPanoActuel());
                            affHS1.setId("labels");
                            vbVisuHotspots.getChildren().add(affHS1);
                            apVisuHS.setPrefHeight(affHS1.getPrefHeight());
                        }
                    });
                } else {
                    bDragDrop = false;
                }
                mouseEvent1.consume();
            }
            valideHS();
            mouseEvent1.consume();
        });

    }
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 * +//from w  ww. ja v a  2 s. com
 *
 * @param iNumPanochoisi
 */
@SuppressWarnings("empty-statement")
public static void affichePanoChoisit(int iNumPanochoisi) {
    ivImagePanoramique.setImage(getPanoramiquesProjet()[iNumPanochoisi].getImgPanoramique());
    Node nodeLegende = (Node) apPanneauPrincipal.lookup("#legende");
    nodeLegende.setVisible(true);
    retireAffichagePointsHotSpots();
    retireAffichageHotSpots();
    retireAffichageLigne();
    setiPanoActuel(iNumPanochoisi);

    if (getPanoramiquesProjet()[iNumPanochoisi].getStrTypePanoramique().equals(Panoramique.CUBE)) {
        ivLoupe.setImage(getPanoramiquesProjet()[iNumPanochoisi].getImgCubeEqui());
    } else {
        String strFicImage = getStrRepertPanos() + File.separator + "panovisu" + iNumPanochoisi + ".jpg";
        ivLoupe.setImage(new Image("file:" + strFicImage));
        ivLoupe.setSmooth(true);
        ivLoupe.setPreserveRatio(true);
        ivLoupe.setFitWidth(8000);
    }
    ivLoupe.setClip(new Circle(4000, 2000, getiTailleLoupe() / 2));
    ivLoupe.setLayoutX(-4000 + getiTailleLoupe() / 2 + 10);
    ivLoupe.setLayoutY(-2000 + getiTailleLoupe() / 2 + 10);
    apLoupe.setPrefSize(getiTailleLoupe() + 20, getiTailleLoupe() + 20);
    apLoupe.setMinSize(getiTailleLoupe() + 20, getiTailleLoupe() + 20);
    apLoupe.setMaxSize(getiTailleLoupe() + 20, getiTailleLoupe() + 20);
    //apLoupe.setStyle("-fx-border-width : 2px;-fx-background-color : blue;-fx-border-color :darkblue;");
    creeLoupe();
    panePanoramique.setOnMouseEntered((me) -> {
        if (isAfficheLoupe()) {
            apLoupe.setVisible(true);
        }
    });
    panePanoramique.setOnMouseExited((me) -> {
        apLoupe.setVisible(false);
    });
    setiNumPoints(0);
    if (navigateurPanoramique == null) {
        Rectangle2D tailleEcran = Screen.getPrimary().getBounds();
        int iHauteur;
        if (isMac()) {
            iHauteur = (int) tailleEcran.getHeight() - 230;
        } else {
            iHauteur = (int) tailleEcran.getHeight() - 170;
        }
        int iLargeur = (int) tailleEcran.getWidth() - 20;
        apVisuPanoramique.getChildren().clear();
        Pane paneFond = new Pane();
        paneFond.setPrefSize(24, 24);
        Image imgExpand = new Image("file:" + getStrRepertAppli() + "/images/expand.png", 32, 24, false, true);
        Image imgShrink = new Image("file:" + getStrRepertAppli() + "/images/shrink.png", 32, 24, false, true);
        ImageView ivExpShrk = new ImageView(imgExpand);
        paneFond.setLayoutX(10);
        paneFond.setLayoutY(10);
        paneFond.getChildren().add(ivExpShrk);
        navigateurPanoramique = new NavigateurPanoramique(
                getPanoramiquesProjet()[iNumPanochoisi].getImgVisuPanoramique(), 10.d, 10.d, 340, 170);
        apVisuPano = navigateurPanoramique.affichePano();
        navigateurPanoramique.addPropertyChangeListener("positNord", (e) -> {
            double longitude = Math.round(Double.parseDouble(e.getNewValue().toString()) * 10) / 10.d - 180;
            longitude = longitude % 360;
            longitude = longitude < 0 ? longitude + 360 : longitude;
            longitude = longitude > 180 ? longitude - 360 : longitude;
            getPanoramiquesProjet()[getiPanoActuel()].setZeroNord(longitude);
            afficheNord(longitude);
        });
        navigateurPanoramique.addPropertyChangeListener("choixLatitude", (e) -> {
            double latitude = Math.round(navigateurPanoramique.getChoixLatitude() * 10) / 10.d;
            double longitude = Math.round(navigateurPanoramique.getChoixLongitude() * 10) / 10.d - 180;
            double fov = Math.round(navigateurPanoramique.getChoixFov() * 10) / 10.d;
            longitude = longitude % 360;
            longitude = longitude < 0 ? longitude + 360 : longitude;
            longitude = longitude > 180 ? longitude - 360 : longitude;

            getPanoramiquesProjet()[getiPanoActuel()].setRegardX(longitude);
            getPanoramiquesProjet()[getiPanoActuel()].setRegardY(latitude);
            getPanoramiquesProjet()[getiPanoActuel()].setChampVisuel(fov);
            affichePoV(longitude, latitude, fov);
        });
        navigateurPanoramique.addPropertyChangeListener("choixLongitude", (e) -> {
            double latitude = Math.round(navigateurPanoramique.getChoixLatitude() * 10) / 10.d;
            double longitude = Math.round(navigateurPanoramique.getChoixLongitude() * 10) / 10.d - 180;
            double fov = Math.round(navigateurPanoramique.getChoixFov() * 10) / 10.d;
            longitude = longitude % 360;
            longitude = longitude < 0 ? longitude + 360 : longitude;
            longitude = longitude > 180 ? longitude - 360 : longitude;
            getPanoramiquesProjet()[getiPanoActuel()].setRegardX(longitude);
            getPanoramiquesProjet()[getiPanoActuel()].setRegardY(latitude);
            getPanoramiquesProjet()[getiPanoActuel()].setChampVisuel(fov);
            affichePoV(longitude, latitude, fov);
        });
        navigateurPanoramique.addPropertyChangeListener("choixFov", (e) -> {
            double latitude = Math.round(navigateurPanoramique.getChoixLatitude() * 10) / 10.d;
            double longitude = Math.round(navigateurPanoramique.getChoixLongitude() * 10) / 10.d - 180;
            double fov = Math.round(navigateurPanoramique.getChoixFov() * 10) / 10.d;
            longitude = longitude % 360;
            longitude = longitude < 0 ? longitude + 360 : longitude;
            longitude = longitude > 180 ? longitude - 360 : longitude;
            getPanoramiquesProjet()[getiPanoActuel()].setRegardX(longitude);
            getPanoramiquesProjet()[getiPanoActuel()].setRegardY(latitude);
            getPanoramiquesProjet()[getiPanoActuel()].setChampVisuel(fov);
            affichePoV(longitude, latitude, fov);
        });
        navigateurPanoramique.setPositNord(getPanoramiquesProjet()[iNumPanochoisi].getZeroNord() - 180);
        navigateurPanoramique.setLongitude(getPanoramiquesProjet()[iNumPanochoisi].getRegardX() - 180);
        navigateurPanoramique.setLatitude(getPanoramiquesProjet()[iNumPanochoisi].getRegardY());
        navigateurPanoramique.setFov(getPanoramiquesProjet()[iNumPanochoisi].getChampVisuel());
        navigateurPanoramique.setChoixLatitude(navigateurPanoramique.getLatitude());
        navigateurPanoramique.setChoixLongitude(navigateurPanoramique.getLongitude());
        navigateurPanoramique.setChoixFov(navigateurPanoramique.getFov());
        apVisuPano.getChildren().add(paneFond);
        apVisuPanoramique.getChildren().addAll(apVisuPano);

        paneFond.setOnMouseClicked((ev) -> {
            if (bPleinEcranPanoramique) {
                navigateurPanoramique.changeTaille(340, 200);
                apVisuPano.getChildren().add(paneFond);
                ivExpShrk.setImage(imgExpand);
                apEnvironnement.getChildren().remove(apVisuPano);
                apVisuPanoramique.getChildren().add(apVisuPano);
                bPleinEcranPanoramique = false;
                mbarPrincipal.setDisable(false);
                bbarPrincipal.setDisable(false);
                hbBarreBouton.setDisable(false);
                tpEnvironnement.setDisable(false);

            } else {
                bPleinEcranPanoramique = true;
                navigateurPanoramique.changeTaille(iLargeur, iHauteur);
                ivExpShrk.setImage(imgShrink);
                apVisuPano.getChildren().add(paneFond);
                apVisuPanoramique.getChildren().remove(apVisuPano);
                apEnvironnement.getChildren().add(apVisuPano);
                mbarPrincipal.setDisable(true);
                bbarPrincipal.setDisable(true);
                hbBarreBouton.setDisable(true);
                tpEnvironnement.setDisable(true);
            }
        });
        navigateurPanoramique.affiche();
    } else {
        navigateurPanoramique.setImagePanoramique(getPanoramiquesProjet()[iNumPanochoisi].getStrNomFichier(),
                getPanoramiquesProjet()[iNumPanochoisi].getImgVisuPanoramique());
        navigateurPanoramique.setPositNord(getPanoramiquesProjet()[iNumPanochoisi].getZeroNord() - 180);
        navigateurPanoramique.setLongitude(getPanoramiquesProjet()[iNumPanochoisi].getRegardX() - 180);
        navigateurPanoramique.setLatitude(getPanoramiquesProjet()[iNumPanochoisi].getRegardY());
        navigateurPanoramique.setFov(getPanoramiquesProjet()[iNumPanochoisi].getChampVisuel());
        navigateurPanoramique.affiche();
    }
    if (getPanoramiquesProjet()[iNumPanochoisi].getMarqueurGeolocatisation() != null) {
        tfLatitude.setText(CoordonneesGeographiques
                .toDMS(getPanoramiquesProjet()[iNumPanochoisi].getMarqueurGeolocatisation().getLatitude()));
        tfLongitude.setText(CoordonneesGeographiques
                .toDMS(getPanoramiquesProjet()[iNumPanochoisi].getMarqueurGeolocatisation().getLongitude()));
        getPoGeolocalisation().setbValide(true);
    } else {
        if (isbInternet()) {
            tfLatitude.setText("");
            tfLongitude.setText("");
            getPoGeolocalisation().setbValide(false);
        }

    }
    ajouteAffichagePointsHotspots();
    ajouteAffichagePointsHotspotsImage();
    ajouteAffichagePointsHotspotsHTML();
    ajouteAffichagePointsHotspotsDiapo();

    ajouteAffichageHotspots();
    affichePoV(getPanoramiquesProjet()[iNumPanochoisi].getRegardX(),
            getPanoramiquesProjet()[iNumPanochoisi].getRegardY(),
            getPanoramiquesProjet()[iNumPanochoisi].getChampVisuel());
    afficheNord(getPanoramiquesProjet()[iNumPanochoisi].getZeroNord());
    ajouteAffichageLignes();
    afficheInfoPano();
    cbListeChoixPanoramique.setValue(cbListeChoixPanoramique.getItems().get(getiPanoActuel()));
    int iPano = -1;
    int ii = 0;
    for (String stNumPano : ordPano.getStrPanos()) {
        if (Integer.parseInt(stNumPano) == iNumPanochoisi) {
            iPano = ii;
        }
        ii++;
    }
    rectVignettePano.setLayoutY((iLargeurVignettes / 2 + 10) * iPano + 10);
    rectVignettePano.setVisible(true);
    cbMinLat.setSelected(getPanoramiquesProjet()[iNumPanochoisi].isbMinLat());
    cbMaxLat.setSelected(getPanoramiquesProjet()[iNumPanochoisi].isbMaxLat());
    if (cbMinLat.isSelected()) {
        slMinLat.setValue(getPanoramiquesProjet()[iNumPanochoisi].getMinLat());
    } else {
        slMinLat.setValue(-90);
    }
    if (cbMaxLat.isSelected()) {
        slMaxLat.setValue(getPanoramiquesProjet()[iNumPanochoisi].getMaxLat());
    } else {
        slMaxLat.setValue(90);
    }
    slMinFov.setValue(getPanoramiquesProjet()[iNumPanochoisi].getFovMin());
    slMaxFov.setValue(getPanoramiquesProjet()[iNumPanochoisi].getFovMax());
    navigateurPanoramique.setMaxFov(getPanoramiquesProjet()[iNumPanochoisi].getFovMax());
    navigateurPanoramique.setMinFov(getPanoramiquesProjet()[iNumPanochoisi].getFovMin());
    double largeurImage1 = panePanoramique.getPrefWidth();
    double X11 = ivImagePanoramique.getLayoutX();
    double Y1 = (90.0d - (double) slMinLat.getValue()) * largeurImage1 / 360.0d;
    ligNadir.setStartX(X11);
    ligNadir.setStartY(Y1);
    ligNadir.setEndX(X11 + largeurImage1);
    ligNadir.setEndY(Y1);
    Y1 = (90.0d - (double) (double) slMaxLat.getValue()) * largeurImage1 / 360.0d;
    ligZenith.setStartX(X11);
    ligZenith.setStartY(Y1);
    ligZenith.setEndX(X11 + largeurImage1);
    ligZenith.setEndY(Y1);

    panePanoramique.getChildren().remove(ligNadir);
    panePanoramique.getChildren().remove(ligZenith);
    panePanoramique.getChildren().addAll(ligNadir, ligZenith);
}