1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| bouton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
StringBuilder texte = new StringBuilder(" ~~information de personne ~~");
texte.append( "\n" );
StringBuilder texte1 = new StringBuilder("~~activités de personne ~~");
texte1.append( "\n" );
for (UMLClass theClass : listUMLClass) {
if(theClass.name().equals("Personne")){
texte.append( theClass.name());
texte.append("(");
for (UMLAtribute atribute : theClass.getAtribute()) {
texte.append( atribute.name()+",");}
texte.append(")");
}
else{texte1.append( theClass.name());
texte1.append("(");
for (UMLAtribute atribute : theClass.getAtribute()) {
texte1.append( atribute.name()+",");}
texte1.append(")");
}
texte1.append("\n");
}
for( String temp : personne ) {
texte.append( "\n" );
texte.append( temp );
}
grandeZone1.setText(texte1.toString());
grandeZone.setText(texte.toString());
}
}); |
Partager