View Javadoc
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.control;
18  
19  /**
20   * Control Factory.
21   */
22  public interface TethysUIControlFactory {
23      /**
24       * Obtain a new label.
25       *
26       * @return the new label
27       */
28      TethysUILabel newLabel();
29  
30      /**
31       * Obtain a new label.
32       *
33       * @param pText the label text
34       * @return the new label
35       */
36      default TethysUILabel newLabel(final String pText) {
37          final TethysUILabel myLabel = newLabel();
38          myLabel.setText(pText);
39          return myLabel;
40      }
41  
42      /**
43       * Obtain a check box.
44       *
45       * @return the new check box
46       */
47      TethysUICheckBox newCheckBox();
48  
49      /**
50       * Obtain a check box.
51       *
52       * @param pText the checkBox text
53       * @return the new check box
54       */
55      default TethysUICheckBox newCheckBox(final String pText) {
56          final TethysUICheckBox myCheckBox = newCheckBox();
57          myCheckBox.setText(pText);
58          return myCheckBox;
59      }
60  
61      /**
62       * Obtain a new textArea.
63       *
64       * @return the new textArea
65       */
66      TethysUITextArea newTextArea();
67  
68      /**
69       * Obtain a new password field.
70       *
71       * @return the new password field
72       */
73      TethysUIPasswordField newPasswordField();
74  
75      /**
76       * Obtain a new progressBar.
77       *
78       * @return the new progressBar
79       */
80      TethysUIProgressBar newProgressBar();
81  
82      /**
83       * Obtain a new slider.
84       *
85       * @return the new slider
86       */
87      TethysUISlider newSlider();
88  
89      /**
90       * Obtain a new HTML manager.
91       *
92       * @return the new manager
93       */
94      TethysUIHTMLManager newHTMLManager();
95  
96      /**
97       * Obtain a new Tree manager.
98       *
99       * @param <T> the item type
100      * @return the new manager
101      */
102     <T> TethysUITreeManager<T> newTreeManager();
103 
104     /**
105      * Obtain a new splitTree manager.
106      *
107      * @param <T> the item type
108      * @return the new manager
109      */
110     <T> TethysUISplitTreeManager<T> newSplitTreeManager();
111 }