From a3597a878cddb168bfeaec688a89fe42f3ec5d7a Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Tue, 21 Nov 2023 08:19:30 -0600 Subject: [PATCH] Add attributes to widget data classes --- .../model/dashboard/widgets/QWidgetData.java | 33 +++ .../dashboard/WidgetDropdownData.java | 197 ++++++++++++++++++ 2 files changed, 230 insertions(+) diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/QWidgetData.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/QWidgetData.java index d212487a..467554b3 100644 --- a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/QWidgetData.java +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/QWidgetData.java @@ -36,6 +36,7 @@ public abstract class QWidgetData private String footerHTML; private List dropdownNameList; private List dropdownLabelList; + private List dropdownDefaultValueList; private Boolean hasPermission; ///////////////////////////////////////////////////////////////////////////////////////// @@ -291,4 +292,36 @@ public abstract class QWidgetData return (this); } + + + /******************************************************************************* + ** Getter for dropdownDefaultValueList + *******************************************************************************/ + public List getDropdownDefaultValueList() + { + return (this.dropdownDefaultValueList); + } + + + + /******************************************************************************* + ** Setter for dropdownDefaultValueList + *******************************************************************************/ + public void setDropdownDefaultValueList(List dropdownDefaultValueList) + { + this.dropdownDefaultValueList = dropdownDefaultValueList; + } + + + + /******************************************************************************* + ** Fluent setter for dropdownDefaultValueList + *******************************************************************************/ + public QWidgetData withDropdownDefaultValueList(List dropdownDefaultValueList) + { + this.dropdownDefaultValueList = dropdownDefaultValueList; + return (this); + } + + } diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/metadata/dashboard/WidgetDropdownData.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/metadata/dashboard/WidgetDropdownData.java index 54cdf91f..d5446dea 100644 --- a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/metadata/dashboard/WidgetDropdownData.java +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/metadata/dashboard/WidgetDropdownData.java @@ -33,6 +33,16 @@ public class WidgetDropdownData private String label; private boolean isRequired; + private Integer width; + private String startIconName; + private Boolean allowBackAndForth; + private Boolean backAndForthInverted; + private Boolean disableClearable; + + //////////////////////////////////////////////////////////////////////////////////////////////// + // an option to put at the top of the dropdown, that represents a value of "null" (e.g., All) // + //////////////////////////////////////////////////////////////////////////////////////////////// + private String labelForNullValue; /******************************************************************************* @@ -169,4 +179,191 @@ public class WidgetDropdownData return (this); } + + + /******************************************************************************* + ** Getter for width + *******************************************************************************/ + public Integer getWidth() + { + return (this.width); + } + + + + /******************************************************************************* + ** Setter for width + *******************************************************************************/ + public void setWidth(Integer width) + { + this.width = width; + } + + + + /******************************************************************************* + ** Fluent setter for width + *******************************************************************************/ + public WidgetDropdownData withWidth(Integer width) + { + this.width = width; + return (this); + } + + + + /******************************************************************************* + ** Getter for startIconName + *******************************************************************************/ + public String getStartIconName() + { + return (this.startIconName); + } + + + + /******************************************************************************* + ** Setter for startIconName + *******************************************************************************/ + public void setStartIconName(String startIconName) + { + this.startIconName = startIconName; + } + + + + /******************************************************************************* + ** Fluent setter for startIconName + *******************************************************************************/ + public WidgetDropdownData withStartIconName(String startIconName) + { + this.startIconName = startIconName; + return (this); + } + + + + /******************************************************************************* + ** Getter for allowBackAndForth + *******************************************************************************/ + public Boolean getAllowBackAndForth() + { + return (this.allowBackAndForth); + } + + + + /******************************************************************************* + ** Setter for allowBackAndForth + *******************************************************************************/ + public void setAllowBackAndForth(Boolean allowBackAndForth) + { + this.allowBackAndForth = allowBackAndForth; + } + + + + /******************************************************************************* + ** Fluent setter for allowBackAndForth + *******************************************************************************/ + public WidgetDropdownData withAllowBackAndForth(Boolean allowBackAndForth) + { + this.allowBackAndForth = allowBackAndForth; + return (this); + } + + + + /******************************************************************************* + ** Getter for disableClearable + *******************************************************************************/ + public Boolean getDisableClearable() + { + return (this.disableClearable); + } + + + + /******************************************************************************* + ** Setter for disableClearable + *******************************************************************************/ + public void setDisableClearable(Boolean disableClearable) + { + this.disableClearable = disableClearable; + } + + + + /******************************************************************************* + ** Fluent setter for disableClearable + *******************************************************************************/ + public WidgetDropdownData withDisableClearable(Boolean disableClearable) + { + this.disableClearable = disableClearable; + return (this); + } + + + + /******************************************************************************* + ** Getter for labelForNullValue + *******************************************************************************/ + public String getLabelForNullValue() + { + return (this.labelForNullValue); + } + + + + /******************************************************************************* + ** Setter for labelForNullValue + *******************************************************************************/ + public void setLabelForNullValue(String labelForNullValue) + { + this.labelForNullValue = labelForNullValue; + } + + + + /******************************************************************************* + ** Fluent setter for labelForNullValue + *******************************************************************************/ + public WidgetDropdownData withLabelForNullValue(String labelForNullValue) + { + this.labelForNullValue = labelForNullValue; + return (this); + } + + + + /******************************************************************************* + ** Getter for backAndForthInverted + *******************************************************************************/ + public Boolean getBackAndForthInverted() + { + return (this.backAndForthInverted); + } + + + + /******************************************************************************* + ** Setter for backAndForthInverted + *******************************************************************************/ + public void setBackAndForthInverted(Boolean backAndForthInverted) + { + this.backAndForthInverted = backAndForthInverted; + } + + + + /******************************************************************************* + ** Fluent setter for backAndForthInverted + *******************************************************************************/ + public WidgetDropdownData withBackAndForthInverted(Boolean backAndForthInverted) + { + this.backAndForthInverted = backAndForthInverted; + return (this); + } + + }