diff --git a/README.txt b/README.txt index 5e86978..e9d0461 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -Readme to be completeds -Pauline -Joao -Laura +Trinus +C:\Users\Public\Desktop\Trinus Cardboard.lnk +Revit +C:\Users\Public\Desktop\Oracle VM VirtualBox.lnk diff --git a/bin/Application1/Fenetre$1.class b/bin/Application1/Fenetre$1.class index 3c0a561..dc76c58 100644 Binary files a/bin/Application1/Fenetre$1.class and b/bin/Application1/Fenetre$1.class differ diff --git a/bin/Application1/Fenetre$2.class b/bin/Application1/Fenetre$2.class index a66b62b..7fbef04 100644 Binary files a/bin/Application1/Fenetre$2.class and b/bin/Application1/Fenetre$2.class differ diff --git a/bin/Application1/Fenetre$3.class b/bin/Application1/Fenetre$3.class index ca16587..e0f25e4 100644 Binary files a/bin/Application1/Fenetre$3.class and b/bin/Application1/Fenetre$3.class differ diff --git a/bin/Application1/Fenetre.class b/bin/Application1/Fenetre.class index 75c419d..71967e4 100644 Binary files a/bin/Application1/Fenetre.class and b/bin/Application1/Fenetre.class differ diff --git a/bin/Application1/Main.class b/bin/Application1/Main.class index 8e0a4fa..d2b124a 100644 Binary files a/bin/Application1/Main.class and b/bin/Application1/Main.class differ diff --git a/bin/Application1/Pages/Page1.class b/bin/Application1/Pages/Page1.class new file mode 100644 index 0000000..116d1b3 Binary files /dev/null and b/bin/Application1/Pages/Page1.class differ diff --git a/bin/Application1/Pages/Page2.class b/bin/Application1/Pages/Page2.class new file mode 100644 index 0000000..0fe2023 Binary files /dev/null and b/bin/Application1/Pages/Page2.class differ diff --git a/bin/Application1/Pages/Page3$1.class b/bin/Application1/Pages/Page3$1.class new file mode 100644 index 0000000..6ccd6a0 Binary files /dev/null and b/bin/Application1/Pages/Page3$1.class differ diff --git a/bin/Application1/Pages/Page3.class b/bin/Application1/Pages/Page3.class new file mode 100644 index 0000000..cffb5bb Binary files /dev/null and b/bin/Application1/Pages/Page3.class differ diff --git a/bin/Application1/Pages/Page4.class b/bin/Application1/Pages/Page4.class new file mode 100644 index 0000000..4c0194e Binary files /dev/null and b/bin/Application1/Pages/Page4.class differ diff --git a/bin/Application1/Pages/Page5$1.class b/bin/Application1/Pages/Page5$1.class new file mode 100644 index 0000000..368aad2 Binary files /dev/null and b/bin/Application1/Pages/Page5$1.class differ diff --git a/bin/Application1/Pages/Page5.class b/bin/Application1/Pages/Page5.class new file mode 100644 index 0000000..2cef105 Binary files /dev/null and b/bin/Application1/Pages/Page5.class differ diff --git a/bin/Application1/Pages/Page6$1.class b/bin/Application1/Pages/Page6$1.class new file mode 100644 index 0000000..483d30b Binary files /dev/null and b/bin/Application1/Pages/Page6$1.class differ diff --git a/bin/Application1/Pages/Page6$2.class b/bin/Application1/Pages/Page6$2.class new file mode 100644 index 0000000..f4f2532 Binary files /dev/null and b/bin/Application1/Pages/Page6$2.class differ diff --git a/bin/Application1/Pages/Page6.class b/bin/Application1/Pages/Page6.class new file mode 100644 index 0000000..b8d9be1 Binary files /dev/null and b/bin/Application1/Pages/Page6.class differ diff --git a/bin/Application1/Pages/Page7$1.class b/bin/Application1/Pages/Page7$1.class new file mode 100644 index 0000000..b10dc51 Binary files /dev/null and b/bin/Application1/Pages/Page7$1.class differ diff --git a/bin/Application1/Pages/Page7$2.class b/bin/Application1/Pages/Page7$2.class new file mode 100644 index 0000000..5bfc0e6 Binary files /dev/null and b/bin/Application1/Pages/Page7$2.class differ diff --git a/bin/Application1/Pages/Page7$3.class b/bin/Application1/Pages/Page7$3.class new file mode 100644 index 0000000..d546c8b Binary files /dev/null and b/bin/Application1/Pages/Page7$3.class differ diff --git a/bin/Application1/Pages/Page7$4.class b/bin/Application1/Pages/Page7$4.class new file mode 100644 index 0000000..9051c49 Binary files /dev/null and b/bin/Application1/Pages/Page7$4.class differ diff --git a/bin/Application1/Pages/Page7$5.class b/bin/Application1/Pages/Page7$5.class new file mode 100644 index 0000000..0ed226f Binary files /dev/null and b/bin/Application1/Pages/Page7$5.class differ diff --git a/bin/Application1/Pages/Page7.class b/bin/Application1/Pages/Page7.class new file mode 100644 index 0000000..325e65e Binary files /dev/null and b/bin/Application1/Pages/Page7.class differ diff --git a/bin/Application1/PathVar.class b/bin/Application1/PathVar.class new file mode 100644 index 0000000..62cbf5b Binary files /dev/null and b/bin/Application1/PathVar.class differ diff --git a/bin/Application1/carte$1.class b/bin/Application1/carte$1.class deleted file mode 100644 index 5c31ddb..0000000 Binary files a/bin/Application1/carte$1.class and /dev/null differ diff --git a/bin/Application1/carte$2.class b/bin/Application1/carte$2.class deleted file mode 100644 index 0d538e3..0000000 Binary files a/bin/Application1/carte$2.class and /dev/null differ diff --git a/bin/Application1/carte$3.class b/bin/Application1/carte$3.class deleted file mode 100644 index 4b72497..0000000 Binary files a/bin/Application1/carte$3.class and /dev/null differ diff --git a/bin/Application1/carte$4.class b/bin/Application1/carte$4.class deleted file mode 100644 index 8604c77..0000000 Binary files a/bin/Application1/carte$4.class and /dev/null differ diff --git a/bin/Application1/carte$5.class b/bin/Application1/carte$5.class deleted file mode 100644 index 27ddd4f..0000000 Binary files a/bin/Application1/carte$5.class and /dev/null differ diff --git a/bin/Application1/carte$6.class b/bin/Application1/carte$6.class deleted file mode 100644 index d8091ed..0000000 Binary files a/bin/Application1/carte$6.class and /dev/null differ diff --git a/bin/Application1/carte$7.class b/bin/Application1/carte$7.class deleted file mode 100644 index fc7ef29..0000000 Binary files a/bin/Application1/carte$7.class and /dev/null differ diff --git a/bin/Application1/carte$8.class b/bin/Application1/carte$8.class deleted file mode 100644 index 757ca17..0000000 Binary files a/bin/Application1/carte$8.class and /dev/null differ diff --git a/bin/Application1/carte$9.class b/bin/Application1/carte$9.class deleted file mode 100644 index b98493d..0000000 Binary files a/bin/Application1/carte$9.class and /dev/null differ diff --git a/bin/Application1/carte.class b/bin/Application1/carte.class index 09433b8..060f955 100644 Binary files a/bin/Application1/carte.class and b/bin/Application1/carte.class differ diff --git a/src/Application1/Fenetre.java b/src/Application1/Fenetre.java index 7fc43d5..06b53f7 100644 --- a/src/Application1/Fenetre.java +++ b/src/Application1/Fenetre.java @@ -25,6 +25,9 @@ import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; +import javax.swing.border.EtchedBorder; + +import Application1.Pages.*; public class Fenetre extends JFrame implements ActionListener{ @@ -67,6 +70,11 @@ public class Fenetre extends JFrame implements ActionListener{ cl = new CardLayout(); + Border border = BorderFactory.createEtchedBorder(EtchedBorder.RAISED); + Border blackline = BorderFactory.createLineBorder(Color.black); + Border compound; + compound = BorderFactory.createCompoundBorder(border, blackline); + g=getGraphics(); @@ -82,13 +90,13 @@ public class Fenetre extends JFrame implements ActionListener{ //Création des pages ImagePanel card1 = new ImagePanel("test.png"); - carte card2 = new carte(2,1); - carte card3 = new carte(3,1); - carte card4 = new carte(4,1); - carte card5 = new carte (5,1); - carte card6 = new carte (6,1); - carte card7 = new carte (7,1); - carte card8 = new carte(8,1); + Page1 card2 = new Page1(15,compound); + Page2 card3 = new Page2(15,compound); + Page3 card4 = new Page3(15,compound); + Page4 card5 = new Page4 (15,compound); + Page5 card6 = new Page5(15,compound); + Page6 card7 = new Page6(15,compound); + Page7 card8 = new Page7(15,compound); cl.setHgap(10); cl.setVgap(10); diff --git a/src/Application1/Main.java b/src/Application1/Main.java index 4dbed4e..9a68619 100644 --- a/src/Application1/Main.java +++ b/src/Application1/Main.java @@ -7,18 +7,13 @@ import java.io.IOException; public class Main { public static void main(String[] args) { Fenetre fenetre = new Fenetre(); - Desktop Starter = Desktop.getDesktop(); - File file = new File("C:\\Users\\nunes\\Desktop\\Travail\\PIR\\Software\\Glovepie\\WiimoteScripts\\Test.PIE"); - /*try { - //Starter.open(file); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - */ + + + + diff --git a/src/Application1/Pages/Page1.java b/src/Application1/Pages/Page1.java new file mode 100644 index 0000000..af4c1bf --- /dev/null +++ b/src/Application1/Pages/Page1.java @@ -0,0 +1,105 @@ +package Application1.Pages; + +import java.awt.GridLayout; + +import javax.swing.JPanel; +import javax.swing.border.Border; + +import Application1.TextPanel; + +public class Page1 extends JPanel { + + public Page1(int taillePolice, Border bordure){ + //Initialitsation + TextPanel cadran1; + TextPanel cadran2; + TextPanel cadran3; + TextPanel cadran4; + GridLayout g= new GridLayout(2,2); + g.setHgap(10); + g.setVgap(10); + setLayout(g); + + + //Cadran 1 + cadran1 = new TextPanel(taillePolice); + + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Du BIM à la Réalité Virtuelle! \n"); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Projet issu d'une collaboration entre l'INSA et l'ISDAT. \n"); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" A partir d'une simulation BIM réalisée par les élèves de l'ISDAT, \n"); + cadran1.AjouterParagraph(" ceux de l'INSA ont mis au point une application permettant \n"); + cadran1.AjouterParagraph(" de visualiser un environnement virtuel dépendant \n"); + cadran1.AjouterParagraph(" de la maquette BIM, afin d'intéragir avec \n"); + cadran1.AjouterParagraph(" lui au sein de cette réalité virtuelle. \n"); + + cadran1.setEditable(false); + cadran1.setBorder(bordure); + + + //Cadran 2 + cadran2 = new TextPanel(taillePolice); + + cadran2.AjouterParagraph(" \n"); + cadran2.AjouterParagraph(" Participants à la réalisation du projet : \n"); + cadran2.AjouterParagraph(" \n"); + cadran2.AjouterParagraph(" Elèves de l'INSA : Elèves de l'ISDAT : Tuteurs : \n"); + cadran2.AjouterParagraph(" \n"); + cadran2.AjouterParagraph(" AMOUR Chadi BRUYERE Nathalie \n"); + cadran2.AjouterParagraph(" BERRADA El Ghali MONTEIL Thierry \n"); + cadran2.AjouterParagraph(" BERTA Pauline \n"); + cadran2.AjouterParagraph(" BOUOULID Ilias \n"); + cadran2.AjouterParagraph(" NUNES Joao \n"); + cadran2.AjouterParagraph(" POLONI Laura \n"); + cadran2.AjouterParagraph(" \n"); + cadran2.setEditable(false); + cadran2.setBorder(bordure); + + + //Cadran 3 + + cadran3 = new TextPanel(taillePolice); + + cadran3.AjouterParagraph(" \n"); + cadran3.AjouterParagraph(" Logiciels nécessaires à la bonne réalisation du projet : \n"); + cadran3.AjouterParagraph(" \n"); + cadran3.AjouterParagraph(" Revit \n"); + cadran3.AjouterParagraph(" GrassHopper (avec son plugin) \n"); + cadran3.AjouterParagraph(" Trinus \n"); + cadran3.AjouterParagraph(" GlovePie \n"); + cadran3.AjouterParagraph(" \n"); + cadran3.AjouterParagraph(" Nous vous expliquerons par la suite quels sont les logiciels \n"); + cadran3.AjouterParagraph(" prérequis, et quels sont ceux dont nous allons guider l'installation. \n"); + cadran3.setEditable(false); + cadran3.setBorder(bordure); + + + //Cadran 4 + + cadran4 = new TextPanel(taillePolice); + + cadran4.AjouterParagraph(" \n"); + cadran4.AjouterParagraph(" Matériel nécessaire à la bonne réalisation du projet : \n"); + cadran4.AjouterParagraph(" \n"); + cadran4.AjouterParagraph(" Wiimote \n"); + cadran4.AjouterParagraph(" Sensor bar \n"); + cadran4.AjouterParagraph(" Masque \n"); + cadran4.AjouterParagraph(" Smartphone \n"); + cadran4.AjouterParagraph(" \n"); + cadran4.AjouterParagraph(" Nous vous expliquerons par la suite quel sera l'utilisation \n"); + cadran4.AjouterParagraph(" de chaque matériel et comment les mettre en place. \n"); + cadran4.setEditable(false); + cadran4.setBorder(bordure); + + //Ajouter les cadrans + add(cadran1); + add(cadran2); + add(cadran3); + add(cadran4); + + + } + +} diff --git a/src/Application1/Pages/Page2.java b/src/Application1/Pages/Page2.java new file mode 100644 index 0000000..d999929 --- /dev/null +++ b/src/Application1/Pages/Page2.java @@ -0,0 +1,102 @@ +package Application1.Pages; + +import java.awt.GridLayout; + +import javax.swing.JPanel; + +import javax.swing.border.*; + +import Application1.TextPanel; + +public class Page2 extends JPanel { + + public Page2(int taillePolice, Border bordure){ + //Initialitsation + TextPanel cadran1; + TextPanel cadran2; + TextPanel cadran3; + TextPanel cadran4; + GridLayout g= new GridLayout(2,2); + g.setHgap(10); + g.setVgap(10); + setLayout(g); + + //Cadran 1 + + cadran1 = new TextPanel(taillePolice); + cadran1.setBorder(bordure); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Pour le bon fonctionnement du système, il faut va falloir \n"); + cadran1.AjouterParagraph(" que vous installiez au préalable deux logiciels.\n"); + cadran1.AjouterParagraph(" * Revit (Développement d'Objets et de Structures 3D) \n"); + cadran1.AjouterParagraph(" * Grasshopper (Outil utilisé en Association avec Revit)\n"); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Vérifier bien que la connexion bluetooth fonctionne sur votre machine, \n"); + cadran1.AjouterParagraph(" elle sera nécessaire pour connecter votre wiimote à l'ordinateur. \n"); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Lorsque tous les pré-requis précédent sont installés et vérifiés \n"); + cadran1.AjouterParagraph(" vous pouvez passez à la suite!\n"); + cadran1.AjouterParagraph(" \n"); + cadran1.setEditable(false); + + //Cadran 2 + + cadran2 = new TextPanel(taillePolice); + + cadran2.setBorder(bordure); + cadran2.AjouterParagraph(" \n"); + cadran2.AjouterParagraph(" Avant de pouvoir utiliser l'application il reste \n"); + cadran2.AjouterParagraph(" quelques étapes à parcourir. \n"); + cadran2.AjouterParagraph(" \n"); + cadran2.AjouterParagraph(" Nous allons vous guider dans l'installation de deux derniers \n"); + cadran2.AjouterParagraph(" logiciels, tels que : \n"); + cadran2.AjouterParagraph(" * GlovePie (Emulateur de Clavier et Souris) \n"); + cadran2.AjouterParagraph(" * Trinus (Convertisseur d'Images Classiques en Images au format VR) \n"); + cadran2.AjouterParagraph(" \n"); + cadran2.AjouterParagraph(" Sur la page suivante les démarches vous sont expliquées pas-à-pas! \n"); + cadran2.AjouterParagraph(" \n"); + cadran2.setEditable(false); + + //Cadran 3 + cadran3 = new TextPanel(taillePolice); + + cadran3.setBorder(bordure); + cadran3.AjouterParagraph(" \n"); + cadran3.AjouterParagraph(" Vous pouvez remarquer plusieurs boutons à votre disposition ci-dessous. \n"); + cadran3.AjouterParagraph(" \n"); + cadran3.AjouterParagraph(" Vous avez la possibilité à tout moment de retourner sur la page \n"); + cadran3.AjouterParagraph(" précédente avec le bouton PRECEDENT. \n"); + cadran3.AjouterParagraph(" \n"); + cadran3.AjouterParagraph(" De la même manière, vous avez la possibilité de passer à la \n"); + cadran3.AjouterParagraph(" suivante avec le bouton SUIVANT.\n"); + cadran3.AjouterParagraph(" \n"); + cadran3.setEditable(false); + + //Cadran 4 + + cadran4 = new TextPanel(taillePolice); + + cadran4.setBorder(bordure); + cadran4.AjouterParagraph(" \n"); + cadran4.AjouterParagraph(" Le bouton LANCER VR est là pour vous permettre de passer en un \n"); + cadran4.AjouterParagraph(" clic toute la partie Installation des logiciels GlovePie et Trinus.\n"); + cadran4.AjouterParagraph(" \n"); + cadran4.AjouterParagraph(" ! Si vous avez déjà réaliser les installations sur votre machine \n"); + cadran4.AjouterParagraph(" lors d'une précédente utilisation, il n'est pas nécessaire de \n"); + cadran4.AjouterParagraph(" recommencer ! \n"); + cadran4.AjouterParagraph(" \n"); + cadran4.AjouterParagraph(" ! Cliquer directement sur LANCER VR ! \n"); + cadran4.AjouterParagraph(" \n"); + cadran4.setEditable(false); + + + //Ajouter les cadrans + add(cadran1); + add(cadran2); + add(cadran3); + add(cadran4); + + + } + +} diff --git a/src/Application1/Pages/Page3.java b/src/Application1/Pages/Page3.java new file mode 100644 index 0000000..6a60a88 --- /dev/null +++ b/src/Application1/Pages/Page3.java @@ -0,0 +1,97 @@ +package Application1.Pages; + +import java.awt.Color; +import java.awt.Font; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.IOException; + +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.border.*; + +import Application1.ImagePanel; +import Application1.TextPanel; + +public class Page3 extends JPanel { + public Page3(int taillePolice, Border bordure){ + + //Initialitsation + JPanel cadran1 = new JPanel(); + TextPanel cadran1_1; + ImagePanel cadran2; + ImagePanel cadran3; + ImagePanel cadran4; + TextPanel Texte; + + JButton BoutonInstallationTrinus = new JButton("START INSTALLATION"); + Font f = new Font("Serif", Font.BOLD, 45); + + BoutonInstallationTrinus.setFont(f); + BoutonInstallationTrinus.setForeground(Color.WHITE); + BoutonInstallationTrinus.setBackground(Color.LIGHT_GRAY); + + GridLayout g= new GridLayout(2,2); + GridLayout cad1 = new GridLayout(2,1); + g.setHgap(10); + g.setVgap(10); + setLayout(g); + + + //Cadran 1 + + cadran1.setLayout(cad1); + + cadran1_1 = new TextPanel(taillePolice); + cadran1_1.setBorder(bordure); + + cadran1_1.AjouterParagraph(" \n"); + cadran1_1.AjouterParagraph(" L'installation du logiciel Trinus est nécessaire pour le bon \n"); + cadran1_1.AjouterParagraph(" fonctionnement de notre système. \n"); + cadran1_1.AjouterParagraph(" START INSTALLATION va lancer automatiquement l'installation du logiciel. \n"); + cadran1_1.AjouterParagraph(" Vous devez accepter et suivre les étapes décrites sur les images suivantes. \n"); + cadran1_1.AjouterParagraph(" \n"); + cadran1_1.setEditable(false); + + cadran1.add(cadran1_1); + cadran1.add(BoutonInstallationTrinus); + + + //Cadran 2 + cadran2 = new ImagePanel("Images/Install_Trinus/1.png"); + cadran2.setBorder(bordure); + + //Cadran3 + cadran3 = new ImagePanel("Images/Install_Trinus/2.png"); + cadran3.setBorder(bordure); + + //Cadran 4 + cadran4 = new ImagePanel("Images/Install_Trinus/3.png"); + cadran4.setBorder(bordure); + + //Ajouter les cadrans + add(cadran1); + add(cadran2); + add(cadran3); + add(cadran4); + + BoutonInstallationTrinus.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + + + Runtime rt = Runtime.getRuntime(); + try { + rt.exec(new String[] {"External_Software/TGsetup.exe"}); + + } + catch (IOException e) { + e.printStackTrace(); + } + } + } + ); + + } + +} diff --git a/src/Application1/Pages/Page4.java b/src/Application1/Pages/Page4.java new file mode 100644 index 0000000..565dbcc --- /dev/null +++ b/src/Application1/Pages/Page4.java @@ -0,0 +1,49 @@ +package Application1.Pages; + +import java.awt.GridLayout; + +import javax.swing.JPanel; +import javax.swing.border.*; + +import Application1.ImagePanel; + +public class Page4 extends JPanel { + + public Page4(int taillePolice, Border bordure){ + //Initialitsation + ImagePanel cadran1; + ImagePanel cadran2; + ImagePanel cadran3; + ImagePanel cadran4; + GridLayout g= new GridLayout(2,2); + g.setHgap(10); + g.setVgap(10); + setLayout(g); + + //Cadran 1 + cadran1 = new ImagePanel("Images/Install_Trinus/4.png"); + cadran1.setBorder(bordure); + + //Cadran 2 + cadran2 = new ImagePanel("Images/Install_Trinus/5.png"); + cadran2.setBorder(bordure); + + //Cadran 3 + cadran3 = new ImagePanel("Images/Install_Trinus/6.png"); + cadran3.setBorder(bordure); + + //Cadran 4 + cadran4 = new ImagePanel("Images/Install_Trinus/7.png"); + cadran4.setBorder(bordure); + + + //Ajout des cadrans + add(cadran1); + add(cadran2); + add(cadran3); + add(cadran4); + + + } + +} diff --git a/src/Application1/Pages/Page5.java b/src/Application1/Pages/Page5.java new file mode 100644 index 0000000..9dcf034 --- /dev/null +++ b/src/Application1/Pages/Page5.java @@ -0,0 +1,106 @@ +package Application1.Pages; + +import java.awt.Color; +import java.awt.Font; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.IOException; + +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.border.*; + +import Application1.ImagePanel; +import Application1.TextPanel; + +public class Page5 extends JPanel{ + + public Page5(int taillePolice, Border bordure){ + //Initialitsation + JPanel cadran1 = new JPanel(); + TextPanel cadran1_1; + ImagePanel cadran2; + ImagePanel cadran3; + ImagePanel cadran4; + + + JButton BoutonInstallationManette = new JButton("START INSTALLATION"); + Font f = new Font("Serif", Font.BOLD, 45); + + BoutonInstallationManette.setFont(f); + BoutonInstallationManette.setForeground(Color.WHITE); + BoutonInstallationManette.setBackground(Color.LIGHT_GRAY); + + GridLayout g= new GridLayout(2,2); + GridLayout cad1 = new GridLayout(2,1); + g.setHgap(10); + g.setVgap(10); + setLayout(g); + + //Cadran 1 + + cadran1.setLayout(cad1); + cadran1.setBorder(bordure); + + cadran1_1 = new TextPanel(taillePolice); + + cadran1_1.setBorder(bordure); + + cadran1_1.AjouterParagraph(" \n"); + cadran1_1.AjouterParagraph(" Pour finir, nous devons installer la manette Wiimote. \n"); + cadran1_1.AjouterParagraph(" Pour cela nous allons l'ajouter en tant que périphérique Bluetooth. \n"); + cadran1_1.AjouterParagraph(" Cliquer sur START INSTALLATION, le panneau de configuration va apparaitre.\n"); + cadran1_1.AjouterParagraph(" Suivez les étapes d'installation avec les images suivantes. \n"); + cadran1_1.AjouterParagraph(" \n"); + + cadran1_1.setEditable(false); + + cadran1.add(cadran1_1); + cadran1.add(BoutonInstallationManette); + + + //Cadran 2 + cadran2 = new ImagePanel("Images/Install_Wiimote/1.png"); + cadran2.setBorder(bordure); + + + //Cadran 3 + cadran3 = new ImagePanel("Images/Install_Wiimote/3.png"); + cadran3.setBorder(bordure); + + + //Cadran 4 + cadran4 = new ImagePanel("Images/Install_Wiimote/4.png"); + cadran4.setBorder(bordure); + + + //Ajout des cadrans + add(cadran1); + add(cadran2); + add(cadran3); + add(cadran4); + + + //BoutonInstallationManette.addActionListener(new ActionListener() {}); + + + BoutonInstallationManette.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + //Lancement du panneau de configuration + + Runtime rt = Runtime.getRuntime(); + try { + rt.exec(new String[] {"cmd.exe","/c","start","control"}); + + } + catch (IOException e) { + e.printStackTrace(); + } + } + } + ); + + +} +} diff --git a/src/Application1/Pages/Page6.java b/src/Application1/Pages/Page6.java new file mode 100644 index 0000000..199d51c --- /dev/null +++ b/src/Application1/Pages/Page6.java @@ -0,0 +1,95 @@ +package Application1.Pages; + +import java.awt.Color; +import java.awt.Font; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.border.*; + +import Application1.PathVar; +import Application1.TextPanel; +import Application1.carte; + +public class Page6 extends JPanel { + + public Page6(int taillePolice, Border bordure) { + //Installation + TextPanel cadran1; + TextPanel cadran2; + JPanel cadran3; + JPanel cadran4; + JButton BoutonVarEnvTrinus; + JButton BoutonVarEnvRevit; + Font f = new Font("Serif", Font.BOLD, 15); + BoutonVarEnvTrinus = new JButton("Indiquer où se trouve le logiciel Trinus"); + BoutonVarEnvRevit = new JButton("Indiquer où se trouve le logiciel de CAD"); + BoutonVarEnvRevit.setFont(f); + BoutonVarEnvRevit.setForeground(Color.BLACK); + BoutonVarEnvRevit.setBackground(Color.LIGHT_GRAY); + BoutonVarEnvTrinus.setFont(f); + BoutonVarEnvTrinus.setForeground(Color.BLACK); + BoutonVarEnvTrinus.setBackground(Color.LIGHT_GRAY); + + GridLayout grid = new GridLayout(2,2); + grid.setHgap(10); + grid.setVgap(10); + setLayout(grid); + + + //Cadran 1 + cadran1 = new TextPanel(taillePolice); + cadran1.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel Trinus. "); + cadran1.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau."); + cadran1.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\""); + cadran1.setEditable(false); + cadran1.setBorder(bordure); + // Cadran 2 + cadran2 = new TextPanel(taillePolice); + cadran2.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel de CAD. De préferance Revit, puisque notre système est optimisé pour l'utilisation de Revit. "); + cadran2.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau."); + cadran2.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\""); + cadran2.setEditable(false); + cadran2.setBorder(bordure); + + //Cadran 3 + cadran3 = new JPanel(); + + cadran3.add(BoutonVarEnvTrinus); + + //Cadran 4 + cadran4 = new JPanel(); + + cadran4.add(BoutonVarEnvRevit); + + + + //Ajout des cadran + add(cadran1); + add(cadran2); + add(cadran3); + add(cadran4); + + PathVar pathVar = new PathVar(); + BoutonVarEnvTrinus.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + pathVar.getPath("Trinus"); + + } + } + ); + + BoutonVarEnvRevit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + pathVar.getPath("Revit"); + + } + }); + + + } + +} diff --git a/src/Application1/Pages/Page7.java b/src/Application1/Pages/Page7.java new file mode 100644 index 0000000..6003633 --- /dev/null +++ b/src/Application1/Pages/Page7.java @@ -0,0 +1,195 @@ +package Application1.Pages; + +import java.awt.Color; +import java.awt.Desktop; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; + +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.border.*; + +import Application1.PathVar; +import Application1.TextPanel; + +public class Page7 extends JPanel { + public Page7(int taillePolice, Border bordure) { + + + //Initialitsation + PathVar path = new PathVar(); + TextPanel cadran1; + JPanel cadran2; + + Font f = new Font("Serif", Font.BOLD, 15); + + JButton BoutonGlovePie = new JButton("Lancer GLovePie"); + BoutonGlovePie.setFont(f); + BoutonGlovePie.setForeground(Color.BLACK); + BoutonGlovePie.setBackground(Color.LIGHT_GRAY); + + JButton BoutonTrinus = new JButton("Lancer Trinus"); + BoutonTrinus.setFont(f); + BoutonTrinus.setForeground(Color.BLACK); + BoutonTrinus.setBackground(Color.LIGHT_GRAY); + + JButton BoutonRevit = new JButton("Lancer Revit"); + BoutonRevit.setFont(f); + BoutonRevit.setForeground(Color.BLACK); + BoutonRevit.setBackground(Color.LIGHT_GRAY); + + JButton BoutonInternet = new JButton("Lancer AutoDesk View"); + BoutonInternet.setFont(f); + BoutonInternet.setForeground(Color.BLACK); + BoutonInternet.setBackground(Color.LIGHT_GRAY); + + JButton BoutonClavier = new JButton ("Lancer le clavier Virtuel"); + BoutonClavier.setFont(f); + BoutonClavier.setForeground(Color.BLACK); + BoutonClavier.setBackground(Color.LIGHT_GRAY); + + GridLayout grid= new GridLayout(2,2); + FlowLayout flow = new FlowLayout(); + grid.setHgap(10); + grid.setVgap(10); + setLayout(grid); + + //Cadran 1 + cadran1 = new TextPanel(taillePolice); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Le système est prêt à être utilisé! \n"); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Les logiciels suivant sont bien installés sur la machine : \n "); + cadran1.AjouterParagraph(" * GlovePie \n"); + cadran1.AjouterParagraph(" * Trinus \n"); + cadran1.AjouterParagraph(" La WiiMote est reliée en Bluetooth à l'ordinateur! \n"); + cadran1.AjouterParagraph(" \n"); + cadran1.AjouterParagraph(" Les différents boutons ci-dessous vous permettent de lancer tous les outils nécessaires. \n"); + cadran1.AjouterParagraph(" \n"); + cadran1.setEditable(false); + cadran1.setBorder(bordure); + + //Cadran 2 + cadran2 = new JPanel(); + cadran2.setLayout(flow); + cadran2.add(BoutonGlovePie); + cadran2.add(BoutonTrinus); + cadran2.add(BoutonRevit); + cadran2.add(BoutonInternet); + cadran2.add(BoutonClavier); + + //Gestion Boutons + + BoutonGlovePie.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + //Lancement du panneau de configuration + File file = new File("External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE"); + java.awt.Desktop desktop = Desktop.getDesktop(); + + try { + + desktop.open(file); + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + + } + } + } + ); + + BoutonTrinus.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + try { + + path.readPathFile(); + File file = new File(path.getPathTrinus()); + java.awt.Desktop desktop = Desktop.getDesktop(); + desktop.open(file); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + + + + + + + } + }); + BoutonRevit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + try { + path.readPathFile(); + File file = new File(path.getPathRevit()); + java.awt.Desktop desktop = Desktop.getDesktop(); + desktop.open(file); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + + + + + + + } + }); + + BoutonInternet.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + //Lancement du panneau de configuration + + Runtime rt = Runtime.getRuntime(); + try { + rt.exec(new String[] {"cmd.exe","/c","start","https://viewer.autodesk.com/"}); + + }catch (IOException e) { + e.printStackTrace(); + } + + } + }); + + BoutonClavier.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + //Lancement du panneau de configuration + + Runtime rt = Runtime.getRuntime(); + try { + rt.exec(new String[] {"cmd.exe","/c","start","osk"}); + + }catch (IOException e) { + e.printStackTrace(); + } + + } + }); + + + + + + + + + //Ajout Cadran + add(cadran1); + add(cadran2); + + + + + } + +} diff --git a/src/Application1/PathVar.java b/src/Application1/PathVar.java new file mode 100644 index 0000000..4467e20 --- /dev/null +++ b/src/Application1/PathVar.java @@ -0,0 +1,119 @@ +package Application1; + +import java.io.BufferedWriter; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.*; + +import javax.swing.JFileChooser; +import javax.swing.JPanel; + +public class PathVar { + private String pathTrinus; + private String pathRevit; + + + public PathVar() { + pathTrinus = "."; + pathRevit = "."; + + } + + + public void readPathFile() throws IOException{ + String pathData = ""; + + pathData = new String(Files.readAllBytes(Paths.get("README.txt"))); + String[] parts = pathData.split("\n"); + if (parts[0].contentEquals("Trinus")){ + pathTrinus = parts[1]; + + + }else if (parts[2].contentEquals("Trinus")) { + pathTrinus = parts[3]; + + } + + if (parts[2].contentEquals("Revit")) { + pathRevit = parts[3]; + + }else if (parts[0].contentEquals("Revit")) { + pathRevit = parts[1]; + System.out.println("Je suis la \n"); + } + + + + //System.out.println(pathData); + //System.out.println(parts[3]); + } + + public void writePathFile(String pathToWrite) { + try { + BufferedWriter output; + output = new BufferedWriter(new FileWriter("README.txt",true)); + output.append(pathToWrite.concat("\n")); + output.close(); + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + + public void getPath (String program) { + String path = "."; + int result = -99; + JFileChooser fileChooser = new JFileChooser(); + + result = fileChooser.showOpenDialog(new JPanel()); + if(result == JFileChooser.APPROVE_OPTION) + { + path = fileChooser.getSelectedFile().getAbsolutePath(); + } + + + if (program == "Trinus") { + writePathFile("Trinus"); + writePathFile(path); + pathTrinus = path; + + } + else if (program == "Revit") { + writePathFile("Revit"); + writePathFile(path); + pathRevit = path; + } + + + //?????????????????? + System.out.println(pathRevit); + + + } + + public String getPathTrinus() { + return pathTrinus; + } + + public String getPathRevit() { + return pathRevit; + } + + + + + + + +} diff --git a/src/Application1/carte.java b/src/Application1/carte.java index 458f60f..44b3e59 100644 --- a/src/Application1/carte.java +++ b/src/Application1/carte.java @@ -41,24 +41,6 @@ public class carte extends JPanel{ protected static String pathRevit; - private String getPath () { - String path = "."; - int result = -99; - JFileChooser fileChooser = new JFileChooser(); - - result = fileChooser.showOpenDialog(this); - if(result == JFileChooser.APPROVE_OPTION) - { - path = fileChooser.getSelectedFile().getAbsolutePath(); - } - - - - System.out.println(path); - return path; - - } - // type:= 1 => Installation // type:= 2 => Fonctionnement @@ -74,629 +56,8 @@ public class carte extends JPanel{ Border blackline = BorderFactory.createLineBorder(Color.black); Border compound; compound = BorderFactory.createCompoundBorder(border, blackline); - - - if (i==2) { - - - //Initialitsation - TextPanel cadran1; - TextPanel cadran2; - TextPanel cadran3; - TextPanel cadran4; - GridLayout g= new GridLayout(2,2); - g.setHgap(10); - g.setVgap(10); - setLayout(g); - - - //Cadran 1 - cadran1 = new TextPanel(taille); - - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Du BIM à la Réalité Virtuelle! \n"); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Projet issu d'une collaboration entre l'INSA et l'ISDAT. \n"); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" A partir d'une simulation BIM réalisée par les élèves de l'ISDAT, \n"); - cadran1.AjouterParagraph(" ceux de l'INSA ont mis au point une application permettant \n"); - cadran1.AjouterParagraph(" de visualiser un environnement virtuel dépendant \n"); - cadran1.AjouterParagraph(" de la maquette BIM, afin d'intéragir avec \n"); - cadran1.AjouterParagraph(" lui au sein de cette réalité virtuelle. \n"); - - cadran1.setEditable(false); - cadran1.setBorder(compound); - - - //Cadran 2 - cadran2 = new TextPanel(taille); - - cadran2.AjouterParagraph(" \n"); - cadran2.AjouterParagraph(" Participants à la réalisation du projet : \n"); - cadran2.AjouterParagraph(" \n"); - cadran2.AjouterParagraph(" Elèves de l'INSA : Elèves de l'ISDAT : Tuteurs : \n"); - cadran2.AjouterParagraph(" \n"); - cadran2.AjouterParagraph(" AMOUR Chadi BRUYERE Nathalie \n"); - cadran2.AjouterParagraph(" BERRADA El Ghali MONTEIL Thierry \n"); - cadran2.AjouterParagraph(" BERTA Pauline \n"); - cadran2.AjouterParagraph(" BOUOULID Ilias \n"); - cadran2.AjouterParagraph(" NUNES Joao \n"); - cadran2.AjouterParagraph(" POLONI Laura \n"); - cadran2.AjouterParagraph(" \n"); - cadran2.setEditable(false); - cadran2.setBorder(compound); - - - //Cadran 3 - - cadran3 = new TextPanel(taille); - - cadran3.AjouterParagraph(" \n"); - cadran3.AjouterParagraph(" Logiciels nécessaires à la bonne réalisation du projet : \n"); - cadran3.AjouterParagraph(" \n"); - cadran3.AjouterParagraph(" Revit \n"); - cadran3.AjouterParagraph(" GrassHopper (avec son plugin) \n"); - cadran3.AjouterParagraph(" Trinus \n"); - cadran3.AjouterParagraph(" GlovePie \n"); - cadran3.AjouterParagraph(" \n"); - cadran3.AjouterParagraph(" Nous vous expliquerons par la suite quels sont les logiciels \n"); - cadran3.AjouterParagraph(" prérequis, et quels sont ceux dont nous allons guider l'installation. \n"); - cadran3.setEditable(false); - cadran3.setBorder(compound); - - - //Cadran 4 - - cadran4 = new TextPanel(taille); - - cadran4.AjouterParagraph(" \n"); - cadran4.AjouterParagraph(" Matériel nécessaire à la bonne réalisation du projet : \n"); - cadran4.AjouterParagraph(" \n"); - cadran4.AjouterParagraph(" Wiimote \n"); - cadran4.AjouterParagraph(" Sensor bar \n"); - cadran4.AjouterParagraph(" Masque \n"); - cadran4.AjouterParagraph(" Smartphone \n"); - cadran4.AjouterParagraph(" \n"); - cadran4.AjouterParagraph(" Nous vous expliquerons par la suite quel sera l'utilisation \n"); - cadran4.AjouterParagraph(" de chaque matériel et comment les mettre en place. \n"); - cadran4.setEditable(false); - cadran4.setBorder(compound); - - //Ajouter les cadrans - add(cadran1); - add(cadran2); - add(cadran3); - add(cadran4); - - - } - else if (i==3) { + if (i==8) { - //Initialitsation - TextPanel cadran1; - TextPanel cadran2; - TextPanel cadran3; - TextPanel cadran4; - GridLayout g= new GridLayout(2,2); - g.setHgap(10); - g.setVgap(10); - setLayout(g); - - //Cadran 1 - - cadran1 = new TextPanel(taille); - cadran1.setBorder(compound); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Pour le bon fonctionnement du système, il faut va falloir \n"); - cadran1.AjouterParagraph(" que vous installiez au préalable deux logiciels.\n"); - cadran1.AjouterParagraph(" * Revit (Développement d'Objets et de Structures 3D) \n"); - cadran1.AjouterParagraph(" * Grasshopper (Outil utilisé en Association avec Revit)\n"); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Vérifier bien que la connexion bluetooth fonctionne sur votre machine, \n"); - cadran1.AjouterParagraph(" elle sera nécessaire pour connecter votre wiimote à l'ordinateur. \n"); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Lorsque tous les pré-requis précédent sont installés et vérifiés \n"); - cadran1.AjouterParagraph(" vous pouvez passez à la suite!\n"); - cadran1.AjouterParagraph(" \n"); - cadran1.setEditable(false); - - //Cadran 2 - - cadran2 = new TextPanel(taille); - - cadran2.setBorder(compound); - cadran2.AjouterParagraph(" \n"); - cadran2.AjouterParagraph(" Avant de pouvoir utiliser l'application il reste \n"); - cadran2.AjouterParagraph(" quelques étapes à parcourir. \n"); - cadran2.AjouterParagraph(" \n"); - cadran2.AjouterParagraph(" Nous allons vous guider dans l'installation de deux derniers \n"); - cadran2.AjouterParagraph(" logiciels, tels que : \n"); - cadran2.AjouterParagraph(" * GlovePie (Emulateur de Clavier et Souris) \n"); - cadran2.AjouterParagraph(" * Trinus (Convertisseur d'Images Classiques en Images au format VR) \n"); - cadran2.AjouterParagraph(" \n"); - cadran2.AjouterParagraph(" Sur la page suivante les démarches vous sont expliquées pas-à-pas! \n"); - cadran2.AjouterParagraph(" \n"); - cadran2.setEditable(false); - - //Cadran 3 - cadran3 = new TextPanel(taille); - - cadran3.setBorder(compound); - cadran3.AjouterParagraph(" \n"); - cadran3.AjouterParagraph(" Vous pouvez remarquer plusieurs boutons à votre disposition ci-dessous. \n"); - cadran3.AjouterParagraph(" \n"); - cadran3.AjouterParagraph(" Vous avez la possibilité à tout moment de retourner sur la page \n"); - cadran3.AjouterParagraph(" précédente avec le bouton PRECEDENT. \n"); - cadran3.AjouterParagraph(" \n"); - cadran3.AjouterParagraph(" De la même manière, vous avez la possibilité de passer à la \n"); - cadran3.AjouterParagraph(" suivante avec le bouton SUIVANT.\n"); - cadran3.AjouterParagraph(" \n"); - cadran3.setEditable(false); - - //Cadran 4 - - cadran4 = new TextPanel(taille); - - cadran4.setBorder(compound); - cadran4.AjouterParagraph(" \n"); - cadran4.AjouterParagraph(" Le bouton LANCER VR est là pour vous permettre de passer en un \n"); - cadran4.AjouterParagraph(" clic toute la partie Installation des logiciels GlovePie et Trinus.\n"); - cadran4.AjouterParagraph(" \n"); - cadran4.AjouterParagraph(" ! Si vous avez déjà réaliser les installations sur votre machine \n"); - cadran4.AjouterParagraph(" lors d'une précédente utilisation, il n'est pas nécessaire de \n"); - cadran4.AjouterParagraph(" recommencer ! \n"); - cadran4.AjouterParagraph(" \n"); - cadran4.AjouterParagraph(" ! Cliquer directement sur LANCER VR ! \n"); - cadran4.AjouterParagraph(" \n"); - cadran4.setEditable(false); - - - //Ajouter les cadrans - add(cadran1); - add(cadran2); - add(cadran3); - add(cadran4); - - - } - else if (i==4) { - - //Initialitsation - JPanel cadran1 = new JPanel(); - TextPanel cadran1_1; - ImagePanel cadran2; - ImagePanel cadran3; - ImagePanel cadran4; - TextPanel Texte; - - JButton BoutonInstallationTrinus = new JButton("START INSTALLATION"); - Font f = new Font("Serif", Font.BOLD, 45); - - BoutonInstallationTrinus.setFont(f); - BoutonInstallationTrinus.setForeground(Color.WHITE); - BoutonInstallationTrinus.setBackground(Color.LIGHT_GRAY); - - GridLayout g= new GridLayout(2,2); - GridLayout cad1 = new GridLayout(2,1); - g.setHgap(10); - g.setVgap(10); - setLayout(g); - - - //Cadran 1 - - cadran1.setLayout(cad1); - - cadran1_1 = new TextPanel(taille); - cadran1_1.setBorder(compound); - - cadran1_1.AjouterParagraph(" \n"); - cadran1_1.AjouterParagraph(" L'installation du logiciel Trinus est nécessaire pour le bon \n"); - cadran1_1.AjouterParagraph(" fonctionnement de notre système. \n"); - cadran1_1.AjouterParagraph(" START INSTALLATION va lancer automatiquement l'installation du logiciel. \n"); - cadran1_1.AjouterParagraph(" Vous devez accepter et suivre les étapes décrites sur les images suivantes. \n"); - cadran1_1.AjouterParagraph(" \n"); - cadran1_1.setEditable(false); - - cadran1.add(cadran1_1); - cadran1.add(BoutonInstallationTrinus); - - - //Cadran 2 - cadran2 = new ImagePanel("Images/Install_Trinus/1.png"); - cadran2.setBorder(compound); - - //Cadran3 - cadran3 = new ImagePanel("Images/Install_Trinus/2.png"); - cadran3.setBorder(compound); - - //Cadran 4 - cadran4 = new ImagePanel("Images/Install_Trinus/3.png"); - cadran4.setBorder(compound); - - //Ajouter les cadrans - add(cadran1); - add(cadran2); - add(cadran3); - add(cadran4); - - BoutonInstallationTrinus.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - - - Runtime rt = Runtime.getRuntime(); - try { - rt.exec(new String[] {"External_Software/TGsetup.exe"}); - - } - catch (IOException e) { - e.printStackTrace(); - } - } - } - ); - - } - else if (i==5) { - - //Initialitsation - ImagePanel cadran1; - ImagePanel cadran2; - ImagePanel cadran3; - ImagePanel cadran4; - GridLayout g= new GridLayout(2,2); - g.setHgap(10); - g.setVgap(10); - setLayout(g); - - //Cadran 1 - cadran1 = new ImagePanel("Images/Install_Trinus/4.png"); - cadran1.setBorder(border); - - //Cadran 2 - cadran2 = new ImagePanel("Images/Install_Trinus/5.png"); - cadran2.setBorder(compound); - - //Cadran 3 - cadran3 = new ImagePanel("Images/Install_Trinus/6.png"); - cadran3.setBorder(compound); - - //Cadran 4 - cadran4 = new ImagePanel("Images/Install_Trinus/7.png"); - cadran4.setBorder(compound); - - - //Ajout des cadrans - add(cadran1); - add(cadran2); - add(cadran3); - add(cadran4); - - } - else if (i==6) { - - //Initialitsation - JPanel cadran1 = new JPanel(); - TextPanel cadran1_1; - ImagePanel cadran2; - ImagePanel cadran3; - ImagePanel cadran4; - - - JButton BoutonInstallationManette = new JButton("START INSTALLATION"); - Font f = new Font("Serif", Font.BOLD, 45); - - BoutonInstallationManette.setFont(f); - BoutonInstallationManette.setForeground(Color.WHITE); - BoutonInstallationManette.setBackground(Color.LIGHT_GRAY); - - GridLayout g= new GridLayout(2,2); - GridLayout cad1 = new GridLayout(2,1); - g.setHgap(10); - g.setVgap(10); - setLayout(g); - - //Cadran 1 - - cadran1.setLayout(cad1); - cadran1.setBorder(compound); - - cadran1_1 = new TextPanel(taille); - - cadran1_1.setBorder(compound); - - cadran1_1.AjouterParagraph(" \n"); - cadran1_1.AjouterParagraph(" Pour finir, nous devons installer la manette Wiimote. \n"); - cadran1_1.AjouterParagraph(" Pour cela nous allons l'ajouter en tant que périphérique Bluetooth. \n"); - cadran1_1.AjouterParagraph(" Cliquer sur START INSTALLATION, le panneau de configuration va apparaitre.\n"); - cadran1_1.AjouterParagraph(" Suivez les étapes d'installation avec les images suivantes. \n"); - cadran1_1.AjouterParagraph(" \n"); - - cadran1_1.setEditable(false); - - cadran1.add(cadran1_1); - cadran1.add(BoutonInstallationManette); - - - //Cadran 2 - cadran2 = new ImagePanel("Images/Install_Wiimote/1.png"); - cadran2.setBorder(compound); - - - //Cadran 3 - cadran3 = new ImagePanel("Images/Install_Wiimote/3.png"); - cadran3.setBorder(compound); - - - //Cadran 4 - cadran4 = new ImagePanel("Images/Install_Wiimote/4.png"); - cadran4.setBorder(compound); - - - //Ajout des cadrans - add(cadran1); - add(cadran2); - add(cadran3); - add(cadran4); - - - //BoutonInstallationManette.addActionListener(new ActionListener() {}); - - - BoutonInstallationManette.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //Lancement du panneau de configuration - - Runtime rt = Runtime.getRuntime(); - try { - rt.exec(new String[] {"cmd.exe","/c","start","control"}); - - } - catch (IOException e) { - e.printStackTrace(); - } - } - } - ); - - - - } - - else if (i==7) { - - //Installation - TextPanel cadran1; - TextPanel cadran2; - JPanel cadran3; - JPanel cadran4; - JButton BoutonVarEnvTrinus; - JButton BoutonVarEnvRevit; - - GridLayout grid = new GridLayout(2,2); - grid.setHgap(10); - grid.setVgap(10); - setLayout(grid); - - - //Cadran 1 - cadran1 = new TextPanel(taille); - cadran1.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel Trinus. "); - cadran1.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau."); - cadran1.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\""); - cadran1.setEditable(false); - cadran1.setBorder(compound); - // Cadran 2 - cadran2 = new TextPanel(taille); - cadran2.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel de CAD. De préferance Revit, puisque notre système est optimisé pour l'utilisation de Revit. "); - cadran2.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau."); - cadran2.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\""); - cadran2.setEditable(false); - cadran2.setBorder(compound); - - //Cadran 3 - cadran3 = new JPanel(); - BoutonVarEnvTrinus = new JButton("Indiquer où se trouve le logiciel Trinus"); - cadran3.add(BoutonVarEnvTrinus); - - //Cadran 4 - cadran4 = new JPanel(); - BoutonVarEnvRevit = new JButton("Indiquer où se trouve le logiciel de CAD"); - cadran4.add(BoutonVarEnvRevit); - - - - //Ajout des cadran - add(cadran1); - add(cadran2); - add(cadran3); - add(cadran4); - - BoutonVarEnvTrinus.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - carte.pathTrinus = getPath(); - System.out.println(pathTrinus); - - } - } - ); - - BoutonVarEnvRevit.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - carte.pathRevit = getPath(); - System.out.println(pathRevit); - - } - }); - - - - } - else if (i==8) { - - //Initialitsation - TextPanel cadran1; - JPanel cadran2; - - Font f = new Font("Serif", Font.BOLD, 15); - - JButton BoutonGlovePie = new JButton("Lancer GLovePie"); - BoutonGlovePie.setFont(f); - BoutonGlovePie.setForeground(Color.BLACK); - BoutonGlovePie.setBackground(Color.LIGHT_GRAY); - - JButton BoutonTrinus = new JButton("Lancer Trinus"); - BoutonTrinus.setFont(f); - BoutonTrinus.setForeground(Color.BLACK); - BoutonTrinus.setBackground(Color.LIGHT_GRAY); - - JButton BoutonRevit = new JButton("Lancer Revit"); - BoutonRevit.setFont(f); - BoutonRevit.setForeground(Color.BLACK); - BoutonRevit.setBackground(Color.LIGHT_GRAY); - - JButton BoutonInternet = new JButton("Lancer AutoDesk View"); - BoutonInternet.setFont(f); - BoutonInternet.setForeground(Color.BLACK); - BoutonInternet.setBackground(Color.LIGHT_GRAY); - - JButton BoutonClavier = new JButton ("Lancer le clavier Virtuel"); - BoutonClavier.setFont(f); - BoutonClavier.setForeground(Color.BLACK); - BoutonClavier.setBackground(Color.LIGHT_GRAY); - - GridLayout grid= new GridLayout(2,2); - FlowLayout flow = new FlowLayout(); - grid.setHgap(10); - grid.setVgap(10); - setLayout(grid); - - //Cadran 1 - cadran1 = new TextPanel(taille); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Le système est prêt à être utilisé! \n"); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Les logiciels suivant sont bien installés sur la machine : \n "); - cadran1.AjouterParagraph(" * GlovePie \n"); - cadran1.AjouterParagraph(" * Trinus \n"); - cadran1.AjouterParagraph(" La WiiMote est reliée en Bluetooth à l'ordinateur! \n"); - cadran1.AjouterParagraph(" \n"); - cadran1.AjouterParagraph(" Les différents boutons ci-dessous vous permettent de lancer tous les outils nécessaires. \n"); - cadran1.AjouterParagraph(" \n"); - cadran1.setEditable(false); - cadran1.setBorder(compound); - - //Cadran 2 - cadran2 = new JPanel(); - cadran2.setLayout(flow); - cadran2.add(BoutonGlovePie); - cadran2.add(BoutonTrinus); - cadran2.add(BoutonRevit); - cadran2.add(BoutonInternet); - cadran2.add(BoutonClavier); - - //Gestion Boutons - - BoutonGlovePie.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //Lancement du panneau de configuration - File file = new File("External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE"); - java.awt.Desktop desktop = Desktop.getDesktop(); - - try { - - desktop.open(file); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - - } - } - } - ); - - BoutonTrinus.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //Lancement du panneau de configuration - System.out.println(pathTrinus); - File file = new File(pathTrinus); - java.awt.Desktop desktop = Desktop.getDesktop(); - - try { - - desktop.open(file); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - } - }); - - BoutonRevit.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //Lancement du panneau de configuration - - - File file = new File(pathRevit); - java.awt.Desktop desktop = Desktop.getDesktop(); - - try { - - desktop.open(file); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - }} - ); - - BoutonInternet.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //Lancement du panneau de configuration - - Runtime rt = Runtime.getRuntime(); - try { - rt.exec(new String[] {"cmd.exe","/c","start","https://viewer.autodesk.com/"}); - - }catch (IOException e) { - e.printStackTrace(); - } - - } - }); - - BoutonClavier.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //Lancement du panneau de configuration - - Runtime rt = Runtime.getRuntime(); - try { - rt.exec(new String[] {"cmd.exe","/c","start","osk"}); - - }catch (IOException e) { - e.printStackTrace(); - } - - } - }); - - - - - - - - - //Ajout Cadran - add(cadran1); - add(cadran2); - -