MAJ (V4.3.1)
6
bin/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/list/
|
||||
/fenetres/
|
||||
/evaluer/
|
||||
/ou.png
|
||||
/oumini.png
|
||||
/resources/
|
116
icons/OU.svg
Normal file
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="ou.png"
|
||||
sodipodi:docname="OU.svg"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 11.90625 11.90625"
|
||||
height="45"
|
||||
width="45"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2">
|
||||
<pattern
|
||||
id="EMFhbasepattern"
|
||||
patternUnits="userSpaceOnUse"
|
||||
width="6"
|
||||
height="6"
|
||||
x="0"
|
||||
y="0" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-width="1920"
|
||||
units="px"
|
||||
inkscape:guide-bbox="true"
|
||||
showguides="true"
|
||||
showgrid="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="32.065537"
|
||||
inkscape:cx="13.349994"
|
||||
inkscape:zoom="7.8277187"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:deskcolor="#d1d1d1">
|
||||
<sodipodi:guide
|
||||
id="guide25"
|
||||
orientation="0,-1"
|
||||
position="94.049365,180.07197"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="8.9572181,11.534441"
|
||||
orientation="0,-1"
|
||||
id="guide4043"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-4.2589037,4.1320607"
|
||||
orientation="0,-1"
|
||||
id="guide315"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="1.0787715,2.8911402"
|
||||
orientation="0,-1"
|
||||
id="guide373"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="11.558135,1.7718565"
|
||||
orientation="1,0"
|
||||
id="guide428"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Calque 1">
|
||||
<ellipse
|
||||
style="fill:#800000;stroke:#00ff02;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:fill markers stroke;stop-color:#000000"
|
||||
id="path485"
|
||||
cx="5.953125"
|
||||
cy="5.953125"
|
||||
rx="5.1546254"
|
||||
ry="4.9349198" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:8.24782px;line-height:1.2;font-family:arial;-inkscape-font-specification:arial;fill:#ffffff;stroke:#000000;stroke-width:0.25"
|
||||
x="0.73846942"
|
||||
y="8.1826782"
|
||||
id="text327"
|
||||
transform="scale(0.87864777,1.1381125)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan325"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:arial;-inkscape-font-specification:'arial Bold';fill:#ffffff;stroke:#000000;stroke-width:0.25"
|
||||
x="0.73846942"
|
||||
y="8.1826782">OU</tspan></text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
BIN
icons/ou.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
icons/oumini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@ -40,7 +40,17 @@ public class analyseLesNodesEnfants {
|
||||
//** Ajoute des sauts et titres **
|
||||
//********************************
|
||||
PourAnalyse = meptl.addNodeSautTitre(nodEnfantSujet, PourAnalyse,nodmenu,a);
|
||||
|
||||
|
||||
//*******************
|
||||
//** Le node <OU/> **
|
||||
//*******************
|
||||
if(nameNode.equals("OU")) {
|
||||
if(nodEnfantSujet.getNodes().size()>1) {
|
||||
PourAnalyse = NodeOu(j,nodEnfantSujet, PourAnalyse, nomDuNodePourAnalyse,nod2Student,nod1Student,nodStudent,nodSujet,nodSujetParagraphs,nodStudentParagraphes,nodmenu,a);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
//***************************************************
|
||||
//** Recherche le node correspondant de l'étudiant **
|
||||
//***************************************************
|
||||
@ -149,6 +159,66 @@ public class analyseLesNodesEnfants {
|
||||
}
|
||||
|
||||
|
||||
public static node NodeOu(Integer j , node nodEnfantSujet , node PourAnalyse, String nomDuNodePourAnalyse, node nod2Student, node nod1Student, node nodStudent, node nodSujet, node nodSujetParagraphs, node nodStudentParagraphes, node nodmenu,Run a) {
|
||||
|
||||
node nodStudentCorrespondantAuNodSujet = null;
|
||||
|
||||
for(int k = j+1 ; k < nodSujet.getNodes().size();k++ ) {
|
||||
|
||||
nodEnfantSujet = nodSujet.getNodes().get(k);
|
||||
String nameNode = nodEnfantSujet.getNomElt();
|
||||
|
||||
//***************************************************
|
||||
//** Recherche le node correspondant de l'étudiant **
|
||||
//***************************************************
|
||||
if(nodEnfantSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(nodEnfantSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
if(nod2Student!=null) {
|
||||
if(nod2Student.containElementByName(nameNode)) {
|
||||
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
|
||||
}
|
||||
}
|
||||
if(nodStudentCorrespondantAuNodSujet==null && nod1Student!=null) {
|
||||
if(nod1Student.containElementByName(nameNode)) {
|
||||
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
|
||||
}
|
||||
}
|
||||
if(nodStudentCorrespondantAuNodSujet==null && nodStudent!=null) {
|
||||
if(nodStudent.containElementByName(nameNode)) {
|
||||
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************
|
||||
//** Analyse attribut et contenu du node enfant de l'étudiant **
|
||||
//**************************************************************
|
||||
PourAnalyse = evaluationAttribut.evalLesAttributEtContenuDuNode(nodStudentCorrespondantAuNodSujet, nodEnfantSujet, PourAnalyse, nomDuNodePourAnalyse,nameNode);
|
||||
|
||||
//*******************************
|
||||
//** méthode analyseStyle=true **
|
||||
//*******************************
|
||||
if(nameNode.contains("text:") && nodEnfantSujet.getAttributs().get("analyseStyle")!=null && nodSujetParagraphs!=null) {
|
||||
if(nodEnfantSujet.getAttributs().get("analyseStyle").equalsIgnoreCase("true")) {
|
||||
PourAnalyse = analyseStyle(PourAnalyse, nomDuNodePourAnalyse, nodEnfantSujet,nodStudentCorrespondantAuNodSujet, nodSujetParagraphs,nodStudentParagraphes, nodmenu, a);
|
||||
}
|
||||
}
|
||||
|
||||
//************************************************************
|
||||
//** Analyse les nodes enfants du node enfant - Récursivité **
|
||||
//************************************************************
|
||||
if(nodEnfantSujet!=null) {
|
||||
PourAnalyse = nodeNext(PourAnalyse, nomDuNodePourAnalyse, nodStudentCorrespondantAuNodSujet, nod2Student, nod1Student, nodEnfantSujet, nodSujetParagraphs, nodStudentParagraphes, nodmenu,a);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return PourAnalyse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -82,6 +82,7 @@ import fenetres.create_act.actExpandNode;
|
||||
import fenetres.create_act.actNewFichierAnalyse;
|
||||
import fenetres.create_act.actNodeFichier;
|
||||
import fenetres.create_act.actOpen;
|
||||
import fenetres.create_act.actOu;
|
||||
import fenetres.create_act.actPaste;
|
||||
import fenetres.create_act.actRechercheAnchorPageNumberFalse;
|
||||
import fenetres.create_act.actRechercheAnchorPageNumberTrue;
|
||||
@ -116,8 +117,6 @@ import java.awt.event.ActionListener;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public final class create extends JFrame {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -213,14 +212,6 @@ public final class create extends JFrame {
|
||||
panelPrincipal.setLayout(new GridLayout(1, 1, 0, 0));
|
||||
panelPrincipal.add(toolBarPrincipal);
|
||||
|
||||
|
||||
|
||||
|
||||
// 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();
|
||||
|
||||
@ -455,6 +446,12 @@ public final class create extends JFrame {
|
||||
JMenu mnEvaluerStylesParagraphes = new JMenu("Evaluer tous les styles des paragraphes.");
|
||||
mnEvaluerStylesParagraphes.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertouslesstylesparagraphesmini.png")));
|
||||
mnEvaluerStylesParagraphes.add( new actEvaluerTousLesStylesParagraphesTrue());
|
||||
|
||||
//Menu OU
|
||||
JMenu mnOu = new JMenu("Insérer un node OU.");
|
||||
mnOu.setIcon(new ImageIcon(create.class.getResource("/resources/oumini.png")));
|
||||
mnOu.add( new actOu());
|
||||
|
||||
|
||||
|
||||
//***************************
|
||||
@ -531,6 +528,8 @@ public final class create extends JFrame {
|
||||
mnPopupTree.add(mnEvalNumeroAbsoluePage);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnEvaluerStylesParagraphes);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnOu);
|
||||
}
|
||||
if(nod.getNomElt().equals("text:user-defined") && nod.chemin().contains("structurepage")) {
|
||||
mnPopupTree.addSeparator();
|
||||
|
48
src/fenetres/create_act/actOu.java
Normal file
@ -0,0 +1,48 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import cXML.node;
|
||||
|
||||
public class actOu extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Insérer un node OU." );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Insérer un node OU" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
TreePath path = fenetres.create.getTree().getSelectionPath();
|
||||
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
DefaultMutableTreeNode nodMu = fenetres.create.getSelectNode();
|
||||
|
||||
node nodeOu = new node();
|
||||
nodeOu.setNomElt("OU");
|
||||
nod.getNodes().add(nodeOu);
|
||||
|
||||
DefaultMutableTreeNode node1 = new DefaultMutableTreeNode(nodeOu);
|
||||
nodMu.add(node1);
|
||||
|
||||
DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel();
|
||||
DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();
|
||||
model.reload(root);
|
||||
|
||||
fenetres.create.getTree().setSelectionPath(path);
|
||||
fenetres.create.getTree().expandPath(path);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -14,6 +14,9 @@ import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import cXML.node;
|
||||
|
||||
@ -41,11 +44,28 @@ public class actPaste extends AbstractAction{
|
||||
paste = "<!-- ? -->" + c.getContents(null).getTransferData(DataFlavor.stringFlavor).toString().replace("\t","").replace("\r", "").replace("\n", "");
|
||||
if (!paste.equals(initial)) {
|
||||
node nodCopy =new node(paste);
|
||||
|
||||
if(!nodCopy.getNomElt().isEmpty()) {
|
||||
TreePath path = fenetres.create.getTree().getSelectionPath();
|
||||
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
DefaultMutableTreeNode nodeMu = fenetres.create.getSelectNode();
|
||||
|
||||
nod.getNodes().add(nodCopy);
|
||||
fenetres.create.constructionTree();
|
||||
initial = paste;
|
||||
DefaultMutableTreeNode node1 = new DefaultMutableTreeNode(nodCopy);
|
||||
nodeMu.add(node1);
|
||||
|
||||
nodeMu = addNodeMutable(nodCopy,node1);
|
||||
|
||||
DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel();
|
||||
DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();
|
||||
model.reload(root);
|
||||
|
||||
// fenetres.create.constructionTree();
|
||||
fenetres.create.getTree().setSelectionPath(path);
|
||||
fenetres.create.getTree().expandPath(path);
|
||||
|
||||
// initial = paste;
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Le collage n'est pas réalisé.");
|
||||
}
|
||||
@ -62,5 +82,25 @@ public class actPaste extends AbstractAction{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static DefaultMutableTreeNode addNodeMutable(node nod, DefaultMutableTreeNode parent) {
|
||||
if(nod!=null) {
|
||||
DefaultMutableTreeNode node1 = null;
|
||||
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
// Le node setting ne doit pas s'afficher dans le JTree
|
||||
if(!nod.getNodes().get(i).getNomElt().equals("setting")) {
|
||||
|
||||
node1 = new DefaultMutableTreeNode(nod.getNodes().get(i));
|
||||
addNodeMutable(nod.getNodes().get(i), node1);
|
||||
parent.add(node1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
||||
}
|
||||
|
BIN
src/fenetres/create_act/ou.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/fenetres/create_act/oumini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@ -105,7 +105,6 @@ public class descriptionNode {
|
||||
|
||||
|
||||
|
||||
|
||||
//****************************************
|
||||
//--- Les nodes de LibreOffice Writer
|
||||
//****************************************
|
||||
@ -116,7 +115,7 @@ public class descriptionNode {
|
||||
+ "<br>Par défaut, analyseWriter parcourt les paragraphes les uns après les autres par ordre d'affichage dans le fichier."
|
||||
+ "<br>Il est conseillé dans les consignes de faire afficher le numéro des lignes, menu <b><u>\"Numérotation des lignes\"</u></b>."
|
||||
+ "<br>Ainsi, les étudiants peuvent identifier quel doit être le contenu de chaque paragraphe, ou de chaque ligne."
|
||||
+ "<br><b>Cependant, cette méthode implique d'évaluer tous les nodes paragraphes du document.</b>"
|
||||
+ "<br><b>Cependant, cette méthode implique l'évaluation de tous les nodes paragraphes du document.</b>"
|
||||
+ "<br>"
|
||||
+ "<br>AnalyseWriter peut rechercher un paragraphe par son contenu textuel avec deux algorithmes, <b>\"Recherche par le contenu exact\"</b> ou <b>\"Rechercher par le plus proche voisin\"</b>, ou par son index, <b>\"Rechercher par index\"</b>."
|
||||
+ "<br>Ces méthodes permettent de s'affranchir de l'évaluation de tous les nodes paragraphes et de laisser la liberté aux étudiants d'insérer des paragraphes.</p>";
|
||||
|
BIN
src/resources/ou.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/resources/oumini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |