Skip to content

Commit

Permalink
Renamed the values of the ResourcesView.Type enum to ResourcesView.Ty…
Browse files Browse the repository at this point in the history
…pe.DATES_OVER_RESOURCES and ResourcesView.Type.RESOURCES_OVER_DATES.
  • Loading branch information
dlemmermann committed Oct 6, 2022
1 parent ab4d4c6 commit 066bf93
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> type = new SimpleObjectProperty<>(this, "type", Type.RESOURCES_OVER_DATE);
private final ObjectProperty<Type> type = new SimpleObjectProperty<>(this, "type", Type.RESOURCES_OVER_DATES);

public final Type getType() {
return type.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void updateView() {
ResourcesViewContainer<T> resourcesContainer = getSkinnable();
resourcesContainer.unbindAll();

if (resourcesView.getType().equals(Type.RESOURCES_OVER_DATE)) {
if (resourcesView.getType().equals(Type.RESOURCES_OVER_DATES)) {
updateViewResourcesOverDates();
} else {
updateViewDatesOverResources();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void updateView() {
gridPane.getColumnConstraints().clear();

ResourcesView<T> view = getSkinnable();
if (view.getType().equals(Type.RESOURCES_OVER_DATE)) {
if (view.getType().equals(Type.RESOURCES_OVER_DATES)) {
updateViewResourcesOverDates();
} else {
updateViewDatesOverResources();
Expand Down

0 comments on commit 066bf93

Please sign in to comment.