SauvegardeFile

This commit is contained in:
Joao Conceicao Nunes 2020-05-08 22:20:07 +02:00
parent 516491a881
commit 8255846e12
44 changed files with 892 additions and 660 deletions

View file

@ -1,4 +1,4 @@
Readme to be completeds Trinus
Pauline C:\Users\Public\Desktop\Trinus Cardboard.lnk
Joao Revit
Laura C:\Users\Public\Desktop\Oracle VM VirtualBox.lnk

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -25,6 +25,9 @@ import javax.swing.JTextArea;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import Application1.Pages.*;
public class Fenetre extends JFrame implements ActionListener{ public class Fenetre extends JFrame implements ActionListener{
@ -67,6 +70,11 @@ public class Fenetre extends JFrame implements ActionListener{
cl = new CardLayout(); cl = new CardLayout();
Border border = BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
Border blackline = BorderFactory.createLineBorder(Color.black);
Border compound;
compound = BorderFactory.createCompoundBorder(border, blackline);
g=getGraphics(); g=getGraphics();
@ -82,13 +90,13 @@ public class Fenetre extends JFrame implements ActionListener{
//Création des pages //Création des pages
ImagePanel card1 = new ImagePanel("test.png"); ImagePanel card1 = new ImagePanel("test.png");
carte card2 = new carte(2,1); Page1 card2 = new Page1(15,compound);
carte card3 = new carte(3,1); Page2 card3 = new Page2(15,compound);
carte card4 = new carte(4,1); Page3 card4 = new Page3(15,compound);
carte card5 = new carte (5,1); Page4 card5 = new Page4 (15,compound);
carte card6 = new carte (6,1); Page5 card6 = new Page5(15,compound);
carte card7 = new carte (7,1); Page6 card7 = new Page6(15,compound);
carte card8 = new carte(8,1); Page7 card8 = new Page7(15,compound);
cl.setHgap(10); cl.setHgap(10);
cl.setVgap(10); cl.setVgap(10);

View file

@ -7,18 +7,13 @@ import java.io.IOException;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
Fenetre fenetre = new Fenetre(); 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();
}
*/

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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();
}
}
}
);
}
}

View file

@ -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);
}
}

View file

@ -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();
}
}
}
);
}
}

View file

@ -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");
}
});
}
}

View file

@ -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);
}
}

View file

@ -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;
}
}

View file

@ -41,24 +41,6 @@ public class carte extends JPanel{
protected static String pathRevit; 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:= 1 => Installation
// type:= 2 => Fonctionnement // type:= 2 => Fonctionnement
@ -74,628 +56,7 @@ public class carte extends JPanel{
Border blackline = BorderFactory.createLineBorder(Color.black); Border blackline = BorderFactory.createLineBorder(Color.black);
Border compound; Border compound;
compound = BorderFactory.createCompoundBorder(border, blackline); compound = BorderFactory.createCompoundBorder(border, blackline);
if (i==8) {
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) {
//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);