I'm working with the JFXtras Agenda (http://jfxtras.org/) and trying to implement the following:
when you drag a specified Object (from a TableView) to the Calendar, it should make a new Appointment on the timeframe where you drop it. This new Appointment should then be linked with the Object that was dragged.
What I've got now is a simpler variant where I make a new Appointment onDragDropped with the time values of the displayedCalendarProperty:
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))
.withDescription("A much longer test description")
As you can see the class Presentation simply extends AppointmentImpl. It seems that a new Presentation is made, but on a totally wrong date (e.g. 0001-03-05 10:12 as start date).
Is it possible to make this new Presentation starting on the timeframe where it's dropped? And if not, how could I fix the above code so that the Presentation is made in the given timeframe in stead of in the year 0001?
Edit: I figured this date is the earliest date possible. I guess I'm not setting the appointment's date right then?
Sorry for the late reaction; I was not monitoring stackoverflow for issues.
It would be great if you could email me a small stand alone example, so I can see what is going on.