2023-02-05 17:46:02 +01:00
|
|
|
package action;
|
2022-12-13 12:59:49 +01:00
|
|
|
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
|
|
|
|
import javax.swing.AbstractAction;
|
|
|
|
import javax.swing.Action;
|
|
|
|
import javax.swing.ImageIcon;
|
|
|
|
import javax.swing.tree.DefaultMutableTreeNode;
|
|
|
|
import javax.swing.tree.DefaultTreeModel;
|
|
|
|
import javax.swing.tree.TreePath;
|
|
|
|
|
|
|
|
import cXML.node;
|
|
|
|
import fenetres.create;
|
|
|
|
|
2023-02-05 21:09:09 +01:00
|
|
|
public class actEvaluerATraversAnalyseStyleTrue extends AbstractAction{
|
2022-12-13 12:59:49 +01:00
|
|
|
{
|
|
|
|
putValue( Action.NAME, "Evaluer le style dans la structure." );
|
|
|
|
putValue( Action.SHORT_DESCRIPTION, "Evaluer le style:name de ce node dans la struture du fichier de l'étudiant");
|
|
|
|
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
|
|
|
nod.getAttributs().put("EvaluerATraversAnalyseStyle", "true");
|
|
|
|
nod.changeLesCodesEvaluateursVersCodeATraversAnalyseStyle();
|
|
|
|
|
|
|
|
|
|
|
|
TreePath path = fenetres.create.getTree().getSelectionPath();
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|