Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
206 lines (173 loc) · 4.38 KB

File metadata and controls

206 lines (173 loc) · 4.38 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
package org.lcdproc.lcdjava;
/**
* Icon Widget.
* <p>Displays a Icon on the LCD display.
* <p>Copyright (c) 2004-2005 Darren Greaves.
* @author Darren Greaves
* @version $Id: IconWidget.java,v 1.2 2005-03-03 14:13:16 boncey Exp $
*/
public class IconWidget extends PositionalWidget
{
/**
* Version details.
*/
public static final String CVSID =
"$Id: IconWidget.java,v 1.2 2005-03-03 14:13:16 boncey Exp $";
/**
* A predefined icon.
*/
public static final String ICON_BLOCK_FILLED = "BLOCK_FILLED";
/**
* A predefined icon.
*/
public static final String ICON_HEART_OPEN = "HEART_OPEN";
/**
* A predefined icon.
*/
public static final String ICON_HEART_FILLED = "HEART_FILLED";
/**
* A predefined icon.
*/
public static final String ICON_ARROW_UP = "ARROW_UP";
/**
* A predefined icon.
*/
public static final String ICON_ARROW_DOWN = "ARROW_DOWN";
/**
* A predefined icon.
*/
public static final String ICON_ARROW_LEFT = "ARROW_LEFT";
/**
* A predefined icon.
*/
public static final String ICON_ARROW_RIGHT = "ARROW_RIGHT";
/**
* A predefined icon.
*/
public static final String ICON_CHECKBOX_OFF = "CHECKBOX_OFF";
/**
* A predefined icon.
*/
public static final String ICON_CHECKBOX_ON = "CHECKBOX_ON";
/**
* A predefined icon.
*/
public static final String ICON_CHECKBOX_GRAY = "CHECKBOX_GRAY";
/**
* A predefined icon.
*/
public static final String ICON_SELECTOR_AT_LEFT = "SELECTOR_AT_LEFT";
/**
* A predefined icon.
*/
public static final String ICON_SELECTOR_AT_RIGHT = "SELECTOR_AT_RIGHT";
/**
* A predefined icon.
*/
public static final String ICON_ELLIPSIS = "ELLIPSIS";
/**
* A predefined icon.
*/
public static final String ICON_PAUSE = "PAUSE";
/**
* A predefined icon.
*/
public static final String ICON_PLAY = "PLAY";
/**
* A predefined icon.
*/
public static final String ICON_PLAYR = "PLAYR";
/**
* A predefined icon.
*/
public static final String ICON_FF = "FF";
/**
* A predefined icon.
*/
public static final String ICON_FR = "FR";
/**
* A predefined icon.
*/
public static final String ICON_NEXT = "NEXT";
/**
* A predefined icon.
*/
public static final String ICON_PREV = "PREV";
/**
* A predefined icon.
*/
public static final String ICON_REC = "REC";
/**
* The Widget iconName.
*/
private String _iconName;
/**
* Constructor.
* @param id the of the Widget.
* @param screen the Screen that knows about this Widget.
*/
protected IconWidget(int id, Screen screen)
{
super(id, screen);
}
/**
* Get the Widget type.
* @return the Widget type.
*/
public String getType()
{
return WIDGET_ICON;
}
/**
* Set the Widget iconName.
* @param iconName the Widget iconName.
*/
public void setText(String iconName)
{
_iconName = iconName;
update();
}
/**
* Get the Widget iconName.
* @return the Widget iconName.
*/
public String getText()
{
return _iconName;
}
/**
* Return the data this Widget needs to update itself.
* @return the data to update this Widget.
*/
public String getData()
{
return super.getData() + "\"" + stripQuotes(_iconName) + "\"";
}
/**
* Construct a new IconWidget.
* @param screen the Screen that owns the Widget.
* @param x the x position.
* @param y the y position.
* @param iconName the widget iconName.
* @return a new IconWidget.
*/
public static IconWidget construct(Screen screen,
int x,
int y,
String iconName)
{
IconWidget widget = null;
try
{
widget = (IconWidget)screen.constructWidget(WIDGET_ICON);
widget.setX(x);
widget.setY(y);
widget.setText(iconName);
}
catch (LCDException e)
{
// Supress, would only get one if we asked for an invalid Widget.
}
return widget;
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.