Skip to content

Commit

Permalink
Support for hidden entries / entry views. Fixes to context menus and …
Browse files Browse the repository at this point in the history
…popovers.
  • Loading branch information
dlemmermann committed Sep 28, 2022
1 parent 2b2974c commit f85e1e2
Show file tree
Hide file tree
Showing 30 changed files with 736 additions and 679 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void run() {
updateTimeThread.start();

Scene scene = new Scene(stackPane);
scene.focusOwnerProperty().addListener(it -> System.out.println("focus owner: " + scene.getFocusOwner()));
CSSFX.start(scene);

primaryStage.setTitle("Calendar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.calendarfx.model.Entry;
import com.google.api.services.calendar.model.Event;
import com.google.api.services.calendar.model.EventAttendee;
import impl.com.calendarfx.view.util.Util;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.property.BooleanProperty;
Expand All @@ -30,6 +29,8 @@
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;

import java.util.Objects;

/**
* Custom entry representing a google event. This contains all the required
* information for a single event of google calendar.
Expand Down Expand Up @@ -83,7 +84,7 @@ public final void setStatus(Status status) {
public void set(boolean newValue) {
boolean oldValue = get();

if (!Util.equals(oldValue, newValue)) {
if (!Objects.equals(oldValue, newValue)) {
super.set(newValue);

if (getCalendar() instanceof GoogleCalendar) {
Expand Down Expand Up @@ -119,7 +120,7 @@ public final void setAttendeesCanModify(boolean attendeesCanModify) {
public void set(boolean newValue) {
boolean oldValue = get();

if (!Util.equals(oldValue, newValue)) {
if (!Objects.equals(oldValue, newValue)) {
super.set(newValue);

if (getCalendar() instanceof GoogleCalendar) {
Expand Down Expand Up @@ -151,7 +152,7 @@ public final void setAttendeesCanInviteOthers(
public void set(boolean newValue) {
boolean oldValue = get();

if (!Util.equals(oldValue, newValue)) {
if (!Objects.equals(oldValue, newValue)) {
super.set(newValue);

if (getCalendar() instanceof GoogleCalendar) {
Expand Down
14 changes: 7 additions & 7 deletions CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void set(Interval newInterval) {

Interval oldInterval = getValue();

if (!Util.equals(newInterval, oldInterval)) {
if (!Objects.equals(newInterval, oldInterval)) {

Calendar calendar = getCalendar();

Expand Down Expand Up @@ -672,7 +672,7 @@ public final StringProperty recurrenceRuleProperty() {
public void set(String newRecurrence) {
String oldRecurrence = get();

if (!Util.equals(oldRecurrence, newRecurrence)) {
if (!Objects.equals(oldRecurrence, newRecurrence)) {

Calendar calendar = getCalendar();

Expand Down Expand Up @@ -839,7 +839,7 @@ public final String getId() {
public void set(Calendar newCalendar) {
Calendar oldCalendar = get();

if (!Util.equals(oldCalendar, newCalendar)) {
if (!Objects.equals(oldCalendar, newCalendar)) {

if (oldCalendar != null) {
if (!isRecurrence()) {
Expand Down Expand Up @@ -1004,7 +1004,7 @@ public final ZoneId getZoneId() {
public void set(String newTitle) {
String oldTitle = get();

if (!Util.equals(oldTitle, newTitle)) {
if (!Objects.equals(oldTitle, newTitle)) {
super.set(newTitle);

Calendar calendar = getCalendar();
Expand Down Expand Up @@ -1062,7 +1062,7 @@ public final StringProperty locationProperty() {
public void set(String newLocation) {
String oldLocation = get();

if (!Util.equals(oldLocation, newLocation)) {
if (!Objects.equals(oldLocation, newLocation)) {

super.set(newLocation);

Expand Down Expand Up @@ -1215,7 +1215,7 @@ public final LocalTime getEndTime() {
public void set(boolean newFullDay) {
boolean oldFullDay = get();

if (!Util.equals(oldFullDay, newFullDay)) {
if (!Objects.equals(oldFullDay, newFullDay)) {

super.set(newFullDay);

Expand Down Expand Up @@ -1508,7 +1508,7 @@ public final BooleanProperty hiddenProperty() {
}

/**
* An entry can be made explicityl hidden.
* An entry can be made explicitly hidden.
*
* @param hidden true if the entry should not be visible in the calendar
*/
Expand Down
Loading

0 comments on commit f85e1e2

Please sign in to comment.