diff --git a/.classpath b/.classpath index 4b5675b..148593c 100644 --- a/.classpath +++ b/.classpath @@ -12,6 +12,6 @@ - + diff --git a/bin/.gitignore b/bin/.gitignore index 4d71628..78b40c7 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -3,51 +3,3 @@ /evaluer/ /fenetres/ /list/ -/textclean.svg -/textcleanmini.png -/titre.svg -/titremini.png -/totalpoint.png -/totalpoint.svg -/totalpointmini.png -/totalpointnode.png -/totalpointnode.svg -/totalpointnodemini.png -/touslesnodes.png -/touslesnodes.svg -/touslesnodesmini.png -/toutext.png -/toutext.svg -/toutextmini.png -/traduction.png -/traduction.svg -/traductionmini.png -/treeClose.png -/treeClose.svg -/treeLeaf.png -/treeLeaf.svg -/treeOpen.png -/treeOpen.svg -/triche.png -/triche.svg -/trichemini.png -/tutoriel.png -/tutoriel.svg -/tutorielmini.png -/undo.png -/upnode.png -/upnode.svg -/upnodemini.png -/verifhistorique.png -/verifhistoriquemax.png -/verifhistoriquemini.png -/versevaluate.png -/versevaluate.svg -/versevaluatemini.png -/voir.svg -/voirmini.png -/what.svg -/whatmini.png -/zip.png -/zip.svg -/zipmini.png diff --git a/bin/MEPTL/ecritureSujet.class b/bin/MEPTL/ecritureSujet.class index 1ca0b70..a816281 100644 Binary files a/bin/MEPTL/ecritureSujet.class and b/bin/MEPTL/ecritureSujet.class differ diff --git a/bin/MEPTL/rechercherUnNodeStudent.class b/bin/MEPTL/rechercherUnNodeStudent.class index 9e914c0..f7f0bb5 100644 Binary files a/bin/MEPTL/rechercherUnNodeStudent.class and b/bin/MEPTL/rechercherUnNodeStudent.class differ diff --git a/bin/fenetres/allContent$1.class b/bin/fenetres/allContent$1.class index 6b959cc..215e80d 100644 Binary files a/bin/fenetres/allContent$1.class and b/bin/fenetres/allContent$1.class differ diff --git a/bin/fenetres/allContent$2.class b/bin/fenetres/allContent$2.class index a02e700..3606d51 100644 Binary files a/bin/fenetres/allContent$2.class and b/bin/fenetres/allContent$2.class differ diff --git a/bin/fenetres/allContent.class b/bin/fenetres/allContent.class index de86a13..9337146 100644 Binary files a/bin/fenetres/allContent.class and b/bin/fenetres/allContent.class differ diff --git a/bin/fenetres/create_act/actAllContent.class b/bin/fenetres/create_act/actAllContent.class index 52ffd57..24defc6 100644 Binary files a/bin/fenetres/create_act/actAllContent.class and b/bin/fenetres/create_act/actAllContent.class differ diff --git a/bin/fenetres/create_act/actEvaluer.class b/bin/fenetres/create_act/actEvaluer.class index 5222dd5..e7ed06a 100644 Binary files a/bin/fenetres/create_act/actEvaluer.class and b/bin/fenetres/create_act/actEvaluer.class differ diff --git a/bin/fenetres/create_act/actTousLesNodesEvaluer.class b/bin/fenetres/create_act/actTousLesNodesEvaluer.class index 5539b3b..fb72ee9 100644 Binary files a/bin/fenetres/create_act/actTousLesNodesEvaluer.class and b/bin/fenetres/create_act/actTousLesNodesEvaluer.class differ diff --git a/bin/fenetres/evaluate$1.class b/bin/fenetres/evaluate$1.class index a3d87e3..715a6a5 100644 Binary files a/bin/fenetres/evaluate$1.class and b/bin/fenetres/evaluate$1.class differ diff --git a/bin/fenetres/evaluate$10.class b/bin/fenetres/evaluate$10.class index bb4b120..f93f6b9 100644 Binary files a/bin/fenetres/evaluate$10.class and b/bin/fenetres/evaluate$10.class differ diff --git a/bin/fenetres/evaluate$11.class b/bin/fenetres/evaluate$11.class index 24b08e3..fd6c606 100644 Binary files a/bin/fenetres/evaluate$11.class and b/bin/fenetres/evaluate$11.class differ diff --git a/bin/fenetres/evaluate$12.class b/bin/fenetres/evaluate$12.class index 69df0f4..aa40133 100644 Binary files a/bin/fenetres/evaluate$12.class and b/bin/fenetres/evaluate$12.class differ diff --git a/bin/fenetres/evaluate$13.class b/bin/fenetres/evaluate$13.class index a26e18b..bed57b1 100644 Binary files a/bin/fenetres/evaluate$13.class and b/bin/fenetres/evaluate$13.class differ diff --git a/bin/fenetres/evaluate$14.class b/bin/fenetres/evaluate$14.class index 535eb2a..b35e520 100644 Binary files a/bin/fenetres/evaluate$14.class and b/bin/fenetres/evaluate$14.class differ diff --git a/bin/fenetres/evaluate$15.class b/bin/fenetres/evaluate$15.class index 9c25b3e..eb05bb0 100644 Binary files a/bin/fenetres/evaluate$15.class and b/bin/fenetres/evaluate$15.class differ diff --git a/bin/fenetres/evaluate$16.class b/bin/fenetres/evaluate$16.class index a72917f..72f6508 100644 Binary files a/bin/fenetres/evaluate$16.class and b/bin/fenetres/evaluate$16.class differ diff --git a/bin/fenetres/evaluate$17.class b/bin/fenetres/evaluate$17.class index 83d7ad8..7f742a4 100644 Binary files a/bin/fenetres/evaluate$17.class and b/bin/fenetres/evaluate$17.class differ diff --git a/bin/fenetres/evaluate$18.class b/bin/fenetres/evaluate$18.class index cb79ce2..fe90676 100644 Binary files a/bin/fenetres/evaluate$18.class and b/bin/fenetres/evaluate$18.class differ diff --git a/bin/fenetres/evaluate$19.class b/bin/fenetres/evaluate$19.class index 38a2d85..a46a5d5 100644 Binary files a/bin/fenetres/evaluate$19.class and b/bin/fenetres/evaluate$19.class differ diff --git a/bin/fenetres/evaluate$2.class b/bin/fenetres/evaluate$2.class index 77aa7db..f985ad7 100644 Binary files a/bin/fenetres/evaluate$2.class and b/bin/fenetres/evaluate$2.class differ diff --git a/bin/fenetres/evaluate$20.class b/bin/fenetres/evaluate$20.class index b9d9db4..fb68b15 100644 Binary files a/bin/fenetres/evaluate$20.class and b/bin/fenetres/evaluate$20.class differ diff --git a/bin/fenetres/evaluate$21.class b/bin/fenetres/evaluate$21.class index 403eeec..ddf01cd 100644 Binary files a/bin/fenetres/evaluate$21.class and b/bin/fenetres/evaluate$21.class differ diff --git a/bin/fenetres/evaluate$22.class b/bin/fenetres/evaluate$22.class index 8e18d30..85f80aa 100644 Binary files a/bin/fenetres/evaluate$22.class and b/bin/fenetres/evaluate$22.class differ diff --git a/bin/fenetres/evaluate$23.class b/bin/fenetres/evaluate$23.class index 356d799..3599865 100644 Binary files a/bin/fenetres/evaluate$23.class and b/bin/fenetres/evaluate$23.class differ diff --git a/bin/fenetres/evaluate$24.class b/bin/fenetres/evaluate$24.class index b515b8a..2aadb07 100644 Binary files a/bin/fenetres/evaluate$24.class and b/bin/fenetres/evaluate$24.class differ diff --git a/bin/fenetres/evaluate$25.class b/bin/fenetres/evaluate$25.class index 6fcfd06..923ca4b 100644 Binary files a/bin/fenetres/evaluate$25.class and b/bin/fenetres/evaluate$25.class differ diff --git a/bin/fenetres/evaluate$26.class b/bin/fenetres/evaluate$26.class index 524d210..0549f8e 100644 Binary files a/bin/fenetres/evaluate$26.class and b/bin/fenetres/evaluate$26.class differ diff --git a/bin/fenetres/evaluate$27.class b/bin/fenetres/evaluate$27.class index 86709f5..f83d0f2 100644 Binary files a/bin/fenetres/evaluate$27.class and b/bin/fenetres/evaluate$27.class differ diff --git a/bin/fenetres/evaluate$28.class b/bin/fenetres/evaluate$28.class index 2cbdf0b..2386e67 100644 Binary files a/bin/fenetres/evaluate$28.class and b/bin/fenetres/evaluate$28.class differ diff --git a/bin/fenetres/evaluate$29.class b/bin/fenetres/evaluate$29.class index feb1098..de5d715 100644 Binary files a/bin/fenetres/evaluate$29.class and b/bin/fenetres/evaluate$29.class differ diff --git a/bin/fenetres/evaluate$3.class b/bin/fenetres/evaluate$3.class index 03b9a07..da30d2c 100644 Binary files a/bin/fenetres/evaluate$3.class and b/bin/fenetres/evaluate$3.class differ diff --git a/bin/fenetres/evaluate$30.class b/bin/fenetres/evaluate$30.class index 6aa8452..39c667a 100644 Binary files a/bin/fenetres/evaluate$30.class and b/bin/fenetres/evaluate$30.class differ diff --git a/bin/fenetres/evaluate$31.class b/bin/fenetres/evaluate$31.class index 1a1a14d..d139ea0 100644 Binary files a/bin/fenetres/evaluate$31.class and b/bin/fenetres/evaluate$31.class differ diff --git a/bin/fenetres/evaluate$32.class b/bin/fenetres/evaluate$32.class index 1cdef7f..aae079c 100644 Binary files a/bin/fenetres/evaluate$32.class and b/bin/fenetres/evaluate$32.class differ diff --git a/bin/fenetres/evaluate$4.class b/bin/fenetres/evaluate$4.class index 9a370d7..609bc09 100644 Binary files a/bin/fenetres/evaluate$4.class and b/bin/fenetres/evaluate$4.class differ diff --git a/bin/fenetres/evaluate$5.class b/bin/fenetres/evaluate$5.class index 455a78e..d296bbe 100644 Binary files a/bin/fenetres/evaluate$5.class and b/bin/fenetres/evaluate$5.class differ diff --git a/bin/fenetres/evaluate$6.class b/bin/fenetres/evaluate$6.class index aeaf2ba..9f400a2 100644 Binary files a/bin/fenetres/evaluate$6.class and b/bin/fenetres/evaluate$6.class differ diff --git a/bin/fenetres/evaluate$7.class b/bin/fenetres/evaluate$7.class index 781d77c..b82032d 100644 Binary files a/bin/fenetres/evaluate$7.class and b/bin/fenetres/evaluate$7.class differ diff --git a/bin/fenetres/evaluate$8.class b/bin/fenetres/evaluate$8.class index 1cd6870..6370b25 100644 Binary files a/bin/fenetres/evaluate$8.class and b/bin/fenetres/evaluate$8.class differ diff --git a/bin/fenetres/evaluate$9.class b/bin/fenetres/evaluate$9.class index 9919e96..0779ecd 100644 Binary files a/bin/fenetres/evaluate$9.class and b/bin/fenetres/evaluate$9.class differ diff --git a/bin/fenetres/evaluate.class b/bin/fenetres/evaluate.class index 4dd4485..e139dbb 100644 Binary files a/bin/fenetres/evaluate.class and b/bin/fenetres/evaluate.class differ diff --git a/bin/fenetres/mainApp.class b/bin/fenetres/mainApp.class index 45af095..639f231 100644 Binary files a/bin/fenetres/mainApp.class and b/bin/fenetres/mainApp.class differ diff --git a/bin/versevaluate.png b/bin/versevaluate.png new file mode 100644 index 0000000..2158f06 Binary files /dev/null and b/bin/versevaluate.png differ diff --git a/bin/versevaluate.svg b/bin/versevaluate.svg new file mode 100644 index 0000000..eb506f5 --- /dev/null +++ b/bin/versevaluate.svg @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/versevaluatemini.png b/bin/versevaluatemini.png new file mode 100644 index 0000000..379c72c Binary files /dev/null and b/bin/versevaluatemini.png differ diff --git a/src/MEPTL/ecritureSujet.java b/src/MEPTL/ecritureSujet.java index 8b3cf04..2c4b7f3 100644 --- a/src/MEPTL/ecritureSujet.java +++ b/src/MEPTL/ecritureSujet.java @@ -307,7 +307,7 @@ public class ecritureSujet { if( listeDesNodesAvecEvalNameNode.isEvalNameNode(no.get(k))) no.get(k).getAttributs().put("evalNameNode", "0"); if(listeDesNodesSautEtTitre(no.get(k).getNomElt())) {no.get(k).getAttributs().put("saut", "false"); no.get(k).getAttributs().put("titre", "");} if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");no.get(k).getAttributs().put("recherche_contenu_plus_proche_voisin", "false");no.get(k).getAttributs().put("allContent", "strict0");} - if(listeDesNodesEvalPlacement.isPlacement(no.get(k)))no.get(k).getAttributs().put("evalPlacement", "false"); + if(listeDesNodesEvalPlacement.isPlacement(no.get(k)))no.get(k).getAttributs().put("evalPlacement", "0"); if(listeDesNodesAnalyseStyle.isAnalyseStyle(no.get(k))) no.get(k).getAttributs().put("analyseStyle", "false"); if(listeRechercheParAnchorPageNumber.isRechercheParAnchorPageNumber(no.get(k))) no.get(k).getAttributs().put("recherche_anchor-page-number", "false"); diff --git a/src/MEPTL/rechercherUnNodeStudent.java b/src/MEPTL/rechercherUnNodeStudent.java index 05ba938..6338dc6 100644 --- a/src/MEPTL/rechercherUnNodeStudent.java +++ b/src/MEPTL/rechercherUnNodeStudent.java @@ -76,9 +76,9 @@ public class rechercherUnNodeStudent { - //************************************************************************** - //** Recherche les nodes text:p, text:h, text:span par le contenu textuel ** - //************************************************************************** + //************************************************************************************* + //** Recherche les nodes text:p, text:h, text:span, text:list par le contenu textuel ** + //************************************************************************************* if(nodSujet.getNomElt().contains("text:")) { nodStudent = findNodeByContenuTextuel(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); if(nodStudent!=null) return nodStudent; @@ -261,22 +261,7 @@ public class rechercherUnNodeStudent { } if(nodStudent!=null) return nodStudent; System.out.println("n'a pas trouvé par la méthode contenu exact sans casse et trim()"); - nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.95); - if(nodStudent!=null) return nodStudent; - System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.95"); - nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.9); - if(nodStudent!=null) return nodStudent; - System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.9"); - nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.85); - if(nodStudent!=null) return nodStudent; - System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.85"); - nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.8); - if(nodStudent!=null) return nodStudent; - System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.8"); nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.75); - if(nodStudent!=null) return nodStudent; - System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.75"); - nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.7); return nodStudent; } diff --git a/src/fenetres/allContent.java b/src/fenetres/allContent.java index e269d68..011e520 100644 --- a/src/fenetres/allContent.java +++ b/src/fenetres/allContent.java @@ -1,27 +1,25 @@ package fenetres; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.DefaultComboBoxModel; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JComboBox; import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.SwingConstants; import javax.swing.border.EmptyBorder; import MEPTL.commandes; import cXML.node; - -import javax.swing.JButton; -import javax.swing.JLabel; -import javax.swing.JOptionPane; - -import java.awt.Font; -import java.awt.event.ActionEvent; - -import javax.swing.JComboBox; -import javax.swing.JTextField; -import javax.swing.SwingConstants; -import javax.swing.DefaultComboBoxModel; -import javax.swing.ImageIcon; - -import java.awt.event.ActionListener; +import list.listeDesNodesAllContent; public class allContent extends JFrame { @@ -32,6 +30,7 @@ public class allContent extends JFrame { private JPanel contentPane; private JTextField textFieldPoint; private JLabel lblExplication; + node nod; afficheText J; JComboBox comboBoxValeur; @@ -42,10 +41,10 @@ public class allContent extends JFrame { /** * Create the frame. */ - public allContent(node nod, afficheText J) { + public allContent(node nod, afficheText J,boolean Childs) { this.nod=nod; this.J=J; - + if(nod.getAttributs().get("allContent")!=null) { String value = nod.getAttributs().get("allContent"); @@ -149,10 +148,20 @@ public class allContent extends JFrame { try { int point = Integer.valueOf(textFieldPoint.getText()); if(point<0) point =0; - nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point)); - nod.evaluerAllChildTrue(); - J.refreshAffichage(nod); - dispose(); + if(!Childs) { + nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point)); + nod.evaluerAllChildTrue(); + J.refreshAffichage(nod); + }else { + for(int i = 0 ; i < nod.getNodes().size(); i++) { + if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){ + nod.getNodes().get(i).getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point)); + nod.getNodes().get(i).evaluerAllChildTrue(); } + } + J.refreshAffichage(nod); + } + + dispose(); } catch (Exception e2) { JOptionPane.showMessageDialog(null, "Le nombre de point doit être un entier."); } diff --git a/src/fenetres/createPopupMenu.java b/src/fenetres/createPopupMenu.java index d9a9b21..38b9b7a 100644 --- a/src/fenetres/createPopupMenu.java +++ b/src/fenetres/createPopupMenu.java @@ -8,6 +8,7 @@ import cXML.node; import fenetres.create_act.actAddMenuFalse; import fenetres.create_act.actAddMenuTrue; import fenetres.create_act.actAllContent; +import fenetres.create_act.actAllContentChilds; import fenetres.create_act.actAttribut; import fenetres.create_act.actCoefficient; import fenetres.create_act.actCollapseAll; @@ -555,8 +556,13 @@ if(nod!=null) { if(listeDesNodesAllContent.isAllContent(nod) ) { mnGroupeMethodeEvaluer.addSeparator(); mnGroupeMethodeEvaluer.add(new actAllContent()); + if(listeDesNodesPourEvaluerPage.isPage(nod)) { + mnGroupeMethodeEvaluer.addSeparator(); + mnGroupeMethodeEvaluer.add(new actAllContentChilds()); + } } + if(listeEvalNameNode.isNodeEvalNameNode(nod)) { mnGroupeMethodeEvaluer.addSeparator(); mnGroupeMethodeEvaluer.add(mnEvalNameNode()); diff --git a/src/fenetres/create_act/actAllContent.java b/src/fenetres/create_act/actAllContent.java index e9da73e..dd64eb6 100644 --- a/src/fenetres/create_act/actAllContent.java +++ b/src/fenetres/create_act/actAllContent.java @@ -25,7 +25,7 @@ public class actAllContent extends AbstractAction{ @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - new allContent(nod,fenetres.create.getTextNodeSelect()); + new allContent(nod,fenetres.create.getTextNodeSelect(),false); } } diff --git a/src/fenetres/create_act/actAllContentChilds.java b/src/fenetres/create_act/actAllContentChilds.java new file mode 100644 index 0000000..1cca7f2 --- /dev/null +++ b/src/fenetres/create_act/actAllContentChilds.java @@ -0,0 +1,30 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.ImageIcon; + +import cXML.node; +import fenetres.allContent; +import fenetres.create; + +public class actAllContentChilds extends AbstractAction{ + { + putValue( Action.NAME, "Evaluer le contenu de tous les nodes enfants" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer le contenu de tous les nodes enfants" ); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/allcontentmini.png")) ); + } + /** + * + */ + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + new allContent(nod,fenetres.create.getTextNodeSelect(),true); + } + +} diff --git a/src/fenetres/create_act/actEvaluer.java b/src/fenetres/create_act/actEvaluer.java index 4248573..95c285a 100644 --- a/src/fenetres/create_act/actEvaluer.java +++ b/src/fenetres/create_act/actEvaluer.java @@ -26,7 +26,7 @@ public class actEvaluer extends AbstractAction{ } @Override public void actionPerformed(ActionEvent e) { - new evaluate(); + evaluate.getInstance(); create.getInstance().dispose(); } diff --git a/src/fenetres/create_act/actTousLesNodesEvaluer.java b/src/fenetres/create_act/actTousLesNodesEvaluer.java index 60f972c..cd952e0 100644 --- a/src/fenetres/create_act/actTousLesNodesEvaluer.java +++ b/src/fenetres/create_act/actTousLesNodesEvaluer.java @@ -26,7 +26,7 @@ public class actTousLesNodesEvaluer extends AbstractAction{ try { commandes.sujetSauvegarde = commandes.sujet.clone(); - commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull2(); + commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull(); commandes.fichierAnalyseValide=false; fenetres.create.getTextNodeSelect().setContentType("text/html"); diff --git a/src/fenetres/evaluate.java b/src/fenetres/evaluate.java index 1c03738..21d9ac4 100644 --- a/src/fenetres/evaluate.java +++ b/src/fenetres/evaluate.java @@ -25,6 +25,7 @@ import javax.swing.JScrollPane; import javax.swing.JToolBar; import javax.swing.KeyStroke; import javax.swing.SwingConstants; +import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -72,17 +73,26 @@ public class evaluate extends JFrame { private JCheckBox chckbxNoDetail; private afficheText txtpnmessages; + private static evaluate instance; + /** * Create the frame. */ - public evaluate() { + public void initialize() throws UnsupportedLookAndFeelException{ + setSize(1200,800); + + + + ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") ); this.setIconImage(img.getImage()); setTitle(commandes.Titre + " " + commandes.version + " " + commandes.branch); - + + setLocationRelativeTo( null ); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - setBounds(100, 100, 980, 700); + +// setBounds(100, 100, 980, 700); int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight(); setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2); @@ -331,8 +341,27 @@ public class evaluate extends JFrame { }); } + public static evaluate getInstance() { + if (instance == null) { + instance = new evaluate(); + } + instance.setVisible(true); + return instance; + } + /** + * Create the application. + */ + public evaluate() { + try { + initialize(); + } catch (UnsupportedLookAndFeelException e) { + e.printStackTrace(); + } + setVisible(true); + } + private void createMenu() { JMenuBar menuBar = new JMenuBar(); @@ -415,6 +444,10 @@ public class evaluate extends JFrame { toolBar.add(btnAfficheCodeFichierAnalyse); JButton btnModifierFichierAnalyse = toolBar.add(actModifierFichierAnalyse); + btnModifierFichierAnalyse.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); btnModifierFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png"))); btnModifierFichierAnalyse.setHideActionText(true); toolBar.add(btnModifierFichierAnalyse); @@ -948,7 +981,7 @@ public class evaluate extends JFrame { @Override public void actionPerformed( ActionEvent e ) { create.getInstance(); - dispose(); + evaluate.getInstance().dispose(); } }; diff --git a/src/fenetres/mainApp.java b/src/fenetres/mainApp.java index a02e9df..8387f71 100644 --- a/src/fenetres/mainApp.java +++ b/src/fenetres/mainApp.java @@ -134,7 +134,7 @@ public class mainApp extends JFrame implements ActionListener{ if(e.getSource()==actCharge) { if(!commandes.console) System.out.println( "Début chargement du fichier d'analyse." ); - new evaluate(); + evaluate.getInstance(); frmEvalwriter.dispose(); }