From 066bf93e019b3c713da9fd16af3ad9c25827653b Mon Sep 17 00:00:00 2001 From: Dirk Lemmermann Date: Thu, 6 Oct 2022 15:22:25 +0200 Subject: [PATCH] Renamed the values of the ResourcesView.Type enum to ResourcesView.Type.DATES_OVER_RESOURCES and ResourcesView.Type.RESOURCES_OVER_DATES. --- .../calendarfx/demo/views/resources/HelloResourcesView.java | 6 +++--- .../src/main/java/com/calendarfx/view/ResourcesView.java | 6 +++--- .../com/calendarfx/view/ResourcesViewContainerSkin.java | 2 +- .../java/impl/com/calendarfx/view/ResourcesViewSkin.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CalendarFXSampler/src/main/java/com/calendarfx/demo/views/resources/HelloResourcesView.java b/CalendarFXSampler/src/main/java/com/calendarfx/demo/views/resources/HelloResourcesView.java index 88773dba..bdf6f034 100644 --- a/CalendarFXSampler/src/main/java/com/calendarfx/demo/views/resources/HelloResourcesView.java +++ b/CalendarFXSampler/src/main/java/com/calendarfx/demo/views/resources/HelloResourcesView.java @@ -104,9 +104,9 @@ public Node getControlPanel() { @Override public String toString(Type object) { if (object != null) { - if (object.equals(Type.RESOURCES_OVER_DATE)) { + if (object.equals(Type.RESOURCES_OVER_DATES)) { return "Resources over date"; - } else if (object.equals(Type.DATE_OVER_RESOURCES)) { + } else if (object.equals(Type.DATES_OVER_RESOURCES)) { return "Date over resources"; } else { return "unknown view type: " + object.name(); @@ -155,7 +155,7 @@ public Type fromString(String string) { @Override protected DateControl createControl() { resourcesView = new ResourcesView(); - resourcesView.setType(Type.DATE_OVER_RESOURCES); + resourcesView.setType(Type.DATES_OVER_RESOURCES); resourcesView.setNumberOfDays(5); resourcesView.setCreateEntryClickCount(1); resourcesView.setGridType(GridType.CUSTOM); diff --git a/CalendarFXView/src/main/java/com/calendarfx/view/ResourcesView.java b/CalendarFXView/src/main/java/com/calendarfx/view/ResourcesView.java index c1ca7934..85ab500c 100644 --- a/CalendarFXView/src/main/java/com/calendarfx/view/ResourcesView.java +++ b/CalendarFXView/src/main/java/com/calendarfx/view/ResourcesView.java @@ -102,16 +102,16 @@ public enum Type { * Display the resources at the very top and then one or more days below each * resource. */ - RESOURCES_OVER_DATE, + RESOURCES_OVER_DATES, /** * Display the dates at the very top and then one or more resources below each * date. */ - DATE_OVER_RESOURCES + DATES_OVER_RESOURCES } - private final ObjectProperty type = new SimpleObjectProperty<>(this, "type", Type.RESOURCES_OVER_DATE); + private final ObjectProperty type = new SimpleObjectProperty<>(this, "type", Type.RESOURCES_OVER_DATES); public final Type getType() { return type.get(); diff --git a/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewContainerSkin.java b/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewContainerSkin.java index d1638372..8b9be990 100644 --- a/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewContainerSkin.java +++ b/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewContainerSkin.java @@ -45,7 +45,7 @@ private void updateView() { ResourcesViewContainer resourcesContainer = getSkinnable(); resourcesContainer.unbindAll(); - if (resourcesView.getType().equals(Type.RESOURCES_OVER_DATE)) { + if (resourcesView.getType().equals(Type.RESOURCES_OVER_DATES)) { updateViewResourcesOverDates(); } else { updateViewDatesOverResources(); diff --git a/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewSkin.java b/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewSkin.java index de066cd3..149918f6 100644 --- a/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewSkin.java +++ b/CalendarFXView/src/main/java/impl/com/calendarfx/view/ResourcesViewSkin.java @@ -115,7 +115,7 @@ private void updateView() { gridPane.getColumnConstraints().clear(); ResourcesView view = getSkinnable(); - if (view.getType().equals(Type.RESOURCES_OVER_DATE)) { + if (view.getType().equals(Type.RESOURCES_OVER_DATES)) { updateViewResourcesOverDates(); } else { updateViewDatesOverResources();