2023-02-05 17:46:02 +01:00
|
|
|
package action;
|
2022-06-19 21:01:30 +02:00
|
|
|
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
|
|
|
|
import javax.swing.AbstractAction;
|
|
|
|
import javax.swing.Action;
|
|
|
|
import javax.swing.ImageIcon;
|
|
|
|
|
|
|
|
import cXML.node;
|
|
|
|
import fenetres.create;
|
|
|
|
|
|
|
|
public class actEvaluerTousEnfantsFalse extends AbstractAction{
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
{
|
|
|
|
putValue( Action.NAME, "Evaluer toute la branche" );
|
|
|
|
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsmini.png")) );
|
|
|
|
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")) );
|
|
|
|
putValue( Action.SHORT_DESCRIPTION, "Evaluer toute la branche de la racine à la feuille." );
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
|
|
|
if(!nod.getNomElt().equals("fichier")) {
|
|
|
|
nod.evaluerAllChildFalse();
|
|
|
|
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|