35 lines
881 B
Java
35 lines
881 B
Java
package fenetres.create_act;
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
import javax.swing.AbstractAction;
|
|
import javax.swing.Action;
|
|
import javax.swing.JOptionPane;
|
|
|
|
import nodeAC.nodeAC;
|
|
|
|
public class actTitrePrincipal extends AbstractAction{
|
|
|
|
/**
|
|
*
|
|
*/
|
|
private static final long serialVersionUID = 1L;
|
|
{
|
|
putValue( Action.NAME, "Titre principal" );
|
|
putValue( Action.SHORT_DESCRIPTION, "Titre principal" );
|
|
}
|
|
@Override
|
|
public void actionPerformed(ActionEvent e) {
|
|
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
|
String titre = "";
|
|
if(nod.getAttributs().get("titre")!=null) {
|
|
titre = nod.getAttributs().get("titre");
|
|
}
|
|
|
|
String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
|
|
nod.titre(a);
|
|
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
|
}
|
|
|
|
}
|