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 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIAlignment;
20 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIArrowIconId;
21 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIComponent;
22 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIIcon;
23 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIIconId;
24 import io.github.tonywasher.joceanus.tethys.api.menu.TethysUIScrollMenu;
25
26 /**
27 * Label.
28 */
29 public interface TethysUILabel
30 extends TethysUIComponent {
31 /**
32 * Set Text.
33 *
34 * @param pText the text
35 */
36 void setText(String pText);
37
38 /**
39 * Set error text colour.
40 */
41 void setErrorText();
42
43 /**
44 * Obtain the width.
45 *
46 * @return the width
47 */
48 Integer getWidth();
49
50 /**
51 * Set Alignment.
52 *
53 * @param pAlign the alignment
54 */
55 void setAlignment(TethysUIAlignment pAlign);
56
57 /**
58 * Set context menu.
59 *
60 * @param pMenu the context menu.
61 */
62 void setContextMenu(TethysUIScrollMenu<?> pMenu);
63
64 /**
65 * Set Icon only.
66 */
67 void setIconOnly();
68
69 /**
70 * Set Text And Icon.
71 */
72 void setTextAndIcon();
73
74 /**
75 * Set Icon and Text.
76 */
77 void setIconAndText();
78
79 /**
80 * Set Text Only.
81 */
82 void setTextOnly();
83
84 /**
85 * Set icon for label.
86 *
87 * @param pId the icon Id
88 */
89 void setIcon(TethysUIIconId pId);
90
91 /**
92 * Set icon for label.
93 *
94 * @param pIcon the icon
95 */
96 void setIcon(TethysUIArrowIconId pIcon);
97
98 /**
99 * Set icon for label.
100 *
101 * @param pIcon the icon
102 */
103 void setIcon(TethysUIIcon pIcon);
104
105 /**
106 * Obtain icon size.
107 *
108 * @return the size
109 */
110 int getIconSize();
111
112 /**
113 * Set the icon size.
114 *
115 * @param pSize the size to set
116 */
117 void setIconSize(int pSize);
118 }