我正在使用 JFXtras 议程(http://jfxtras.org/)并尝试实现以下内容:当您将指定的对象(从 TableView)拖到日历时,它应该在时间范围内进行新的约会你放下它。然后,这个新约会应该与被拖动的对象链接。
我现在得到的是一个更简单的变体,其中我使用显示的CalendarProperty 的时间值创建了一个新的约会 onDragDropped:
AppointmentImpl presentation = new Presentation(customObjectFromTableView)
.withStartTime(new GregorianCalendar(lAgenda.getDisplayedCalendar().YEAR, lAgenda.getDisplayedCalendar().MONTH, lAgenda.getDisplayedCalendar().DATE, lAgenda.getDisplayedCalendar().HOUR, lAgenda.getDisplayedCalendar().MINUTE))
.withEndTime(new GregorianCalendar(lAgenda.getDisplayedCalendar().YEAR, lAgenda.getDisplayedCalendar().MONTH, lAgenda.getDisplayedCalendar().DATE, lAgenda.getDisplayedCalendar().HOUR+1, lAgenda.getDisplayedCalendar().MINUTE))
.withSummary("Summary")
.withDescription("A much longer test description")
.withAppointmentGroup(new Agenda.AppointmentGroupImpl());
lAgenda.appointments().add(presentation);
如您所见,Presentation 类只是扩展了 AppointmentImpl。似乎制作了一个新的演示文稿,但日期完全错误(例如,0001-03-05 10:12 作为开始日期)。
是否可以在它被删除的时间范围内开始制作这个新的演示文稿?如果没有,我该如何修复上面的代码,以便在给定的时间范围内而不是在 0001 年进行演示?
编辑:我认为这个日期是最早的日期。我想我当时没有设置约会的日期?