MAJ V4.4.2
Ajoute le menu au node structurepage qui permet d'évaluer les contenus textuels de tous les nodes textuels dans les pages du document. Ajoute le menu au node structure qui permet d'évaluer les noms des styles parents de tous les nodes contenu dans les pages.
This commit is contained in:
parent
b5e990484b
commit
7b523425d7
Binary file not shown.
Binary file not shown.
2
bin/.gitignore
vendored
2
bin/.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
/MEPTL/
|
||||
/fenetres/
|
||||
/list/
|
||||
/resources/
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
icons/menuEvalTousParagraphe.png
Normal file
BIN
icons/menuEvalTousParagraphe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
150
icons/menuEvalTousParagraphe.svg
Normal file
150
icons/menuEvalTousParagraphe.svg
Normal file
@ -0,0 +1,150 @@
|
||||
<?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.2.1 (9c6d41e410, 2022-07-14)"
|
||||
sodipodi:docname="menuEvalTousParagraphe.svg"
|
||||
inkscape:export-filename="menuEvalTousParagraphemini.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="11.675119"
|
||||
inkscape:cx="31.734152"
|
||||
inkscape:cy="20.428057"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g542" />
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
id="g350"
|
||||
transform="translate(-0.04532431,0.11331077)">
|
||||
<g
|
||||
id="g542"
|
||||
transform="translate(-0.31727014,0.47590521)">
|
||||
<g
|
||||
id="g602"
|
||||
transform="translate(3.5352959,-0.92914823)">
|
||||
<rect
|
||||
style="fill:#f2f2f2;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
|
||||
id="rect586"
|
||||
width="7.0821118"
|
||||
height="10.702716"
|
||||
x="0.61310935"
|
||||
y="0.51447743" />
|
||||
<g
|
||||
id="g600"
|
||||
transform="translate(-0.02266215,-0.06798646)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="3.4024146"
|
||||
id="text590"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan588"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="3.4024146">¶</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="6.8697238"
|
||||
id="text594"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan592"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="6.8697238">¶</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="10.337033"
|
||||
id="text598"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan596"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="10.337033">¶</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g584"
|
||||
transform="translate(0.43058091,-0.02266215)">
|
||||
<rect
|
||||
style="fill:#f2f2f2;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
|
||||
id="rect263"
|
||||
width="7.0821118"
|
||||
height="10.702716"
|
||||
x="0.61310935"
|
||||
y="0.51447743" />
|
||||
<g
|
||||
id="g574"
|
||||
transform="translate(-0.02266215,-0.06798646)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="3.4024146"
|
||||
id="text483"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan481"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="3.4024146">¶</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="6.8697238"
|
||||
id="text562"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan560"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="6.8697238">¶</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="10.337033"
|
||||
id="text566"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan564"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
|
||||
x="5.4385843"
|
||||
y="10.337033">¶</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.4 KiB |
BIN
icons/menuEvalTousParagraphemini.png
Normal file
BIN
icons/menuEvalTousParagraphemini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 685 B |
@ -45,7 +45,7 @@ public class allContent extends JFrame {
|
||||
* Evaluation de tous les contenu d'un node.
|
||||
* @param nod : Le node à évaluer.
|
||||
* @param J : Affichage du texte
|
||||
* @param Childs : Si TRUE alors évaluation de tous les contenu des nodes enfants.
|
||||
* @param Childs : Si TRUE alors évaluation de tous les contenus des nodes enfants.
|
||||
*/
|
||||
public allContent(node nod, afficheText J,boolean Childs) {
|
||||
this.nod=nod;
|
||||
@ -160,15 +160,21 @@ public class allContent extends JFrame {
|
||||
int point = Integer.valueOf(textFieldPoint.getText());
|
||||
if(point<0) point =0;
|
||||
if(!Childs) {
|
||||
nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point));
|
||||
nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem().toString() + String.valueOf(point));
|
||||
nod.evaluerAllChildTrue();
|
||||
J.refreshAffichage(nod);
|
||||
}else {
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){
|
||||
nod.getNodes().get(i).getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point));
|
||||
nod.getNodes().get(i).evaluerAllChildTrue(); }
|
||||
if(nod.getNomElt().equals("page")) {
|
||||
placeAtrtibutAllContentDansLesNodesDeLaPage(nod,comboBoxValeur.getSelectedItem().toString(),point);
|
||||
}
|
||||
if(nod.getNomElt().equals("structurepage")) {
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
if(nod.getNodes().get(i).getNomElt().equals("page")) {
|
||||
placeAtrtibutAllContentDansLesNodesDeLaPage(nod.getNodes().get(i),comboBoxValeur.getSelectedItem().toString(),point);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
J.refreshAffichage(nod);
|
||||
}
|
||||
|
||||
@ -193,10 +199,18 @@ public class allContent extends JFrame {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
private void placeAtrtibutAllContentDansLesNodesDeLaPage(node nodePage,String methode, Integer point) {
|
||||
for(int i = 0 ; i < nodePage.getNodes().size(); i++) {
|
||||
if( listeDesNodesAllContent.isAllContent(nodePage.getNodes().get(i))){
|
||||
nodePage.getNodes().get(i).getAttributs().put("allContent", methode+String.valueOf(point));
|
||||
nodePage.getNodes().get(i).evaluerAllChildTrue(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -112,6 +112,22 @@ public class createPopupMenu extends JPopupMenu {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* menu pour le node structure pour evaluer tous les nodes text:p (paragraphe).
|
||||
* @return
|
||||
*/
|
||||
private JMenu mnEvalTousParagraphes() {
|
||||
JMenu mnEvalTousParagraphes = new JMenu("Tous les paragraphes de texte");
|
||||
mnEvalTousParagraphes.setIcon( new ImageIcon(create.class.getResource("/resources/menuEvalTousParagraphemini.png")));
|
||||
mnEvalTousParagraphes.add(new actAllContentChilds());
|
||||
mnEvalTousParagraphes.addSeparator();
|
||||
mnEvalTousParagraphes.add(mnEvalNameLegacyStyleTousLesNodes());
|
||||
return mnEvalTousParagraphes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Menu permettant ajouter des titre1 à toutes les pages.</br>
|
||||
* @return
|
||||
@ -698,7 +714,7 @@ public class createPopupMenu extends JPopupMenu {
|
||||
* @return
|
||||
*/
|
||||
private JMenu mnEvalNameLegacyStyleTousLesNodes() {
|
||||
JMenu mnevalNameLegacyStyle = new JMenu("Evaluer les noms de tous des styles hérités, de tous les nodes");
|
||||
JMenu mnevalNameLegacyStyle = new JMenu("Evaluer les noms de tous les styles Parents");
|
||||
mnevalNameLegacyStyle.setIcon( new ImageIcon(create.class.getResource("/resources/heritagestyletouslesnodesmini.png")));
|
||||
mnevalNameLegacyStyle.add(new actEvaluerNomDuStyleHeriteTousLesNodesTrue());
|
||||
mnevalNameLegacyStyle.add( new actEvaluerNomDuStyleHeriteTousLesNodesFalse());
|
||||
@ -740,7 +756,7 @@ public class createPopupMenu extends JPopupMenu {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Menu permettant d'évaluer les nodes.<br>
|
||||
* @param nod
|
||||
* @return
|
||||
*/
|
||||
@ -750,7 +766,7 @@ public class createPopupMenu extends JPopupMenu {
|
||||
//Imag pour evaluer le node
|
||||
mnGroupeMethodeEvaluer.setIcon( new ImageIcon(create.class.getResource("/resources/evaluatemini.png")));
|
||||
|
||||
|
||||
// Pour le node structure
|
||||
if(nod.getNomElt().equals("structurepage")) {
|
||||
mnGroupeMethodeEvaluer.addSeparator();
|
||||
mnGroupeMethodeEvaluer.add(mnEvalNombreDePageMaxi());
|
||||
@ -884,6 +900,8 @@ public class createPopupMenu extends JPopupMenu {
|
||||
mnGroupeMethodeEvaluerMultiple.add(mnEvalNumeroPage());
|
||||
mnGroupeMethodeEvaluerMultiple.addSeparator();
|
||||
mnGroupeMethodeEvaluerMultiple.add(mnEvalNumeroAbsoluePage());
|
||||
mnGroupeMethodeEvaluerMultiple.addSeparator();
|
||||
mnGroupeMethodeEvaluerMultiple.add(mnEvalTousParagraphes());
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,12 +24,25 @@ public class actEvaluerNomDuStyleHeriteTousLesNodesFalse extends AbstractAction{
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
for(int i = 0 ; i < nod.getNodes().size();i++) {
|
||||
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) {
|
||||
nod.getNodes().get(i).supprimeAttribut("evalNameLegacyStyle");
|
||||
if(nod.getNomElt().equals("page")) {
|
||||
supprimeAttribut(nod);
|
||||
}
|
||||
if(nod.getNomElt().equals("structurepage")) {
|
||||
for(int i = 0 ; i < nod.getNodes().size();i++) {
|
||||
if(nod.getNodes().get(i).getNomElt().equals("page")) {
|
||||
supprimeAttribut(nod.getNodes().get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
private void supprimeAttribut(node nodePage) {
|
||||
for(int i = 0 ; i < nodePage.getNodes().size();i++) {
|
||||
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nodePage.getNodes().get(i))) {
|
||||
nodePage.getNodes().get(i).supprimeAttribut("evalNameLegacyStyle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,14 +39,17 @@ public class actEvaluerNomDuStyleHeriteTousLesNodesTrue extends AbstractAction{
|
||||
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>evalNameLegacyStyle=0.</h2>");
|
||||
}else {
|
||||
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) {
|
||||
nod.getNodes().get(i).getAttributs().put("evalNameLegacyStyle", String.valueOf(point));
|
||||
String pointString = String.valueOf(point);
|
||||
if(nod.getNomElt().equals("page")) {
|
||||
ajouteAttribut(nod,pointString);
|
||||
}
|
||||
if(nod.getNomElt().equals("structurepage")) {
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
if(nod.getNodes().get(i).getNomElt().equals("page")) {
|
||||
ajouteAttribut(nod.getNodes().get(i),pointString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
|
||||
@ -56,5 +59,12 @@ public class actEvaluerNomDuStyleHeriteTousLesNodesTrue extends AbstractAction{
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
|
||||
private void ajouteAttribut(node nodePage, String pointString) {
|
||||
for(int i = 0 ; i < nodePage.getNodes().size(); i++) {
|
||||
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nodePage.getNodes().get(i))) {
|
||||
nodePage.getNodes().get(i).getAttributs().put("evalNameLegacyStyle", pointString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public class listeDesNodesAllContent {
|
||||
case "style:paragraph-properties":return false;
|
||||
case "style:style":return false;
|
||||
case "style:default-style\"":return false;
|
||||
case "saut:automatique":return false;
|
||||
|
||||
default: return true;
|
||||
}
|
||||
|
BIN
src/resources/menuEvalTousParagraphe.png
Normal file
BIN
src/resources/menuEvalTousParagraphe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
src/resources/menuEvalTousParagraphemini.png
Normal file
BIN
src/resources/menuEvalTousParagraphemini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 685 B |
Loading…
Reference in New Issue
Block a user