0

如何添加操作侦听器,以便在单击议程上的约会时打开一个新窗口,其中包含有关该特定单击约会的更多详细信息。

4

2 回答 2

1
lAgenda.selectedAppointments().addListener(new ListChangeListener< Appointment >() {
     public void onChanged(Change<? extends Appointment> c) {
         while (c.next()) {
             if (c.wasPermutated()) {
                 for (int i = c.getFrom(); i < c.getTo(); ++i) {
                      //permutate
                 }
             } else if (c.wasUpdated()) {
                      //update item
             } else {
                 for (Appointment a : c.getRemoved()) {
                 }
                 for (Appointment a : c.getAddedSubList()) {
                     printAppointment(a);
                 }
             }
         }
     }
 });

然后打印约会:

private void printAppointment(Appointment a) {
    System.out.println(a.getSummary());
    System.out.println(a.getDescription());
}
于 2014-06-07T08:48:54.837 回答
1

似乎议程没有 api。您可以看到议程的来源:AbstractAppointmentPane具有鼠标事件逻辑。

于 2014-03-27T08:58:05.987 回答