diff --git a/analyseWriter.jar b/analyseWriter.jar index 150fed6..df052d8 100644 Binary files a/analyseWriter.jar and b/analyseWriter.jar differ diff --git a/bin/.gitignore b/bin/.gitignore index 75cdcb7..c155331 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1 +1,5 @@ /fenetres/ +/list/ +/evaluer/ +/resources/ +/MEPTL/ diff --git a/bin/MEPTL/commandes.class b/bin/MEPTL/commandes.class index 911e6c0..dc57f8c 100644 Binary files a/bin/MEPTL/commandes.class and b/bin/MEPTL/commandes.class differ diff --git a/bin/MEPTL/ecritureSujet.class b/bin/MEPTL/ecritureSujet.class index 623a81c..0ab7989 100644 Binary files a/bin/MEPTL/ecritureSujet.class and b/bin/MEPTL/ecritureSujet.class differ diff --git a/bin/evaluer/evaluationAttribut.class b/bin/evaluer/evaluationAttribut.class index 4b29676..b4e6fb5 100644 Binary files a/bin/evaluer/evaluationAttribut.class and b/bin/evaluer/evaluationAttribut.class differ diff --git a/bin/list/listeAttributsAnalyseWriter.class b/bin/list/listeAttributsAnalyseWriter.class index 32bfdd6..4fcf811 100644 Binary files a/bin/list/listeAttributsAnalyseWriter.class and b/bin/list/listeAttributsAnalyseWriter.class differ diff --git a/icons/evalnumeroabsoluepage.png b/icons/evalnumeroabsoluepage.png new file mode 100644 index 0000000..f010701 Binary files /dev/null and b/icons/evalnumeroabsoluepage.png differ diff --git a/icons/evalnumeroabsoluepage.svg b/icons/evalnumeroabsoluepage.svg new file mode 100644 index 0000000..3705ebe --- /dev/null +++ b/icons/evalnumeroabsoluepage.svg @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + # + + + + + + + + + + + + + + + + # + + # + + + + + diff --git a/icons/evalnumeroabsoluepagemini.png b/icons/evalnumeroabsoluepagemini.png new file mode 100644 index 0000000..451a404 Binary files /dev/null and b/icons/evalnumeroabsoluepagemini.png differ diff --git a/icons/evalnumeropage.png b/icons/evalnumeropage.png new file mode 100644 index 0000000..0eab974 Binary files /dev/null and b/icons/evalnumeropage.png differ diff --git a/icons/evalnumeropage.svg b/icons/evalnumeropage.svg new file mode 100644 index 0000000..10a0140 --- /dev/null +++ b/icons/evalnumeropage.svg @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + # + + + + diff --git a/icons/evalnumeropagemini.png b/icons/evalnumeropagemini.png new file mode 100644 index 0000000..d1086a7 Binary files /dev/null and b/icons/evalnumeropagemini.png differ diff --git a/src/MEPTL/commandes.java b/src/MEPTL/commandes.java index e284b3b..91c0a66 100644 --- a/src/MEPTL/commandes.java +++ b/src/MEPTL/commandes.java @@ -33,7 +33,7 @@ public class commandes { public static node nodeCSV = null; //**version - public static String version ="V4.1.2"; // La version actuelle + public static String version ="V4.2.0"; // La version actuelle public static String branch = "Origin"; public static String Annee ="2022"; diff --git a/src/MEPTL/ecritureSujet.java b/src/MEPTL/ecritureSujet.java index 72e7da8..8ba80a8 100644 --- a/src/MEPTL/ecritureSujet.java +++ b/src/MEPTL/ecritureSujet.java @@ -347,6 +347,7 @@ public class ecritureSujet { */ public static boolean listeDesNodesByRecherche(String nameNode) { if(nameNode.contains("text:p")) return true; + if(nameNode.contains("text:line-break")) return true; if(nameNode.contains("text:h")) return true; if(nameNode.contains("text:span")) return true; if(nameNode.equals("draw:text-box")) return true; diff --git a/src/evaluer/evaluationAttribut.java b/src/evaluer/evaluationAttribut.java index f16436d..7cdad8b 100644 --- a/src/evaluer/evaluationAttribut.java +++ b/src/evaluer/evaluationAttribut.java @@ -244,10 +244,27 @@ public class evaluationAttribut { } } + if(k.equals("evalNumeroPage") && sujet.getNomElt().equals("page")) { + if(nodeStudent!=null) { + retour = evaluNumeroPage(retour,nodeStudent, sujet.getAttributs().get("numero"), sujet.getAttributs().get("evalNumeroPage"),"numéro"); + }else { + retour = evaluNumeroPage(retour,null, "Pas trouvé la page", sujet.getAttributs().get("evalNumeroPage"),"numéro"); + } + } + + if(k.equals("evalNumeroAbsoluePage") && sujet.getNomElt().equals("page")) { + if(nodeStudent!=null) { + retour = evaluNumeroAbsoluePage(retour,nodeStudent, sujet.getAttributs().get("numeroabsolue"), sujet.getAttributs().get("evalNumeroAbsoluePage"),"numéro absolue"); + }else { + retour = evaluNumeroAbsoluePage(retour,null, "Pas trouvé la page", sujet.getAttributs().get("evalNumeroAbsoluePage"),"numéro absolue"); + } + } + } } + //avec l'attribut allContent="strict1", allContent="strictSansEspace1" et allContent="environ1" // il faut ajouter une méthode pour ignorer la casse if(sujet.getAttributs().get("allContent")!=null) if(!sujet.getAttributs().get("allContent").isEmpty()){ @@ -427,12 +444,54 @@ public class evaluationAttribut { item = retourneNoteAvecResultatsAnalyse(namePage,"name", nodStudent.getAttributs().get("style:master-page-name"),namePage + "↑‽" +point, nameElt ); }else { evaluation.IncrementPointTotal(Integer.valueOf(point)); - item = new node(namePage, "Erreur", "Nom de la séquence" , "null", namePage, 2, evaluation.getPointEnJeu(),nameElt); + item = new node(namePage, "Erreur", "Nom de la page" , "null", namePage, 2, evaluation.getPointEnJeu(),nameElt); } retour.getNodes().add(item); return retour; } + /** + * + * @param retour + * @param nodStudent + * @param numeroPage + * @param point + * @param nameElt + * @return + */ + private static node evaluNumeroPage(node retour, node nodStudent, String numeroPage, String point, String nameElt) { + node item = null; + if(nodStudent!=null) { + item = retourneNoteAvecResultatsAnalyse(numeroPage,"numéro", nodStudent.getAttributs().get("numero"),numeroPage + "‽" +point, nameElt ); + }else { + evaluation.IncrementPointTotal(Integer.valueOf(point)); + item = new node(numeroPage, "Erreur", "Numéro de la page" , "null", numeroPage, 2, evaluation.getPointEnJeu(),nameElt); + } + retour.getNodes().add(item); + return retour; + } + + /** + * + * @param retour + * @param nodStudent + * @param numeroAbsoluePage + * @param point + * @param nameElt + * @return + */ + private static node evaluNumeroAbsoluePage(node retour, node nodStudent, String numeroAbsoluePage, String point, String nameElt) { + node item = null; + if(nodStudent!=null) { + item = retourneNoteAvecResultatsAnalyse(numeroAbsoluePage,"numéro absolue", nodStudent.getAttributs().get("numeroabsolue"),numeroAbsoluePage + "‽" +point, nameElt ); + }else { + evaluation.IncrementPointTotal(Integer.valueOf(point)); + item = new node(numeroAbsoluePage, "Erreur", "Numéro de la page absolue" , "null", numeroAbsoluePage, 2, evaluation.getPointEnJeu(),nameElt); + } + retour.getNodes().add(item); + return retour; + } + /** * Retourne le node avec les résultats de la comparaison entre les deux valeurs (étudiant et sujet).
*
diff --git a/src/fenetres/afficheText.java b/src/fenetres/afficheText.java index 60fcc19..2de4619 100644 --- a/src/fenetres/afficheText.java +++ b/src/fenetres/afficheText.java @@ -54,6 +54,8 @@ public class afficheText extends JEditorPane { String imageEvalNameSequence= ""; String imageEvalNamePage= ""; String imagePoids= ""; + String imageEvalNumeroPage= ""; + String imageEvalNumeroAbsoluePage= ""; StringBuilder sb = new StringBuilder(); @@ -175,6 +177,12 @@ public class afficheText extends JEditorPane { if(Lesattributsdunode.get(i).equals("evalNamePage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { sb.append("
  • "+imageEvalNamePage + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } + if(Lesattributsdunode.get(i).equals("evalNumeroPage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { + sb.append("
  • "+imageEvalNumeroPage + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); + } + if(Lesattributsdunode.get(i).equals("evalNumeroAbsoluePage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { + sb.append("
  • "+imageEvalNumeroAbsoluePage + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); + } if(Lesattributsdunode.get(i).equals("poids") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { sb.append("
  • "+imagePoids + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } diff --git a/src/fenetres/allContent.java b/src/fenetres/allContent.java index 192932c..509f063 100644 --- a/src/fenetres/allContent.java +++ b/src/fenetres/allContent.java @@ -72,7 +72,8 @@ public class allContent extends JFrame { lblValeurDeLattribut.setBounds(10, 105, 130, 22); contentPane.add(lblValeurDeLattribut); - JLabel lblDescription = new JLabel("Cet attribut permet d'évaluer le contenu du node et de celui des nodes enfants de ce node."); + JLabel lblDescription = new JLabel("Cet attribut permet d'évaluer le contenu du node et de celui des nodes enfants de ce node.
    " + + "Par conséquent, tous les nodes enfants seront évalués."); lblDescription.setLabelFor(this); lblDescription.setFont(new Font("Tahoma", Font.PLAIN, 12)); lblDescription.setBounds(10, 11, 399, 50); @@ -134,6 +135,7 @@ public class allContent extends JFrame { 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(); } catch (Exception e2) { diff --git a/src/fenetres/create.java b/src/fenetres/create.java index 8edc5c9..23bf5fe 100644 --- a/src/fenetres/create.java +++ b/src/fenetres/create.java @@ -58,6 +58,10 @@ import fenetres.create_act.actEvalNamePageNon; import fenetres.create_act.actEvalNamePageOui; import fenetres.create_act.actEvalNameSequenceNon; import fenetres.create_act.actEvalNameSequenceOui; +import fenetres.create_act.actEvalNumeroAbsoluePageNon; +import fenetres.create_act.actEvalNumeroAbsoluePageOui; +import fenetres.create_act.actEvalNumeroPageNon; +import fenetres.create_act.actEvalNumeroPageOui; import fenetres.create_act.actEvalPiedPageActive; import fenetres.create_act.actEvalPiedPagePasActive; import fenetres.create_act.actEvalueFalse; @@ -101,10 +105,7 @@ import list.listeEvalNameNode; import list.listeRechercheParAnchorPageNumber; import javax.swing.JToggleButton; import java.awt.GridLayout; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; -import net.miginfocom.swing.MigLayout; + @@ -117,9 +118,9 @@ public final class create extends JFrame { private static afficheText textNodeSelect = new afficheText(); private JToolBar toolBarPrincipal; - private toolBarRecherche bRecherche; +// private toolBarRecherche bRecherche; - private JCheckBoxMenuItem chckbxtoolBarRecherche; +// private JCheckBoxMenuItem chckbxtoolBarRecherche; private JMenuBar menuBar = new JMenuBar(); private static JButton buttonEvaluate; @@ -127,7 +128,7 @@ public final class create extends JFrame { private static JToggleButton tglbtnTousLesNodes; private JPanel panelPrincipal; - private JPanel panel; +// private JPanel panel; private static create instance; @@ -180,8 +181,6 @@ public final class create extends JFrame { this.createToolBar(); panelPrincipal = new JPanel(); - panelPrincipal.setLayout(new MigLayout("", "[100px:500px:1000px][100px:500px]", "[53:53:53][]")); - panelPrincipal.add(toolBarPrincipal, "cell 0 0,growx,aligny top"); getContentPane().add(panelPrincipal, BorderLayout.NORTH); this.createPopupMenuTree(null); @@ -202,13 +201,17 @@ public final class create extends JFrame { tree.setFont(new Font("Tahoma", Font.PLAIN, 14)); getContentPane().add(splitPane, BorderLayout.CENTER); - - panel = new JPanel(); - getContentPane().add(panel, BorderLayout.WEST); - panel.setLayout(new GridLayout(0,2, 0, 0)); + panelPrincipal.setLayout(new GridLayout(1, 1, 0, 0)); + panelPrincipal.add(toolBarPrincipal); - bRecherche = new toolBarRecherche(); - panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top"); + + + +// panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top"); +// panelPrincipal.add(bRecherche2, "cell 0 1,alignx left,aligny top"); + + +// panelPrincipal.add(label, "cell 2 1,alignx left,aligny center"); if(commandes.fichierAnalyseValide) constructionTree(); @@ -254,20 +257,20 @@ public final class create extends JFrame { }); - chckbxtoolBarRecherche.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - if(chckbxtoolBarRecherche.isSelected()) { -// panelPrincipal.add(bRecherche); - panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top"); - bRecherche.setVisible(true); - bRecherche.setEnabled(true); - }else { - bRecherche.setVisible(false); - bRecherche.setEnabled(false); - panelPrincipal.remove(bRecherche); - } - } - }); +// chckbxtoolBarRecherche.addChangeListener(new ChangeListener() { +// public void stateChanged(ChangeEvent e) { +// if(chckbxtoolBarRecherche.isSelected()) { +//// panelPrincipal.add(bRecherche); +// panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top"); +// bRecherche.setVisible(true); +// bRecherche.setEnabled(true); +// }else { +// bRecherche.setVisible(false); +// bRecherche.setEnabled(false); +// panelPrincipal.remove(bRecherche); +// } +// } +// }); } @@ -411,12 +414,23 @@ public final class create extends JFrame { mnEvalNameSequence.add(new actEvalNameSequenceOui()); mnEvalNameSequence.add(new actEvalNameSequenceNon()); - //Menu evalNamePage (pour les page) + //Menu evalNamePage (pour les nodes page) JMenu mnEvalNamePage = new JMenu("Evaluer le nom de la page"); mnEvalNamePage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnamepagemini.png"))); mnEvalNamePage.add(new actEvalNamePageOui()); mnEvalNamePage.add(new actEvalNamePageNon()); + //Menu evalNumeroPage (pour les nodes page) + JMenu mnEvalNumeroPage = new JMenu("Evaluer le numéro de la page"); + mnEvalNumeroPage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnumeropagemini.png"))); + mnEvalNumeroPage.add(new actEvalNumeroPageOui()); + mnEvalNumeroPage.add(new actEvalNumeroPageNon()); + + //Menu evalNumeroPage (pour les nodes page) + JMenu mnEvalNumeroAbsoluePage = new JMenu("Evaluer le numéro absolue de la page"); + mnEvalNumeroAbsoluePage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnumeroabsoluepagemini.png"))); + mnEvalNumeroAbsoluePage.add(new actEvalNumeroAbsoluePageOui()); + mnEvalNumeroAbsoluePage.add(new actEvalNumeroAbsoluePageNon()); //Menue Recherche par le numéro de la page ancrer JMenu mnRechercheParNumeroPageAncrer = new JMenu("Recherche par le numéro de la page"); @@ -449,23 +463,8 @@ public final class create extends JFrame { mnNiveau1.addSeparator(); mnNiveau1.add(mnAddMenuNiveau1); - - - - - - - - //**Menu setting - JMenu mnSetting = new JMenu("Les paramètres"); - mnSetting.add("CSV"); - mnSetting.add("ZIP feedback"); - mnSetting.add("plagiarism"); - mnSetting.add("text:similarity"); - mnSetting.add("translation"); - //********************************************* //** La popupMenu qui s'affiche sur le tree *** //********************************************* @@ -527,6 +526,10 @@ public final class create extends JFrame { if(nod.getNomElt().equals("page")) { mnPopupTree.addSeparator(); mnPopupTree.add(mnEvalNamePage); + mnPopupTree.addSeparator(); + mnPopupTree.add(mnEvalNumeroPage); + mnPopupTree.addSeparator(); + mnPopupTree.add(mnEvalNumeroAbsoluePage); } mnPopupTree.addSeparator(); mnPopupTree.add(new actAttribut()); @@ -583,9 +586,9 @@ public final class create extends JFrame { JMenu mnAffiche = new JMenu("Affichage"); menuBar.add(mnAffiche); - chckbxtoolBarRecherche = new JCheckBoxMenuItem("Barre outils recherche node"); - chckbxtoolBarRecherche.setSelected(true); - mnAffiche.add(chckbxtoolBarRecherche); +// chckbxtoolBarRecherche = new JCheckBoxMenuItem("Barre outils recherche node"); +// chckbxtoolBarRecherche.setSelected(true); +// mnAffiche.add(chckbxtoolBarRecherche); // Définition du menu Node JMenu mnNode = new JMenu("Modifier"); @@ -636,6 +639,7 @@ public final class create extends JFrame { /* Methode de construction de la barre d'outils */ private void createToolBar() { toolBarPrincipal = new JToolBar(); + toolBarPrincipal.setFloatable(false); toolBarPrincipal.setRollover(true); toolBarPrincipal.setName("outils principaux"); diff --git a/src/fenetres/create_act/actEvalNumeroAbsoluePageNon.java b/src/fenetres/create_act/actEvalNumeroAbsoluePageNon.java new file mode 100644 index 0000000..42adbdf --- /dev/null +++ b/src/fenetres/create_act/actEvalNumeroAbsoluePageNon.java @@ -0,0 +1,27 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; + +import cXML.node; + +public class actEvalNumeroAbsoluePageNon extends AbstractAction{ + + /** + * + */ + private static final long serialVersionUID = 1L; + { + putValue( Action.NAME, "Supprime évaluer le numéro absolue de la page" ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du numéro absolue de la page." ); + } + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + nod.supprimeAttribut("evalNumeroAbsoluePage"); + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } + +} diff --git a/src/fenetres/create_act/actEvalNumeroAbsoluePageOui.java b/src/fenetres/create_act/actEvalNumeroAbsoluePageOui.java new file mode 100644 index 0000000..5426374 --- /dev/null +++ b/src/fenetres/create_act/actEvalNumeroAbsoluePageOui.java @@ -0,0 +1,49 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.JOptionPane; + +import cXML.node; +import fenetres.baliseStyle; + +public class actEvalNumeroAbsoluePageOui extends AbstractAction{ + + /** + * + */ + private static final long serialVersionUID = 1L; + { + putValue( Action.NAME, "Oui, combien de point?" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer le numéro absolue de la page" ); + } + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + int point = 0; + if(nod.getAttributs().get("evalNumeroAbsoluePage")!=null) { + point = Integer.valueOf(nod.getAttributs().get("evalNumeroAbsoluePage")); + } + + String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); + + if(!a.isEmpty()) { + try { + point = Integer.valueOf(a); + if(point<=0) { + nod.getAttributs().put("evalNumeroAbsoluePage", String.valueOf(0)); + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
    Cependant,la valeur a été modifiée.
    evalNumeroAbsoluePage=0.

    "); + }else { + nod.getAttributs().put("evalNumeroAbsoluePage", String.valueOf(point)); + } + } catch (Exception e2) { + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier.
    L'attribut n'a pas été modifiée.

    "); + } + } + fenetres.create.getTextNodeSelect().refreshAffichage(nod); } + +} diff --git a/src/fenetres/create_act/actEvalNumeroPageNon.java b/src/fenetres/create_act/actEvalNumeroPageNon.java new file mode 100644 index 0000000..3811a7a --- /dev/null +++ b/src/fenetres/create_act/actEvalNumeroPageNon.java @@ -0,0 +1,26 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; + +import cXML.node; + +public class actEvalNumeroPageNon extends AbstractAction{ + + /** + * + */ + private static final long serialVersionUID = 1L; + { + putValue( Action.NAME, "Supprime évaluer le numéro de la page" ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du numéro de la page." ); + } + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + nod.supprimeAttribut("evalNumeroPage"); + fenetres.create.getTextNodeSelect().refreshAffichage(nod); } + +} diff --git a/src/fenetres/create_act/actEvalNumeroPageOui.java b/src/fenetres/create_act/actEvalNumeroPageOui.java new file mode 100644 index 0000000..6852793 --- /dev/null +++ b/src/fenetres/create_act/actEvalNumeroPageOui.java @@ -0,0 +1,51 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.JOptionPane; + +import cXML.node; +import fenetres.baliseStyle; + +public class actEvalNumeroPageOui extends AbstractAction{ + + /** + * + */ + private static final long serialVersionUID = 1L; + { + putValue( Action.NAME, "Oui, combien de point?" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer le numéro de la page" ); + } + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + int point = 0; + if(nod.getAttributs().get("evalNumeroPage")!=null) { + point = Integer.valueOf(nod.getAttributs().get("evalNumeroPage")); + } + + String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); + + if(!a.isEmpty()) { + try { + point = Integer.valueOf(a); + if(point<=0) { + nod.getAttributs().put("evalNumeroPage", String.valueOf(0)); + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
    Cependant,la valeur a été modifiée.
    evalNumeroPage=0.

    "); + }else { + nod.getAttributs().put("evalNumeroPage", String.valueOf(point)); + } + } catch (Exception e2) { + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier.
    L'attribut n'a pas été modifiée.

    "); + } + } + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + + } + +} diff --git a/src/fenetres/toolBarRecherche.java b/src/fenetres/toolBarRecherche.java index ed97a11..6af8b3f 100644 --- a/src/fenetres/toolBarRecherche.java +++ b/src/fenetres/toolBarRecherche.java @@ -1,14 +1,9 @@ package fenetres; -import java.awt.event.ContainerListener; -import java.awt.event.HierarchyEvent; -import java.awt.event.HierarchyListener; -import java.beans.PropertyChangeListener; - import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JToolBar; -import javax.swing.event.AncestorListener; + public class toolBarRecherche extends JToolBar{ @@ -19,6 +14,7 @@ public class toolBarRecherche extends JToolBar{ private JButton btnRechercheIndex; private JButton btnRechercheContenuExact; private JButton btnRechercheVoisin; + private JButton btnAllContent; public toolBarRecherche() { setRollover(true); @@ -38,6 +34,14 @@ public class toolBarRecherche extends JToolBar{ btnRechercheVoisin.setEnabled(false); btnRechercheVoisin.setIcon(new ImageIcon(create.class.getResource("/resources/recherchecontenuplusprochevoisin.png"))); add(btnRechercheVoisin); + + addSeparator(); + btnAllContent = new JButton(""); + btnAllContent.setEnabled(false); + btnAllContent.setIcon(new ImageIcon(create.class.getResource("/resources/allcontent.png"))); + add(btnAllContent); + + } diff --git a/src/list/listeAttributsAnalyseWriter.java b/src/list/listeAttributsAnalyseWriter.java index 8c0b9c9..27a01a0 100644 --- a/src/list/listeAttributsAnalyseWriter.java +++ b/src/list/listeAttributsAnalyseWriter.java @@ -6,6 +6,12 @@ public class listeAttributsAnalyseWriter { } + /** + * + * retourne true si c'est un attribut utilisé par analyseWriter.
    + * @param attribut + * @return + */ public static boolean isAttributAnalyseWriter(String attribut) { if(attribut.equals("evaluer")) return true; @@ -34,6 +40,8 @@ public class listeAttributsAnalyseWriter { if(attribut.equals("evalPiedPagePasActive")) return true; if(attribut.equals("evalNameSequence")) return true; if(attribut.equals("evalNamePage")) return true; + if(attribut.equals("evalNumeroAbsoluePage")) return true; + if(attribut.equals("evalNumeroPage")) return true; //Les attribut placer dans le node fichier du fichier d'analyse if(attribut.equals("analysis_filename")) return true; diff --git a/src/resources/evalnumeroabsoluepage.png b/src/resources/evalnumeroabsoluepage.png new file mode 100644 index 0000000..f010701 Binary files /dev/null and b/src/resources/evalnumeroabsoluepage.png differ diff --git a/src/resources/evalnumeroabsoluepagemini.png b/src/resources/evalnumeroabsoluepagemini.png new file mode 100644 index 0000000..451a404 Binary files /dev/null and b/src/resources/evalnumeroabsoluepagemini.png differ diff --git a/src/resources/evalnumeropage.png b/src/resources/evalnumeropage.png new file mode 100644 index 0000000..0eab974 Binary files /dev/null and b/src/resources/evalnumeropage.png differ diff --git a/src/resources/evalnumeropagemini.png b/src/resources/evalnumeropagemini.png new file mode 100644 index 0000000..d1086a7 Binary files /dev/null and b/src/resources/evalnumeropagemini.png differ