MAJ V4.5.0

This commit is contained in:
pablo rodriguez 2024-05-09 19:11:08 +02:00
parent 9b074dc6a0
commit e4b47a28b7
19 changed files with 449 additions and 36 deletions

Binary file not shown.

1
bin/.gitignore vendored
View File

@ -139,3 +139,4 @@
/zipstudent.png
/zipstudent.svg
/zipstudentmini.png
/resources/

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="45"
height="45"
viewBox="0 0 11.90625 11.90625"
version="1.1"
id="svg5"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
sodipodi:docname="evalnombreparagraphe.svg"
inkscape:export-filename="evalnombreparagraphe.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
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">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="15.822222"
inkscape:cx="27.018961"
inkscape:cy="21.235955"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<text
xml:space="preserve"
style="font-size:11.7061px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;stroke-width:0.264583;fill:#0000ff"
x="0.95308274"
y="8.9726267"
id="text265"
transform="scale(0.9988156,1.0011858)"><tspan
sodipodi:role="line"
id="tspan263"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:11.7061px;font-family:Arial;-inkscape-font-specification:'Arial Heavy';stroke-width:0.264583;fill:#0000ff"
x="0.95308274"
y="8.9726267">¶</tspan></text>
<g
id="g1"
transform="translate(-14.932979,0.36788975)">
<path
style="fill:none;stroke:#ff0000;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="M 1.0395499,0.83893503 10.924393,11.252672"
id="path479"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#ff0000;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="M 10.924393,0.83893503 1.0395499,11.252672"
id="path1131"
sodipodi:nodetypes="cc" />
</g>
<g
id="g919"
transform="matrix(1.077757,0,0,1.1015764,4.5721538,7.6910246)"
style="fill:#0000ff;stroke:#000000;stroke-width:0.57493;stroke-opacity:1">
<rect
ry="0.56339979"
y="4.3255968"
x="0.92013353"
height="3.7594025"
width="3.8382711"
id="rect12"
style="fill:#de0000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.0373705;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
rx="0.5800662" />
<path
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.324836;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 1.6159,5.0384659 3.9724208,7.4062084"
id="path841" />
<path
id="path843"
d="M 3.9724208,5.0384659 1.6159,7.4062084"
style="fill:none;stroke:#ffffff;stroke-width:0.324836;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g923-4"
transform="matrix(1.0781672,0,0,1.1004826,-0.1789203,12.234507)"
style="fill:#0000ff;stroke-width:0.553289">
<rect
style="fill:#00bf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.0359638;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
id="rect10-6"
width="3.8382711"
height="3.7594025"
x="0.92013353"
y="0.34176376"
ry="0.56339979"
rx="0.5800662" />
<path
style="fill:#ffffff;stroke:none;stroke-width:0.146391px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 1.4619106,1.7500935 C 1.3627577,2.4034195 1.7869697,2.7038331 2.3820759,3.4752278 2.7236407,3.2105071 3.8437643,1.6082077 4.3539528,0.68451321 3.7444013,1.2569625 3.3467309,1.6796751 2.3752981,2.7432214 1.891109,2.378332 1.7782083,2.0571129 1.4619106,1.7500935 Z"
id="path16-3"
sodipodi:nodetypes="ccccc" />
</g>
<text
xml:space="preserve"
style="font-size:10.3848px;line-height:1.15;font-family:handwriting-draft_free-version;-inkscape-font-specification:handwriting-draft_free-version;fill:#ff0000;stroke:#000000;stroke-width:0.279597"
x="0.048285332"
y="10.841402"
id="text1"
transform="scale(0.97094439,1.0299251)"><tspan
sodipodi:role="line"
id="tspan1"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-family:Arial;-inkscape-font-specification:'Arial Heavy';fill:#ff0000;stroke:#000000;stroke-width:0.279597"
x="0.048285332"
y="10.841402">?</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

View File

@ -0,0 +1,36 @@
package action;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.CustomInputDialogSimplePointInputNombreSansCaseACocher;
import fenetres.create;
public class actEvalNombreParagraphe extends AbstractAction{
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Evaluer le nombre de paragraphe et de titre." );
putValue( Action.SHORT_DESCRIPTION, "Evaluer le nombre de paragraphe et de titre." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evalnombreparagraphemini.png")) );
}
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
CustomInputDialogSimplePointInputNombreSansCaseACocher.showCustominputDialog(nod,"evalnombreparagraphe",
"<html><p>Si le node de l'étudiant contient le même nombre<br>"
+ "de paragraphe <b>\"text:p\"</b> et de titre <b>\"text:h\"</b>,<br>"
+ " alors l'étudiant obtiendra les points ci-dessous.</p><br>"
+ "<p>Cliquez sur le bouton supprimer pour retirer la méthode<br>"
+ "d'évaluation evalnombreparagraphe.</p><br>"
+ "<p>Le nombre de paragraphe doit être indiqué ci-dessous.</p></html>",
new ImageIcon(create.class.getResource("/resources/evalnombreparagraphe.png")));
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -26,7 +26,7 @@ public class actEvalNumeroPageOui extends AbstractAction{
node nod = (node) fenetres.create.getSelectNode().getUserObject();
CustomInputDialogSimplePointpourNumeroPageEtStructure.showCustominputDialog(nod,"evalNumeroPage",
"<html><p>Si le node \"page\" dans le fichier de l'étudiant est situé <br>"
+ "au même numéro de la pagination que ce node de page, <br>"
+ "sur le même numéro de la pagination que ce node, <br>"
+ "alors l'étudiant obtiendra les points ci-dessous.</p><br>"
+"<p>Cochez sur la case sur \"Sur toutes les pages\" pour insérer <br>"
+"ou supprimer la méthode sur toutes les pages.</p><br>"

View File

@ -26,7 +26,7 @@ public class actEvalPasParagrapheVideOui extends AbstractAction{
node nod = (node) fenetres.create.getSelectNode().getUserObject();
CustomInputDialogSimplePointpourNumeroPageEtStructure.showCustominputDialog(nod,"evalPasParagrapheVide",
"<html><p>Si ce node, dans le fichier de l'étudiant, ne contient pas <br>"
+ "de paragraphe vide <i>(text:p sans contenu)<i>, alors l'étudiant <br>"
+ "de paragraphe vide <i>(Empty or blank)<i>, alors l'étudiant <br>"
+ "obtiendra les points ci-dessous.</p><br>"
+"<p>Cochez sur la case sur \"Sur toutes les pages\" pour insérer <br>"
+"ou supprimer la méthode sur toutes les pages.</p><br>"

View File

@ -198,8 +198,17 @@ public class calculNombrePointEvaluation {
}
}
if(nod.getAttributs().get("evalnombreparagraphe")!=null) {
try {
String valeur = nod.getAttributs().get("evalnombreparagraphe");
valeur = valeur.replace("evalnombreparagraphe_", "");
valeur = valeur.replaceAll(":[0-9]{1,}", "");
point = point + Integer.valueOf(valeur);
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNombreDePageMini");
}
}
//
if(nod.getAttributs().get("evalNameSequence")!=null) {
try {
point = point + Integer.valueOf(nod.getAttributs().get("evalNameSequence"));

View File

@ -10,6 +10,7 @@ import MEPTL.rechercherUnNodeStudent;
import cXML.node;
import list.listMethodeEvaluationAnalyseWriter;
import list.listeDesNodesAncrable;
import list.listeDesNodesContenantPargraphesOuTitres;
import list.listeDesNodesEvalPlacement;
import list.listeDesNodesFormatageDirect;
import list.listeDesNodesPourEvaluerPage;
@ -402,6 +403,11 @@ public class evaluationAttribut {
retour = evalPasParagrapheVide(sujet,nodeStudent,retour,nameElt);
}
//evaluation du nombre de paragraphe
if(k.equals("evalnombreparagraphe") && listeDesNodesContenantPargraphesOuTitres.isNodesContenantPargraphesOuTitres(sujet)) {
retour = evalnombreparagraphe(sujet,nodeStudent,retour,nameElt);
}
//evaluation du nombre de page maximal
if(k.equals("evalNombreDePageMaxi") && sujet.getNomElt().equals("structurepage")) {
retour = evalNombreDePageMaxi(sujet,nodeStudent,retour,nameElt);
@ -1181,6 +1187,27 @@ public class evaluationAttribut {
}
private static node evalnombreparagraphe(node sujet,node nodeStudent, node retour, String nameElt) {
if(sujet.getAttributs().get("evalnombreparagraphe")==null) return retour;
// schémat de l'attribut du node : evalnombreparagraphe=evalnombreparagraphe_nombre:point
String[] valueAttribut = sujet.getAttributs().get("evalnombreparagraphe").split(":");
valueAttribut[0] = valueAttribut[0].replace("evalnombreparagraphe_", "");
if(nodeStudent!=null) {
int nbrparagrapheStudent = nodeStudent.retourneEnfantsByName("text:p", new ArrayList<node>()).size();
nbrparagrapheStudent = nbrparagrapheStudent + nodeStudent.retourneEnfantsByName("text:h", new ArrayList<node>()).size();
retour = evaluationNombreParagraphe(retour, String.valueOf(nbrparagrapheStudent) , valueAttribut[0], valueAttribut[1], "Nombre de paragraphe");
}else {
retour = evaluationNombreParagraphe(retour, "null" , valueAttribut[0], valueAttribut[1], "Nombre de paragraphe");
}
return retour;
}
//***********************************************************************************
//***********************************************************************************
//** Les procédures suivantes sont les évaluations par comparaison avec le sujet **
@ -1661,6 +1688,31 @@ public class evaluationAttribut {
return retour;
}
/**
*
* @param retour
* @param reponseStudent
* @param reponseSujet
* @param point
* @param nameElt
* @return
*/
private static node evaluationNombreParagraphe(node retour, String reponseStudent, String reponseSujet, String point, String nameElt) {
node item = null;
if(reponseStudent!=null) {
//compare la même valeur "contenuParagraph" pour obtenir les points mais si un voisinage du contenu.
item = retourneNoteAvecResultatsAnalyse("Nbr paragraphe","", reponseStudent , reponseSujet + "" +point, nameElt );
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
item = new node("Nbr paragraphe", "Erreur : -"+ point, "" , "null", reponseSujet , 2, evaluation.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
}
/**
* Evaluation du dernier enfant.</br>

View File

@ -0,0 +1,90 @@
package fenetres;
import java.awt.Color;
import java.awt.Font;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import cXML.node;
public class CustomInputDialogSimplePointInputNombreSansCaseACocher {
public static void showCustominputDialog(node nod, String nameMethod, String explication, ImageIcon icon) {
Integer initialPoint = 0;
int nombre = 0;
String[] nameMethodNombrelePoint ;
// schémat de l'attribut du node : nameMethod=nameMethod_nombre:point
if (nod.getAttributs().get(nameMethod) != null) {
nameMethodNombrelePoint = nod.getAttributs().get(nameMethod).split(":");
if(nameMethodNombrelePoint[1]!=null) initialPoint = Integer.parseInt(nameMethodNombrelePoint[1]);
if(nameMethodNombrelePoint[0]!=null) {
nameMethodNombrelePoint[0] = nameMethodNombrelePoint[0].replace(nameMethod+"_", "");
nombre = Integer.parseInt(nameMethodNombrelePoint[0]);
}
}
JLabel lblTitre = new JLabel("<html><h2>"+nameMethod+"<h2></html>");
lblTitre.setForeground(new Color(50,50,200));
JLabel lblExpliaction = new JLabel(explication);
lblExpliaction.setFont(new Font("Tahoma", Font.BOLD, 12));
lblExpliaction.setForeground(Color.blue);
JTextField textFieldpoint = new JTextField(String.valueOf(initialPoint), 4);
textFieldpoint.setFont(new Font("Tahoma", Font.BOLD, 14));
textFieldpoint.setHorizontalAlignment(SwingConstants.LEFT);
JTextField textFieldNombre = new JTextField(String.valueOf(nombre), 4);
textFieldNombre.setFont(new Font("Tahoma", Font.BOLD, 14));
textFieldNombre.setHorizontalAlignment(SwingConstants.LEFT);
Object[] message = {
lblTitre,
lblExpliaction,
textFieldNombre,
"Quel est le nombre de points ?",
textFieldpoint
};
String[] options = {"Ajouter", "Supprimer"};
int optionSelected = JOptionPane.showOptionDialog(
null,
message,
"Ajouter ou supprimer la méthode " + nameMethod,
JOptionPane.DEFAULT_OPTION,
JOptionPane.INFORMATION_MESSAGE,
icon,
options,
options[0]);
if (optionSelected == 0) { // Bouton "Ajouter" sélectionné
try {
Integer inputValuePoint = Integer.parseInt(textFieldpoint.getText());
Integer inputValueNombre= Integer.parseInt(textFieldNombre.getText());
if(inputValuePoint<0) inputValuePoint=0;
if(inputValueNombre<0) inputValueNombre=0;
if(inputValueNombre>0) {
// schémat de l'attribut du node : nameMethod=nameMethod_nombre:point
nod.getAttributs().put(nameMethod, nameMethod+"_"+ String.valueOf(inputValueNombre) + ":" + String.valueOf(inputValuePoint));
}
else {
nod.getAttributs().remove(nameMethod);
}
} catch (NumberFormatException e) {
JOptionPane.showMessageDialog(null, "Veuillez saisir un entier valide.", "Erreur", JOptionPane.ERROR_MESSAGE);
}
} else if (optionSelected == 1) { // Bouton "Supprimer" sélectionné
nod.getAttributs().remove(nameMethod);
} else {
}
}
}

View File

@ -108,6 +108,7 @@ public class afficheText extends JEditorPane {
String imageEvalLegacyStyleParentPresent= "<img src="+afficheText.class.getResource("/resources/menulegacystyleparentpresentmini.png").toString()+">";
String imageEvalTabAlignGauche= "<img src="+afficheText.class.getResource("/resources/evaltabalgngauchemini.png").toString()+">";
String imageEvalTabStyleLeader= "<img src="+afficheText.class.getResource("/resources/evaltabstyleleadermini.png").toString()+">";
String imageEvalnombreparagraphe= "<img src="+afficheText.class.getResource("/resources/evalnombreparagraphemini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -303,6 +304,9 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("evalTABStyleLeaderDefault") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEvalTabStyleLeader+ "<b> " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalnombreparagraphe")) {
sb.append("<li class=\"p4\">"+imageEvalnombreparagraphe+ "<b> " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
}
}
sb.append("</ul>");

View File

@ -59,6 +59,7 @@ import action.actEvalLastChildTrue;
import action.actEvalNameNodeOui;
import action.actEvalNamePageOui;
import action.actEvalNameSequenceOui;
import action.actEvalNombreParagraphe;
import action.actEvalNumeroAbsoluePageOui;
import action.actEvalNumeroPageOui;
import action.actEvalPasParagrapheVideOui;
@ -99,6 +100,7 @@ import cXML.node;
import list.listeDesNodesAllContent;
import list.listeDesNodesAnalyseStyle;
import list.listeDesNodesAncrable;
import list.listeDesNodesContenantPargraphesOuTitres;
import list.listeDesNodesContenantSaut;
import list.listeDesNodesEvalPlacement;
import list.listeDesNodesFormatageDirect;
@ -133,32 +135,33 @@ public final class create extends JFrame {
private static JLabel lblInfo = new JLabel("Fichier d'analyse");
private final JLabel lblNewLabel_1 = new JLabel("Les méthodes d'évaluation");
private final JButton btnAttribut= new JButton(new actAttribut());
private final JButton btnAllContent = new JButton(new actAllContent());
private final JButton btnevalNameLegacyStyleTrue = new JButton(new actEvaluerNomDuStyleHeriteTrue());
private final JButton btnanalyseStyletrue = new JButton(new actEvaluerStyleTrue());
private final JButton btnevalSautPageColonnetrue = new JButton(new actEvalSautPageColonneOui());
private final JButton btnevalNameNodetrue = new JButton(new actEvalNameNodeOui());
private final JButton btnevalFormatageDirecttrue = new JButton(new actEvalFormatageDirect());
private final JButton btnevalPlacementtrue = new JButton(new actEvalPlacementParagrapheOui());
private final JButton btnevalFirstChildtrue = new JButton(new actEvalFirstChildTrue());
private final JButton btnevalLastChildtrue = new JButton(new actEvalLastChildTrue());
private final JButton btnevalAncrageNumeroAbsoluePagetrue = new JButton(new actEvalAncrageNumeroAbsoluePageOui());
private final JButton btnevalPasParagrapheVidetrue = new JButton(new actEvalPasParagrapheVideOui());
private final JButton btnevalNamePagetrue = new JButton(new actEvalNamePageOui());
private final JButton btnevalNumeroPagetrue = new JButton(new actEvalNumeroPageOui());
private final JButton btnevalNumeroAbsoluePagetrue = new JButton(new actEvalNumeroAbsoluePageOui());
private final JButton btnevalEnteteActivetrue = new JButton(new actEvalEnteteActive());
private final JButton btnevalEntetePasActivetrue = new JButton(new actEvalEntetePasActive());
private final JButton btnEvalPiedPageActivetrue = new JButton(new actEvalPiedPageActive());
private final JButton btnEvalPiedPagePasActivetrue = new JButton(new actEvalPiedPagePasActive());
private final JButton btnevalTABAlignementAGauchetrue = new JButton(new actEvalTabAlignementGaucheOui());
private final JButton btnevalTABStyleLeaderDefaulttrue = new JButton(new actEvalTabDefautStyleLeaderOui());
private final JButton btnEvaluerATraversAnalyseStyletrue = new JButton(new actEvaluerATraversAnalyseStyleTrue());
private final JButton btnevalNameInitialCreator = new JButton(new actEvalInitialCreator());
private final JButton btnevalNameCreator = new JButton(new actevalNameCreator());
private final JButton btnevalNameSequence = new JButton(new actEvalNameSequenceOui());
private final JButton btnevalTextUserDefined = new JButton(new actEvalTextUserDefinedOui());
private final static JButton btnAttribut= new JButton(new actAttribut());
private final static JButton btnAllContent = new JButton(new actAllContent());
private final static JButton btnevalNameLegacyStyleTrue = new JButton(new actEvaluerNomDuStyleHeriteTrue());
private final static JButton btnanalyseStyletrue = new JButton(new actEvaluerStyleTrue());
private final static JButton btnevalSautPageColonnetrue = new JButton(new actEvalSautPageColonneOui());
private final static JButton btnevalNameNodetrue = new JButton(new actEvalNameNodeOui());
private final static JButton btnevalFormatageDirecttrue = new JButton(new actEvalFormatageDirect());
private final static JButton btnevalPlacementtrue = new JButton(new actEvalPlacementParagrapheOui());
private final static JButton btnevalFirstChildtrue = new JButton(new actEvalFirstChildTrue());
private final static JButton btnevalLastChildtrue = new JButton(new actEvalLastChildTrue());
private final static JButton btnevalAncrageNumeroAbsoluePagetrue = new JButton(new actEvalAncrageNumeroAbsoluePageOui());
private final static JButton btnevalPasParagrapheVidetrue = new JButton(new actEvalPasParagrapheVideOui());
private final static JButton btnevalNamePagetrue = new JButton(new actEvalNamePageOui());
private final static JButton btnevalNumeroPagetrue = new JButton(new actEvalNumeroPageOui());
private final static JButton btnevalNumeroAbsoluePagetrue = new JButton(new actEvalNumeroAbsoluePageOui());
private final static JButton btnevalEnteteActivetrue = new JButton(new actEvalEnteteActive());
private final static JButton btnevalEntetePasActivetrue = new JButton(new actEvalEntetePasActive());
private final static JButton btnEvalPiedPageActivetrue = new JButton(new actEvalPiedPageActive());
private final static JButton btnEvalPiedPagePasActivetrue = new JButton(new actEvalPiedPagePasActive());
private final static JButton btnevalTABAlignementAGauchetrue = new JButton(new actEvalTabAlignementGaucheOui());
private final static JButton btnevalTABStyleLeaderDefaulttrue = new JButton(new actEvalTabDefautStyleLeaderOui());
private final static JButton btnEvaluerATraversAnalyseStyletrue = new JButton(new actEvaluerATraversAnalyseStyleTrue());
private final static JButton btnevalNameInitialCreator = new JButton(new actEvalInitialCreator());
private final static JButton btnevalNameCreator = new JButton(new actevalNameCreator());
private final static JButton btnevalNameSequence = new JButton(new actEvalNameSequenceOui());
private final static JButton btnevalTextUserDefined = new JButton(new actEvalTextUserDefinedOui());
private final static JButton btnevalnombreparagraphe= new JButton(new actEvalNombreParagraphe());
/**
@ -214,6 +217,10 @@ public final class create extends JFrame {
btnevalNameSequence.setEnabled(false);
btnevalTextUserDefined.setIcon(new ImageIcon(create.class.getResource("/resources/evaltextuserdefined.png")));
btnevalTextUserDefined.setEnabled(false);
btnevalnombreparagraphe.setIcon(new ImageIcon(create.class.getResource("/resources/evalnombreparagraphe.png")));
btnevalnombreparagraphe.setEnabled(false);
setBackground(new Color(255, 255, 255));
try {
@ -414,6 +421,10 @@ public final class create extends JFrame {
btnevalTextUserDefined.setText("");
panelDroiteBoutons.add(btnevalTextUserDefined, "cell 1 5");
btnevalnombreparagraphe.setText("");
panelDroiteBoutons.add(btnevalnombreparagraphe, "cell 2 5");
JSplitPane splitPane2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, rightScrollPane, ScrollPaneTableBouton );
splitPane2.setBounds(10, 10, 1364, 783);
splitPane2.setDividerLocation(0.4);
@ -527,6 +538,7 @@ public final class create extends JFrame {
btnevalNameCreator.setEnabled(false);
btnevalNameSequence.setEnabled(false);
btnevalTextUserDefined.setEnabled(false);
btnevalnombreparagraphe.setEnabled(false);
if(listeDesNodesAllContent.isAllContent(nod)) {
btnAllContent.setEnabled(true);
@ -597,6 +609,9 @@ public final class create extends JFrame {
if(nod.getNomElt().equals("text:user-defined")) {
btnevalTextUserDefined.setEnabled(true);
}
if(listeDesNodesContenantPargraphesOuTitres.isNodesContenantPargraphesOuTitres(nod)) {
btnevalnombreparagraphe.setEnabled(true);
}
}
}
});
@ -1008,14 +1023,39 @@ public final class create extends JFrame {
tree.setVisible(true);
fenetres.create.constructionTree();
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
// fenetres.create.getTglbtnTousLesNodes().setSelected(false);
fenetres.create.getButtonEvaluate().setEnabled(true);
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
// table.setModel(new myTableModel(commandes.sujet.retourneFirstEnfantsByName("structurepage")));
// table.setVisible(true);
btnevalNameLegacyStyleTrue.setEnabled(false);
btnanalyseStyletrue.setEnabled(false);
btnAllContent.setEnabled(false);
btnevalSautPageColonnetrue.setEnabled(false);
btnevalNameNodetrue.setEnabled(false);
btnevalFormatageDirecttrue.setEnabled(false);
btnevalPlacementtrue.setEnabled(false);
btnevalFirstChildtrue.setEnabled(false);
btnevalLastChildtrue.setEnabled(false);
btnevalAncrageNumeroAbsoluePagetrue.setEnabled(false);
btnevalPasParagrapheVidetrue.setEnabled(false);
btnevalNamePagetrue.setEnabled(false);
btnevalNumeroPagetrue.setEnabled(false);
btnevalNumeroAbsoluePagetrue.setEnabled(false);
btnevalEnteteActivetrue.setEnabled(false);
btnevalEntetePasActivetrue.setEnabled(false);
btnEvalPiedPageActivetrue.setEnabled(false);
btnEvalPiedPagePasActivetrue.setEnabled(false);
btnevalTABAlignementAGauchetrue.setEnabled(false);
btnevalTABStyleLeaderDefaulttrue.setEnabled(false);
btnEvaluerATraversAnalyseStyletrue.setEnabled(false);
btnevalNameInitialCreator.setEnabled(false);
btnevalNameCreator.setEnabled(false);
btnevalNameSequence.setEnabled(false);
btnevalTextUserDefined.setEnabled(false);
btnevalnombreparagraphe.setEnabled(false);
}else {
fenetres.create.getTextNodeSelect().setContentType("text/plain");
// table.setVisible(false);
}
}

View File

@ -64,6 +64,7 @@ public class listeAttributsAnalyseWriter {
case "evalLegacyStyleParentPresent": return true;
case "evalTABAlignementAGauche": return true;
case "evalTABStyleLeaderDefault": return true;
case "evalnombreparagraphe": return true;
case "analysis_filename": return true;
case "auteur": return true;

View File

@ -0,0 +1,45 @@
package list;
import cXML.node;
/**
* Liste des nodes contenant un node paragraphe ou titre.<br>
*
* @author pabr6
*
*/
public class listeDesNodesContenantPargraphesOuTitres {
/**
* Liste des nodes contenant un node paragraphe ou titre.<br>
* @param nod
* @return
*/
public static boolean isNodesContenantPargraphesOuTitres(node nod) {
String nameNode = nod.getNomElt();
switch (nameNode) {
case "page":{
return true;
}
case "style:footer":{
return true;
}
case "style:header":{
return true;
}
case "table:table-cell":{
return true;
}
case "draw:text-box":{
return true;
}
case "text:index-body":{
return true;
}
default:
return false;
}
}
}

View File

@ -1,10 +1,20 @@
package list;
import cXML.node;
/**
* Liste des nodes contenant un saut de page ou de colonne.<br>
*
* @author pabr6
*
*/
public class listeDesNodesContenantSaut {
/**
* Liste des nodes contenant un saut de page ou de colonne.<br>
* Les nodes doivent avoir comme parent le node structurepage.<br>
* @param nod
* @return
*/
public static boolean isNodesContenantSaut(node nod) {
String nameNode = nod.getNomElt();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B