MAJ V4.5.0
evalTAB_StyleLeaderDefault et evalTAB_AlignementAGauche peuvent être évaluer au travers analyseStyle.
This commit is contained in:
parent
a957834bd2
commit
6dd0eac97e
@ -6,6 +6,7 @@ import javax.swing.JMenu;
|
||||
import action.actAllContent;
|
||||
import action.actEvalInitialCreator;
|
||||
import action.actEvalTabAlignementGauche;
|
||||
import action.actEvalTabDefautStyleLeader;
|
||||
import action.actevalNameCreator;
|
||||
import cXML.node;
|
||||
import fenetres.create;
|
||||
@ -169,8 +170,14 @@ public class MnGroupeMethodeEvaluer {
|
||||
|
||||
|
||||
if(listeDesNodesTabStop.isStyleTab(nod)) {
|
||||
mnGroupeMethodeEvaluer.addSeparator();
|
||||
mnGroupeMethodeEvaluer.add(new actEvalTabAlignementGauche());
|
||||
if(nod.getAttributs().get("style:type")==null) {
|
||||
mnGroupeMethodeEvaluer.addSeparator();
|
||||
mnGroupeMethodeEvaluer.add(new actEvalTabAlignementGauche());
|
||||
}
|
||||
if(nod.getAttributs().get("style:leader-text")==null) {
|
||||
mnGroupeMethodeEvaluer.addSeparator();
|
||||
mnGroupeMethodeEvaluer.add(new actEvalTabDefautStyleLeader());
|
||||
}
|
||||
}
|
||||
|
||||
return mnGroupeMethodeEvaluer;
|
||||
|
File diff suppressed because one or more lines are too long
1
bin/.gitignore
vendored
1
bin/.gitignore
vendored
@ -175,3 +175,4 @@
|
||||
/zipstudent.png
|
||||
/zipstudent.svg
|
||||
/zipstudentmini.png
|
||||
/resources/
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
icons/evaltabstyleleader.png
Normal file
BIN
icons/evaltabstyleleader.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 942 B |
93
icons/evaltabstyleleader.svg
Normal file
93
icons/evaltabstyleleader.svg
Normal file
@ -0,0 +1,93 @@
|
||||
<?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="evaltabstyleleader.svg"
|
||||
inkscape:export-filename="evaltabstyleleadermini.png"
|
||||
inkscape:export-xdpi="51.200001"
|
||||
inkscape:export-ydpi="51.200001"
|
||||
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="14.50748"
|
||||
inkscape:cx="21.299357"
|
||||
inkscape:cy="19.920758"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="true">
|
||||
<sodipodi:guide
|
||||
position="6.4379146,5.4683354"
|
||||
orientation="1,0"
|
||||
id="guide1"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="6.4561523,5.4500977"
|
||||
orientation="0,-1"
|
||||
id="guide2"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="6.3301255,9.5171088"
|
||||
orientation="0,-1"
|
||||
id="guide4"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
id="g4"
|
||||
transform="matrix(1.0719416,0,0,1.0719416,0.00853295,-0.68407101)">
|
||||
<rect
|
||||
style="fill:#000080;fill-opacity:1;stroke:none;stroke-width:1.21714;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
|
||||
id="rect3"
|
||||
width="7.6051288"
|
||||
height="1.5137306"
|
||||
x="0.40259403"
|
||||
y="5.6719303"
|
||||
ry="0" />
|
||||
<path
|
||||
style="fill:#000080;fill-opacity:1;stroke:none;stroke-width:0.899999;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
|
||||
d="M 9.5761665,6.5655785 6.3301255,2.3891412 v 7.6051284 z"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:#000080;fill-opacity:1;stroke:none;stroke-width:0.899999;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
|
||||
d="M 10.688667,6.5655785 7.4426263,2.3891412 v 7.6051284 z"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
id="path4"
|
||||
style="fill:#000080;fill-opacity:1;stroke:none;stroke-width:0.899999;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
|
||||
d="M 5.3271367,2.3891412 V 9.9943618 L 6.4397301,8.8192397 V 3.8205784 Z" />
|
||||
<path
|
||||
id="path2"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.899999;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
|
||||
d="m 7.4426263,3.8205125 v 4.9986613 l 2.13372,-2.2536093 z" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
BIN
icons/evaltabstyleleadermini.png
Normal file
BIN
icons/evaltabstyleleadermini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 584 B |
@ -51,7 +51,7 @@ public class actEvalTabAlignementGauche extends AbstractAction{
|
||||
}
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null,"Il y a un autre alignement dans ce node.");
|
||||
JOptionPane.showMessageDialog(null,"Il y a un autre alignement dans cette tabulation.");
|
||||
}
|
||||
|
||||
|
||||
|
60
src/action/actEvalTabDefautStyleLeader.java
Normal file
60
src/action/actEvalTabDefautStyleLeader.java
Normal file
@ -0,0 +1,60 @@
|
||||
package action;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import cXML.node;
|
||||
import fenetres.baliseStyle;
|
||||
import fenetres.create;
|
||||
|
||||
public class actEvalTabDefautStyleLeader extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer le style par défaut des caractères de remplissage" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer le style par défaut des caractères de remplissage" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaltabstyleleadermini.png")) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalTAB_StyleLeaderDefault")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalTAB_StyleLeaderDefault"));
|
||||
}
|
||||
|
||||
|
||||
if(nod.getAttributs().get("style:leader-text")==null) {
|
||||
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("evalTAB_StyleLeaderDefault", String.valueOf(0));
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
|
||||
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalTAB_StyleLeaderDefault=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalTAB_StyleLeaderDefault", String.valueOf(point));
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
|
||||
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
|
||||
}
|
||||
}
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null,"Il y a un autre remplissage de caractère dans cette tabulation.");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -70,6 +70,12 @@ public class evaluationAttribut {
|
||||
case "evalLegacyStyleParentPresent":{
|
||||
retour = evaluationAttribut.evalPresenceStyleParent(nodeStyleParagraphSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
case "evalTAB_AlignementAGauche": {
|
||||
retour = evaluationAttribut.evalTabAlignGauche(nodeStyleParagraphSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
case "evalTAB_StyleLeaderDefault":{
|
||||
retour = evaluationAttribut.evalTabStyleLeaderDefault(nodeStyleParagraphSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -142,10 +148,14 @@ public class evaluationAttribut {
|
||||
case "evalLegacyStyleParentPresent":{
|
||||
retour = evaluationAttribut.evalPresenceStyleParent(propertiesSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
case "evalTAB_AlignementAGauche": {
|
||||
retour = evaluationAttribut.evalTabAlignGauche(propertiesSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
case "evalTAB_StyleLeaderDefault":{
|
||||
retour = evaluationAttribut.evalTabStyleLeaderDefault(propertiesSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -177,12 +187,15 @@ public class evaluationAttribut {
|
||||
case "evalLegacyStyleParentPresent":{
|
||||
retour = evaluationAttribut.evalPresenceStyleParent(propertiesSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
case "evalTAB_AlignementAGauche": {
|
||||
retour = evaluationAttribut.evalTabAlignGauche(propertiesSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
case "evalTAB_StyleLeaderDefault":{
|
||||
retour = evaluationAttribut.evalTabStyleLeaderDefault(propertiesSujet, nodeStyleParagraphStudent, retour, nameElt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -432,6 +445,13 @@ public class evaluationAttribut {
|
||||
retour = evalTabAlignGauche(sujet,nodeStudent,retour,nameElt);
|
||||
}
|
||||
|
||||
//evaluation de le remplissage des caractères par défaut d'une tabulation.
|
||||
if(k.equals("evalTAB_StyleLeaderDefault") && sujet.getNomElt().equals("style:tab-stop")) {
|
||||
retour = evalTabStyleLeaderDefault(sujet,nodeStudent,retour,nameElt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//evaluation de la présence ou de l'absence d'un style Parent
|
||||
//uniquement si ce n'est pas au travers d'analyseStyle
|
||||
if(k.equals("evalLegacyStyleParentPresent") && sujet.getNomElt().equals("style:style")) {
|
||||
@ -915,6 +935,33 @@ public class evaluationAttribut {
|
||||
return retour;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sujet
|
||||
* @param nodeStudent
|
||||
* @param retour
|
||||
* @param nameElt
|
||||
* @return
|
||||
*/
|
||||
private static node evalTabStyleLeaderDefault(node sujet,node nodeStudent, node retour, String nameElt) {
|
||||
String reponseSujet = "Remplissage vide";
|
||||
String reponseStudent = "Null";
|
||||
if(nodeStudent!=null) {
|
||||
if(nodeStudent.getAttributs().get("style:leader-text")==null) {
|
||||
reponseStudent = "Remplissage vide";
|
||||
}else {
|
||||
reponseStudent = nodeStudent.getAttributs().get("style:type");
|
||||
}
|
||||
|
||||
retour = evaluationTabStyleLeaderDefault(retour,reponseStudent,reponseSujet , sujet.getAttributs().get("evalTAB_StyleLeaderDefault"),"Tab remplissage vide");
|
||||
}else {
|
||||
retour = evaluationTabStyleLeaderDefault(retour,null, reponseSujet, sujet.getAttributs().get("evalTAB_StyleLeaderDefault"),"Tab remplissage vide");
|
||||
}
|
||||
|
||||
|
||||
return retour;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sujet
|
||||
@ -1271,6 +1318,26 @@ public class evaluationAttribut {
|
||||
return retour;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param retour
|
||||
* @param AttributStudent
|
||||
* @param AttributSujet
|
||||
* @param point
|
||||
* @param nameElt
|
||||
* @return
|
||||
*/
|
||||
private static node evaluationTabStyleLeaderDefault(node retour, String AttributStudent, String AttributSujet, String point, String nameElt) {
|
||||
node item = null;
|
||||
if(AttributStudent!=null) {
|
||||
item = retourneNoteAvecResultatsAnalyse(AttributSujet,"Remplissage vide", AttributStudent,AttributSujet + "‽" +point, nameElt );
|
||||
}else {
|
||||
evaluation.IncrementPointTotal(Integer.valueOf(point));
|
||||
item = new node(AttributSujet, "Erreur", "Remplissage vide" , "null", AttributSujet, 2, evaluation.getPointEnJeu(),nameElt);
|
||||
}
|
||||
retour.getNodes().add(item);
|
||||
return retour;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluation le champ auteur (éditeur).
|
||||
|
@ -82,6 +82,7 @@ public class afficheText extends JEditorPane {
|
||||
String imageEvalNombreDePageMini= "<img src="+afficheText.class.getResource("/resources/evalnombredepageminimini.png").toString()+">";
|
||||
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()+">";
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@ -274,6 +275,9 @@ public class afficheText extends JEditorPane {
|
||||
if(Lesattributsdunode.get(i).equals("evalTAB_AlignementAGauche") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalTabAlignGauche+ "<b> " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalTAB_StyleLeaderDefault") && !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>");
|
||||
}
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
|
@ -1,5 +1,10 @@
|
||||
package list;
|
||||
|
||||
/**
|
||||
* Méthode d'analyseWriter qui peuvent être évaluées dans les styles.
|
||||
* @author pabr6
|
||||
*
|
||||
*/
|
||||
public class listMethodeEvaluationAnalyseWriter {
|
||||
|
||||
public static boolean isMethodeEvaluationAnalyseWriterAvecPoint(String attribut) {
|
||||
@ -8,7 +13,9 @@ public class listMethodeEvaluationAnalyseWriter {
|
||||
switch (attribut) {
|
||||
case "evalNameNode": return true;
|
||||
case "evalLegacyStyleParentPresent": return true;
|
||||
|
||||
case "evalTAB_AlignementAGauche": return true;
|
||||
case "evalTAB_StyleLeaderDefault":return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
@ -63,6 +63,7 @@ public class listeAttributsAnalyseWriter {
|
||||
case "evalNombreDePageMini": return true;
|
||||
case "evalLegacyStyleParentPresent": return true;
|
||||
case "evalTAB_AlignementAGauche": return true;
|
||||
case "evalTAB_StyleLeaderDefault": return true;
|
||||
|
||||
case "analysis_filename": return true;
|
||||
case "auteur": return true;
|
||||
|
BIN
src/resources/evaltabstyleleader.png
Normal file
BIN
src/resources/evaltabstyleleader.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 942 B |
BIN
src/resources/evaltabstyleleadermini.png
Normal file
BIN
src/resources/evaltabstyleleadermini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 584 B |
Loading…
Reference in New Issue
Block a user