コード例 #1
0
ファイル: CalendarWidget.java プロジェクト: esoco/gwt-cal
  public void fireDeleteEvent(Appointment appointment) {

    // fire the event to notify the client
    boolean allow = DeleteEvent.fire(this, appointment);

    if (allow) {
      appointmentManager.removeAppointment(appointment);
      refresh();
    }
  }
コード例 #2
0
ファイル: CalendarWidget.java プロジェクト: esoco/gwt-cal
  /**
   * Removes an appointment from the calendar.
   *
   * @param appointment the item to be removed.
   * @param fireEvents <code>true</code> to allow deletion events to be fired
   */
  public void removeAppointment(Appointment appointment, boolean fireEvents) {
    boolean commitChange = true;

    if (fireEvents) {
      commitChange = DeleteEvent.fire(this, getSelectedAppointment());
    }

    if (commitChange) {
      appointmentManager.removeAppointment(appointment);
      refresh();
    }
  }