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
63 lines (57 loc) · 1.52 KB

File metadata and controls

63 lines (57 loc) · 1.52 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
package org.lcdproc.lcdjava;
/**
* Horizontal Bar Widget.
* <p>Displays a Horizontal Bar on the LCD display.
* <p>Copyright (c) 2004-2005 Darren Greaves.
* @author Darren Greaves
* @version $Id: HBarWidget.java,v 1.2 2005-03-03 14:13:16 boncey Exp $
*/
public class HBarWidget extends BarWidget
{
/**
* Version details.
*/
public static final String CVSID =
"$Id: HBarWidget.java,v 1.2 2005-03-03 14:13:16 boncey Exp $";
/**
* Constructor.
* @param id the of the Widget.
* @param screen the Screen that knows about this Widget.
*/
protected HBarWidget(int id, Screen screen)
{
super(id, screen);
}
/**
* Get the Widget type.
* @return the Widget type.
*/
public String getType()
{
return Widget.WIDGET_HBAR;
}
/**
* Construct a new HBarWidget.
* @param screen the Screen that owns the Widget.
* @param x the x position.
* @param y the y position.
* @param length the widget length.
* @return a new HBarWidget.
*/
public static HBarWidget construct(Screen screen, int x, int y, int length)
{
HBarWidget widget = null;
try
{
widget = (HBarWidget)screen.constructWidget(Widget.WIDGET_HBAR);
widget.setX(x);
widget.setY(y);
widget.setLength(length);
}
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.