我正在使用日历议程( JFXtras Agenda,http://jfxtras.org/),并尝试实现以下内容:当您将指定的对象(从TableView)拖动到日历时,它应该在您放置该对象的时间范围内创建一个新约会。然后,应将此新约会与拖动的对象相链接。
我现在得到的是一个更简单的变体,我用displayedCalendarProperty的时间值创建了一个新的约会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);正如您所看到的,这个类表示简单地扩展了AppointmentImpl。似乎做了一个新的演示,但日期完全错误(例如0001-03-05 10:12作为开始日期)。
有没有可能让这个新的演示文稿在它被删除的时间范围内开始?如果不是,我如何修复上面的代码,以便在给定的时间范围内而不是在0001年进行演示?
编辑:我认为这个日期是可能的最早日期。我想我没把预约日期定对吧?
发布于 2014-10-05 20:50:45
很抱歉有这么晚的反应;我没有监控堆栈溢出的问题。
如果你能给我发一个独立的小例子,那就太好了,这样我就可以看看发生了什么。
https://stackoverflow.com/questions/23582955
复制相似问题