Class DateRangePresets
java.lang.Object
overit.geocallapp.utilities.ux.ui.util.date.DateRangePresets
A utility class that provides predefined date ranges and related functionalities.
This class contains a set of constants representing specific date ranges (e.g., today, yesterday, this week, etc.) and their labels. It provides methods to generate menu items, apply date ranges to data, and retrieve the boundaries for these predefined ranges.
This class is designed to support applications where date range selections are frequently used, such as in reporting tools or user interfaces that require filtering by date.
- Since:
- 19.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringstatic final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMenuItems(Menu menu, String event, StringGetter params) voidapplyRange(StringGetter params, HashGetter target) voidclearRange(StringGetter params, HashGetter target) protected Date[]defineRangeDates(int range) protected LocaleExtensions point to allow a custom project to force a specificLocalefor the dates range evaluation
-
Field Details
-
FIELDS_EVENT_KEY
- See Also:
-
RANGE_EVENT_KEY
- See Also:
-
TODAY
protected static final int TODAY- See Also:
-
TODAY_LABEL
- See Also:
-
YESTERDAY
protected static final int YESTERDAY- See Also:
-
YESTERDAY_LABEL
- See Also:
-
THIS_WEEK
protected static final int THIS_WEEK- See Also:
-
THIS_WEEK_LABEL
- See Also:
-
THIS_MONTH
protected static final int THIS_MONTH- See Also:
-
THIS_MONTH_LABEL
- See Also:
-
THIS_YEAR
protected static final int THIS_YEAR- See Also:
-
THIS_YEAR_LABEL
- See Also:
-
LAST_WEEK
protected static final int LAST_WEEK- See Also:
-
LAST_WEEK_LABEL
- See Also:
-
LAST_MONTH
protected static final int LAST_MONTH- See Also:
-
LAST_MONTH_LABEL
- See Also:
-
LAST_YEAR
protected static final int LAST_YEAR- See Also:
-
LAST_YEAR_LABEL
- See Also:
-
TOMORROW
protected static final int TOMORROW- See Also:
-
TOMORROW_LABEL
- See Also:
-
NEXT_YEAR
protected static final int NEXT_YEAR- See Also:
-
NEXT_YEAR_LABEL
- See Also:
-
ranges
-
singles
-
-
Constructor Details
-
DateRangePresets
public DateRangePresets()
-
-
Method Details
-
addMenuItems
-
applyRange
-
clearRange
-
defineRangeDates
-
getForcedLocale
Extensions point to allow a custom project to force a specificLocalefor the dates range evaluation- Returns:
- a Locale to use for the dates range evaluation
-