public Component getListCellRendererComponent(List list, ArrayList<Attivita> value, int index, boolean isSelected) {
attivita.removeAll();
hour.setText(String.valueOf(index));
for (int i=0; i < value.size(); i++) {
final Attivita v = value.get(i);
if(v != null) {
if(v instanceof Chiamata) {
button = new Button("Ch");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Dialog.show("Alert", v.getDescrizione(), "Ok", null);
}
});
//button.setUIID("Label");
attivita.addComponent(button);
}
if(v instanceof Appuntamento) {
button = new Button("A");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Dialog.show("Alert", v.getDescrizione(), "Ok", null);
}
});
//button.setUIID("Label");
attivita.addComponent(button);
}
if(v instanceof Compito) {
button = new Button("Co");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Dialog.show("Alert", v.getDescrizione(), "Ok", null);
}
});
//button.setUIID("Label");
attivita.addComponent(button);
}
}
}
return this;
}