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 33 34
|
public void chargement(CListe listenonsuperviser, CListe listesuperviser)
{
int taillnsp=listenonsuperviser.size();
taille=((listenonsuperviser.size())+(listesuperviser.size()));
int nb=0;
for(int i=0; i<jTconf.getRowCount(); i++) // vidage du tableau
{ for(int j=0; j<4; j++)
jTconf.setValueAt("",i,j); }
for(int i=0;i<taillnsp;i++) // chargement de la liste des postes non superviser
{
int colonne=0;
pc =(CControle_agent_snmp)listenonsuperviser.get(i);
String nomposte = pc.getNom_poste();
jTconf.setValueAt(nomposte,i,colonne++);
String adressip = pc.getAdresse_ip();
jTconf.setValueAt(adressip,i,colonne++);
jTconf.setValueAt(new Integer(pc.getNum_port()),i,colonne++);
jTconf.setValueAt(new Integer(pc.getSupervision()),i,colonne++);
// je souhaiterai faire un jTconf.setValue(jButton,i,colonne++)
}
for(int a=taillnsp;a<taille;a++) //chargement sur le tableau de la liste des postes superviser
{
int col=0;
pc =(CControle_agent_snmp)listesuperviser.get(nb);
String nomposte = pc.getNom_poste();
jTconf.setValueAt(nomposte,a,col++);
String adressip = pc.getAdresse_ip();
jTconf.setValueAt(adressip,a,col++);
jTconf.setValueAt(new Integer(pc.getNum_port()),a,col++);
jTconf.setValueAt(new Integer(pc.getSupervision()),a,col++);
nb++;
}} |
Partager