41 lines
1.2 KiB
Java
41 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 cXML.node;
|
|
import fenetres.create;
|
|
|
|
public class addTitreToutesLesPagesFalse extends AbstractAction{
|
|
{
|
|
putValue( Action.NAME, "Supprime tous les titres des pages" );
|
|
putValue( Action.SHORT_DESCRIPTION, "Supprime tous les titres des pages." );
|
|
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();
|
|
|
|
if(nod.getNomElt().equals("structurepage")) {
|
|
for(int i = 0 ; i< nod.getNodes().size();i++) {
|
|
nod.getNodes().get(i).getAttributs().remove("titre");
|
|
nod.getNodes().get(i).getAttributs().remove("titre2");
|
|
nod.getNodes().get(i).getAttributs().remove("titre3");
|
|
nod.getNodes().get(i).getAttributs().remove("titre1");
|
|
}
|
|
}
|
|
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
|
|
|
|
|
}
|
|
|
|
}
|