nodFreres = nod.retourneTousLesFreres();
+ for(int i = 0 ; i < nodFreres.size(); i++) {
+ if( listeDesNodesAllContent.isAllContent(nodFreres.get(i))){
+ nodFreres.get(i).supprimeAttribut("allContent"); }
+ }
+ }
+
private void Listener() {
@@ -194,12 +218,17 @@ public class allContent extends JFrame {
int point = Integer.parseInt(textFieldPoint.getText());
if(point<0) point =0;
- if(!chckbxPlaceMethodeChildren.isSelected()) {
+ if(!chckbxPlaceMethodeChildren.isSelected()&&!chckbxplaceLaMthodeBrother.isSelected()) {
nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem().toString() + String.valueOf(point));
nod.evaluerAllChildTrue();
- }else {
+ }
+ if(chckbxPlaceMethodeChildren.isSelected()) {
placeAtrtibutAllContentDansLesNodesChildren(nod,comboBoxValeur.getSelectedItem().toString(),point);
- }
+ }
+ if(chckbxplaceLaMthodeBrother.isSelected()) {
+ placeAtrtibutAllContentDansLesNodesFreres(nod,comboBoxValeur.getSelectedItem().toString(),point);
+ }
+
J.refreshAffichage(nod);
TreePath path = fenetres.create.getTree().getSelectionPath();
DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel();
@@ -217,11 +246,15 @@ public class allContent extends JFrame {
btnRemove.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- if(!chckbxPlaceMethodeChildren.isSelected()) {
+ if(!chckbxPlaceMethodeChildren.isSelected()&&!chckbxplaceLaMthodeBrother.isSelected()) {
nod.supprimeAttribut("allContent");
- }else {
+ }
+ if(chckbxPlaceMethodeChildren.isSelected()) {
supprimeAttributAllConetnetDansLesNodesChildren(nod);
- }
+ }
+ if(chckbxplaceLaMthodeBrother.isSelected()) {
+ supprimeAttributAllConetnetDansLesNodesFreres(nod);
+ }
J.refreshAffichage(nod);
TreePath path = fenetres.create.getTree().getSelectionPath();
DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel();
diff --git a/src/fenetres/create.java b/src/fenetres/create.java
index baf50d9..54ea849 100644
--- a/src/fenetres/create.java
+++ b/src/fenetres/create.java
@@ -3,10 +3,9 @@ package fenetres;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
+import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
@@ -31,6 +30,8 @@ import javax.swing.SwingConstants;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
+import javax.swing.plaf.SplitPaneUI;
+import javax.swing.plaf.basic.BasicSplitPaneUI;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreeNode;
@@ -125,7 +126,6 @@ public final class create extends JFrame {
private JToolBar toolBarPrincipal;
private JMenuBar menuBar = new JMenuBar();
private static JButton buttonEvaluate;
- private JPanel panelPrincipal;
private JPanel panelDroiteBoutons= new JPanel();
private static create instance;
public static boolean isDispose = true;
@@ -277,10 +277,12 @@ public final class create extends JFrame {
tree.setComponentPopupMenu(null);
this.createToolBar();
-
- panelPrincipal = new JPanel();
- getContentPane().add(panelPrincipal, BorderLayout.NORTH);
-
+ // Utiliser un BoxLayout pour la barre d'outils (pour plusieurs lignes et redimensionnement)
+
+// BoxLayout layout = new BoxLayout(toolBarPrincipal, BoxLayout.X_AXIS);
+ FlowLayout layout = new FlowLayout(FlowLayout.LEFT);
+ toolBarPrincipal.setLayout(layout);
+ getContentPane().add(toolBarPrincipal,BorderLayout.NORTH);
// The content of the window
if(commandes.fichierAnalyseValide) tree = commandes.tree;
@@ -311,20 +313,21 @@ public final class create extends JFrame {
textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15));
JScrollPane ScrollPaneTableBouton = new JScrollPane( );
+ panelDroiteBoutons.setBackground(Color.LIGHT_GRAY);
panelDroiteBoutons.setBorder(null);
panelDroiteBoutons.setLayout(new MigLayout("", "[40px:n,fill][40px:n,fill][40px:n,fill][40px:n,fill][40px:n,fill][40px:n,fill]", "[20px][40px][40px][60px][60px][60px][60px][60px][60px][60px][60px][60px][60px]"));
rightScrollPane.setViewportView(panelDroiteBoutons);
- ScrollPaneTableBouton = new JScrollPane(textNodeSelect);
+ ScrollPaneTableBouton.setViewportView(textNodeSelect);
+
lblNewLabel_1.setIcon(new ImageIcon(create.class.getResource("/resources/evaluermini.png")));
lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 14));
panelDroiteBoutons.add(lblNewLabel_1, "cell 0 0 6 1,aligny center,grow");
btnAttribut.setText("");
+
-
- // Ligne 2
btnAttribut.setHorizontalAlignment(SwingConstants.LEFT);
btnAttribut.setForeground(new Color(0, 128, 192));
panelDroiteBoutons.add(btnAttribut, "cell 0 1,grow");
@@ -412,8 +415,22 @@ public final class create extends JFrame {
JSplitPane splitPane2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, rightScrollPane, ScrollPaneTableBouton );
splitPane2.setBounds(10, 10, 1364, 783);
- splitPane2.setBounds(10, 10, 1364, 783);
splitPane2.setDividerLocation(0.4);
+ splitPane2.setOneTouchExpandable(true);
+ SplitPaneUI spui = splitPane2.getUI();
+ if (spui instanceof BasicSplitPaneUI) {
+ ((BasicSplitPaneUI) spui).getDivider().addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent arg0) {
+ if (arg0.getClickCount() == 2) {
+ Dimension size1 = rightScrollPane.getPreferredSize();
+ int dividerLocation = splitPane2.getOrientation() == JSplitPane.HORIZONTAL_SPLIT ?
+ size1.width : size1.height;
+ splitPane2.setDividerLocation(dividerLocation);
+ }
+ }
+ });
+ }
JSplitPane splitPane1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panelLeft, splitPane2 );
splitPane1.setBounds(10, 10, 1364, 783); //10, 10, 1364, 783
@@ -424,10 +441,6 @@ public final class create extends JFrame {
tree.setFont(new Font("Tahoma", Font.PLAIN, 16));
getContentPane().add(splitPane1, BorderLayout.CENTER);
- panelPrincipal.setLayout(new GridLayout(1, 1, 0, 0));
- panelPrincipal.add(toolBarPrincipal);
-
-
if(commandes.fichierAnalyseValide) {
tree.setVisible(true);
@@ -710,7 +723,7 @@ public final class create extends JFrame {
*/
private void createToolBar() {
toolBarPrincipal = new JToolBar();
- toolBarPrincipal.setFloatable(false);
+ toolBarPrincipal.setFloatable(true);
toolBarPrincipal.setRollover(true);
toolBarPrincipal.setName("outils principaux");
@@ -723,20 +736,11 @@ public final class create extends JFrame {
toolBarPrincipal.addSeparator();
JButton btnSaveEvaluation = toolBarPrincipal.add( new actSaveEvaluation() );
- btnSaveEvaluation.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- });
btnSaveEvaluation.setIcon(new ImageIcon(create.class.getResource("/resources/saveEvaluation.png")));
btnSaveEvaluation.setHideActionText(true);
toolBarPrincipal.add(btnSaveEvaluation);
JButton btnNewFichierAnalyse = toolBarPrincipal.add( new actNewFichierAnalyse() );
- btnNewFichierAnalyse.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- });
-
btnNewFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierODF.png")));
btnNewFichierAnalyse.setHideActionText(true);
@@ -947,7 +951,6 @@ public final class create extends JFrame {
commandes.tree = new JTree(root);
tree.setCellRenderer(new MyTreeCellRenderer());
-// tree.setCellRenderer(new MyCellRenderer());
tree.setModel(commandes.tree.getModel()) ;
diff --git a/src/list/descriptionNode.java b/src/list/descriptionNode.java
index c27764d..3c643ea 100644
--- a/src/list/descriptionNode.java
+++ b/src/list/descriptionNode.java
@@ -190,7 +190,8 @@ public class descriptionNode {
return descriptionNode;
}
case "text:soft-page-break": {
- descriptionNode = descriptionNode + "Saut de page généré par writer lorsqu'une page ne peut pas contenir le texte.
"
+ descriptionNode = descriptionNode + "
Saut de page généré automatiquement par writer lorsqu'une page ne peut pas contenir plus de texte.
"
+ + "Les paragraphes sont alors être scindés par un saut de page automatique (sauf spécification dans le format du paragraphe).
"
+ "documentation OASIS
";
return descriptionNode;
}