analyseWriter/src/fenetres/create_act/actsautmultiplefalse.java

40 lines
1.2 KiB
Java

package fenetres.create_act;
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.create;
public class actsautmultiplefalse extends AbstractAction{
{
putValue( Action.NAME, "false" );
putValue( Action.SHORT_DESCRIPTION, "false" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
boolean informations = false;
if(JOptionPane.showConfirmDialog(null,"Voulez-vous retirer les informations sur le node (nature du node)?", "Information", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
informations=true;
}
for(int i = 0 ; i < nod.getNodes().size();i++) {
nod.getNodes().get(i).getAttributs().put("saut", "false");
if(informations)nod.getNodes().get(i).getAttributs().remove("information");
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}