ajout de l'attribut evalNamePage
This commit is contained in:
parent
4507b65fe9
commit
d48deb19b3
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.
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.
Binary file not shown.
@ -340,14 +340,17 @@ public class ecritureSujet {
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste des nodes qui peuvent contenir l'attribut recherche_index
|
||||
* Liste des nodes qui peuvent contenir l'attribut recherche_index, recherche_contenu_exact, recherche_contenu_plus_proche_voisin
|
||||
* @param nameNode
|
||||
* @return
|
||||
*/
|
||||
public static boolean listeDesNodesByRecherche(String nameNode) {
|
||||
if(nameNode.contains("text:p")) return true;
|
||||
if(nameNode.contains("text:h")) return true;
|
||||
if(nameNode.contains("text:span")) return true;
|
||||
if(nameNode.equals("draw:text-box")) return true;
|
||||
if(nameNode.equals("text:soft-page-break")) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@ public class afficheText extends JEditorPane {
|
||||
String imageEntetePasActive= "<img src="+afficheText.class.getResource("/resources/entetenonmini.png").toString()+">";
|
||||
String imagePiedPagePasActive= "<img src="+afficheText.class.getResource("/resources/piedpagenonmini.png").toString()+">";
|
||||
String imageEvalNameSequence= "<img src="+afficheText.class.getResource("/resources/evalnamesequencemini.png").toString()+">";
|
||||
String imageEvalNamePage= "<img src="+afficheText.class.getResource("/resources/evalnamepagemini.png").toString()+">";
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@ -170,7 +171,9 @@ public class afficheText extends JEditorPane {
|
||||
if(Lesattributsdunode.get(i).equals("evalNameSequence") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalNameSequence + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
|
||||
if(Lesattributsdunode.get(i).equals("evalNamePage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalNamePage + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
|
||||
|
||||
// sb.append("<li class=\"p4\"><b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
|
@ -313,6 +313,12 @@ public class create extends JFrame {
|
||||
mnEvalNameSequence.add(actEvalNameSequenceOui);
|
||||
mnEvalNameSequence.add(actEvalNameSequenceNon);
|
||||
|
||||
//Menu evalNamePage (pour les page)
|
||||
JMenu mnEvalNamePage = new JMenu("Evaluer le nom de la page");
|
||||
mnEvalNamePage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnamepagemini.png")));
|
||||
mnEvalNamePage.add(actEvalNamePageOui);
|
||||
mnEvalNamePage.add(actEvalNamePageNon);
|
||||
|
||||
|
||||
//Menue Recherche par le numéro de la page ancrer
|
||||
JMenu mnRechercheParNumeroPageAncrer = new JMenu("Recherche par le numéro de la page");
|
||||
@ -388,6 +394,10 @@ public class create extends JFrame {
|
||||
mnNiveauSup1.addSeparator();
|
||||
mnNiveauSup1.add(mnEvalNameSequence);
|
||||
}
|
||||
if(nod.getNomElt().equals("page")) {
|
||||
mnNiveauSup1.addSeparator();
|
||||
mnNiveauSup1.add(mnEvalNamePage);
|
||||
}
|
||||
|
||||
|
||||
//**Menu setting
|
||||
@ -1228,7 +1238,70 @@ public class create extends JFrame {
|
||||
textNodeSelect.refreshAffichage(nod);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
private AbstractAction actEvalNamePageOui = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Oui, combien de point?" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom de la page" );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
|
||||
|
||||
node nod = (node) selectNode.getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalNamePage")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalNamePage"));
|
||||
}
|
||||
|
||||
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("evalNamePage", String.valueOf(0));
|
||||
textNodeSelect.setText(balisestyles());
|
||||
textNodeSelect.setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalNamePage=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalNamePage", String.valueOf(point));
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
textNodeSelect.setText(balisestyles());
|
||||
textNodeSelect.setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
|
||||
}
|
||||
}
|
||||
textNodeSelect.refreshAffichage(nod);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Supprime l'évaluation du nom de la page.
|
||||
*/
|
||||
private AbstractAction actEvalNamePageNon = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Supprime évaluer le nom de la page" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du nom de la page." );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
|
||||
|
||||
node nod = (node) selectNode.getUserObject();
|
||||
nod.supprimeAttribut("evalNamePage");
|
||||
textNodeSelect.refreshAffichage(nod);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Supprime l'évaluation du nom de la séquence.
|
||||
*/
|
||||
|
@ -391,10 +391,6 @@ public class proprieteFichierAnalyse extends JFrame {
|
||||
textFieldlink_sujet.setText(commandes.sujet.getAttributs().get("link_sujet"));
|
||||
}
|
||||
|
||||
JButton btnNewButton = new JButton("Valide");
|
||||
btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(btnNewButton, "cell 1 15,grow");
|
||||
|
||||
btnVoirBaremeABC = new JButton("");
|
||||
btnVoirBaremeABC.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@ -417,6 +413,10 @@ public class proprieteFichierAnalyse extends JFrame {
|
||||
});
|
||||
btnVoirBaremeNumeric.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
|
||||
contentPane.add(btnVoirBaremeNumeric, "cell 2 5");
|
||||
|
||||
JButton btnNewButton = new JButton("Valide");
|
||||
btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(btnNewButton, "cell 1 15,grow");
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
@ -469,13 +469,14 @@ public class proprieteFichierAnalyse extends JFrame {
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lorsque le combobox du barème ABC est sélectionner.
|
||||
*/
|
||||
private void Refresh() {
|
||||
if(comboBoxBaremeABC.getSelectedItem().equals("true")) {
|
||||
textFieldNoteFrom.setEditable(false);
|
||||
textFieldNoteFrom.setEditable(false);
|
||||
}else {
|
||||
textFieldNoteFrom.setEditable(true);
|
||||
textFieldNoteFrom.setEditable(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,9 @@ public class evaluationAttribut {
|
||||
}
|
||||
|
||||
// evaluer avec evalNameNode, evalNameCreator, evalNameInitialCreator, evalEntetePasActive, evalPiedPagePasActive
|
||||
// evalNameSequen, evalNamePage
|
||||
if(!sujet.getAttributs().get(k).equals("0")) {
|
||||
|
||||
if(k.equals("evalNameNode") && !sujet.getAttributs().get(k).equals("0")) {
|
||||
if(nodeStudent!=null) {
|
||||
retour = evaluNameNode(retour,nodeStudent, sujet.getNomElt(), sujet.getAttributs().get("evalNameNode"),sujet.getNomElt());
|
||||
@ -228,9 +230,17 @@ public class evaluationAttribut {
|
||||
|
||||
if(k.equals("evalNameSequence") && sujet.getNomElt().equals("text:sequence-decl")) {
|
||||
if(nodeStudent!=null) {
|
||||
retour = evaluNameSequence(retour,nodeStudent, nodeStudent.getAttributs().get("text:name"), sujet.getAttributs().get("evalNameSequence"),"Sequence");
|
||||
retour = evaluNameSequence(retour,nodeStudent, sujet.getAttributs().get("text:name"), sujet.getAttributs().get("evalNameSequence"),"Séquence");
|
||||
}else {
|
||||
retour = evaluNameSequence(retour,null, "Pas trouvé la séquence", sujet.getAttributs().get("evalNameSequence"),"Sequence");
|
||||
retour = evaluNameSequence(retour,null, "Pas trouvé la séquence", sujet.getAttributs().get("evalNameSequence"),"Séquence");
|
||||
}
|
||||
}
|
||||
|
||||
if(k.equals("evalNamePage") && sujet.getNomElt().equals("page")) {
|
||||
if(nodeStudent!=null) {
|
||||
retour = evaluNamePage(retour,nodeStudent, sujet.getAttributs().get("style:master-page-name"), sujet.getAttributs().get("evalNamePage"),"Page");
|
||||
}else {
|
||||
retour = evaluNamePage(retour,null, "Pas trouvé la page", sujet.getAttributs().get("evalNamePage"),"Page");
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,24 +395,43 @@ public class evaluationAttribut {
|
||||
* Evalue le nom de la séquence.
|
||||
* @param retour
|
||||
* @param nodStudent
|
||||
* @param nameCreator
|
||||
* @param nameSequence
|
||||
* @param point
|
||||
* @param nameElt
|
||||
* @return
|
||||
*/
|
||||
private static node evaluNameSequence(node retour, node nodStudent, String nameCreator, String point, String nameElt) {
|
||||
private static node evaluNameSequence(node retour, node nodStudent, String nameSequence, String point, String nameElt) {
|
||||
node item = null;
|
||||
if(nodStudent!=null) {
|
||||
item = retourneNoteAvecResultatsAnalyse(nameCreator,"name", nodStudent.getAttributs().get("text:name"),nameCreator + "↑‽" +point, nameElt );
|
||||
item = retourneNoteAvecResultatsAnalyse(nameSequence,"name", nodStudent.getAttributs().get("text:name"),nameSequence + "↑‽" +point, nameElt );
|
||||
}else {
|
||||
evaluation.IncrementPointTotal(Integer.valueOf(point));
|
||||
item = new node(nameCreator, "Erreur", "Nom de la séquence" , "null", nameCreator, 2, evaluation.getPointEnJeu(),nameElt);
|
||||
item = new node(nameSequence, "Erreur", "Nom de la séquence" , "null", nameSequence, 2, evaluation.getPointEnJeu(),nameElt);
|
||||
}
|
||||
retour.getNodes().add(item);
|
||||
return retour;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* evalue le nom de la page.
|
||||
* @param retour
|
||||
* @param nodStudent
|
||||
* @param namePage
|
||||
* @param point
|
||||
* @param nameElt
|
||||
* @return
|
||||
*/
|
||||
private static node evaluNamePage(node retour, node nodStudent, String namePage, String point, String nameElt) {
|
||||
node item = null;
|
||||
if(nodStudent!=null) {
|
||||
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);
|
||||
}
|
||||
retour.getNodes().add(item);
|
||||
return retour;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le node avec les résultats de la comparaison entre les deux valeurs (étudiant et sujet).<br>
|
||||
|
@ -33,6 +33,7 @@ public class listeAttributsAnalyseWriter {
|
||||
if(attribut.equals("evalEntetePasActive")) return true;
|
||||
if(attribut.equals("evalPiedPagePasActive")) return true;
|
||||
if(attribut.equals("evalNameSequence")) return true;
|
||||
if(attribut.equals("evalNamePage")) return true;
|
||||
|
||||
//Les attribut placer dans le node fichier du fichier d'analyse
|
||||
if(attribut.equals("analysis_filename")) return true;
|
||||
|
BIN
src/resources/evalnamepage.png
Normal file
BIN
src/resources/evalnamepage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 712 B |
BIN
src/resources/evalnamepagemini.png
Normal file
BIN
src/resources/evalnamepagemini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 398 B |
Loading…
Reference in New Issue
Block a user