You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the MonthView will full day event, fake helper entries are create to occupy space.
These entries will display with a time in the view:
See the 12:00 entries in the above image
These space entries are clickable and if done so, will cause an NPE because they don't belong to a calendar:
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "com.calendarfx.model.Calendar.readOnlyProperty()" because the return value of "com.calendarfx.model.Entry.getCalendar()" is null
at com.calendarfx.view.popover.EntryDetailsView.(EntryDetailsView.java:102)
at com.calendarfx.view.popover.EntryPopOverContentPane.(EntryPopOverContentPane.java:60)
However this issue can easily be resolved by setting them also to fullday:
So add the setFullDay line MonthViewSkin:update
/*
* Do not use factory for this. SPACE is important to guarantee that the blank
* entries have the same height as the regular entries.
*/
MonthEntryView label = new MonthEntryView(new Entry<>(SPACE));
label.setVisible(false);
label.getEntry().setFullDay(true);
label.getProperties().put("control", getSkinnable());
fullDayNodes[i] = label;
Now the space item correctly shows as white space without a time, and is not clickable and does not cause NPEs.
The text was updated successfully, but these errors were encountered:
baumeister
changed the title
Space in MonthView skin is shown with a time
Space in MonthView skin is shown with a time and causes NPEs
Oct 9, 2023
baumeister
changed the title
Space in MonthView skin is shown with a time and causes NPEs
Space in MonthViewSkin is shown with a time and causes NPEs
Oct 9, 2023
When using the MonthView will full day event, fake helper entries are create to occupy space.
These entries will display with a time in the view:
See the 12:00 entries in the above image
These space entries are clickable and if done so, will cause an NPE because they don't belong to a calendar:
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "com.calendarfx.model.Calendar.readOnlyProperty()" because the return value of "com.calendarfx.model.Entry.getCalendar()" is null
at com.calendarfx.view.popover.EntryDetailsView.(EntryDetailsView.java:102)
at com.calendarfx.view.popover.EntryPopOverContentPane.(EntryPopOverContentPane.java:60)
However this issue can easily be resolved by setting them also to fullday:
So add the setFullDay line MonthViewSkin:update
Now the space item correctly shows as white space without a time, and is not clickable and does not cause NPEs.
The text was updated successfully, but these errors were encountered: