JFXtras / jfxtras

A supporting library for JavaFX, containing helper classes, extended layouts, controls and other interesting widgets.
http://jfxtras.org
Other
599 stars 123 forks source link

ActionsCallback not called when setAllowDragging is false #48

Closed AlexRoig closed 8 years ago

AlexRoig commented 8 years ago

I want to create a calendar just to display some information, which shouldn't be modificable by the user. So I disabled the resize and the drag features. I find no way to trigger the ActionsCallback when double-clicking an event.

agenda.setAllowDragging(false);
agenda.setActionCallback((Agenda.Appointment myAppointment) -> {
    System.err.println("This is never shown");
    return null;
});
tbee commented 8 years ago

I do not quite understand the issue. The problem is that if the dragging is disabled, the action callback is not triggered. Correct?

AlexRoig commented 8 years ago

Yes. Provably it's expected behavior, but in my opinion, disabling the dragging, shouldn't exclude this event from being triggered. I couldn't find on the API any other way to trigger an action when clicking or double-clicking an appointment.

tbee commented 8 years ago

I agree. I'll look into it, probably tomorrow

tbee commented 8 years ago

This is not the cause; I have dragging disabled and can still double click to trigger the action callback.

tbee commented 8 years ago

I've added allow resize and dragging to Agenda's sample (in JFXtrasSamples see jfxtras.org) so you can check it for yourself.