1 /*
2 * Tethys: GUI Utilities
3 * Copyright 2012-2026. Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17 package io.github.tonywasher.joceanus.tethys.api.button;
18
19 import io.github.tonywasher.joceanus.oceanus.date.OceanusDatePeriod;
20 import io.github.tonywasher.joceanus.oceanus.date.OceanusDateRange;
21 import io.github.tonywasher.joceanus.oceanus.event.OceanusEventRegistrar.OceanusEventProvider;
22 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIComponent;
23 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIEvent;
24
25 import java.util.Locale;
26
27 /**
28 * DateRange Selector.
29 */
30 public interface TethysUIDateRangeSelector
31 extends OceanusEventProvider<TethysUIEvent>, TethysUIComponent {
32 /**
33 * Is the panel visible?
34 *
35 * @return true/false
36 */
37 boolean isVisible();
38
39 /**
40 * Obtain selected DateRange.
41 *
42 * @return the selected date range
43 */
44 OceanusDateRange getRange();
45
46 /**
47 * Set the overall range for the control.
48 *
49 * @param pRange the range
50 */
51 void setOverallRange(OceanusDateRange pRange);
52
53 /**
54 * Set the locale.
55 *
56 * @param pLocale the locale
57 */
58 void setLocale(Locale pLocale);
59
60 /**
61 * Set period.
62 *
63 * @param pPeriod the new period
64 */
65 void setPeriod(OceanusDatePeriod pPeriod);
66
67 /**
68 * Lock period.
69 *
70 * @param isLocked true/false.
71 */
72 void lockPeriod(boolean isLocked);
73
74 /**
75 * Copy date selection from other box.
76 *
77 * @param pSource the source box
78 */
79 void setSelection(TethysUIDateRangeSelector pSource);
80
81 /**
82 * Create SavePoint.
83 */
84 void createSavePoint();
85
86 /**
87 * Restore SavePoint.
88 */
89 void restoreSavePoint();
90 }