package action; 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.baliseStyle; import fenetres.create; public class actEvalPasParagrapheVideOui extends AbstractAction{ { putValue( Action.NAME, "Oui, combien de point?" ); putValue( Action.SHORT_DESCRIPTION, "Evaluer l'absence de paragraphe vide" ); putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evalpasparagraphevidetruemini.png")) ); } /** * */ private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); int point = 0; if(nod.getAttributs().get("evalPasParagrapheVide")!=null) { point = Integer.valueOf(nod.getAttributs().get("evalPasParagrapheVide")); } String a =""; if(a!=null)a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); if(!a.isEmpty()||!a.isBlank()) { try { point = Integer.valueOf(a); if(point<=0) { nod.getAttributs().put("evalPasParagrapheVide", String.valueOf(0)); fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); fenetres.create.getTextNodeSelect().setText("