Skip to content

Commit c3ab090

Browse files
committed
Add WidgetWithSettings to Marker widget
1 parent 8a7e69a commit c3ab090

5 files changed

Lines changed: 188 additions & 138 deletions

File tree

OpenBCI_GUI/MarkerEnums.pde

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
public enum MarkerWindow implements IndexingInterface
2+
{
3+
FIVE (0, 5, "5 sec"),
4+
TEN (1, 10, "10 sec"),
5+
TWENTY (2, 20, "20 sec");
6+
7+
private int index;
8+
private int value;
9+
private String label;
10+
11+
MarkerWindow(int _index, int _value, String _label) {
12+
this.index = _index;
13+
this.value = _value;
14+
this.label = _label;
15+
}
16+
17+
public int getValue() {
18+
return value;
19+
}
20+
21+
@Override
22+
public String getString() {
23+
return label;
24+
}
25+
26+
@Override
27+
public int getIndex() {
28+
return index;
29+
}
30+
}
31+
32+
public enum MarkerVertScale implements IndexingInterface
33+
{
34+
AUTO (0, 0, "Auto"),
35+
TWO (1, 2, "2"),
36+
FOUR (2, 4, "4"),
37+
EIGHT (3, 8, "8"),
38+
TEN (4, 10, "10"),
39+
TWENTY (6, 20, "20");
40+
41+
private int index;
42+
private int value;
43+
private String label;
44+
45+
MarkerVertScale(int _index, int _value, String _label) {
46+
this.index = _index;
47+
this.value = _value;
48+
this.label = _label;
49+
}
50+
51+
public int getValue() {
52+
return value;
53+
}
54+
55+
@Override
56+
public String getString() {
57+
return label;
58+
}
59+
60+
@Override
61+
public int getIndex() {
62+
return index;
63+
}
64+
}

0 commit comments

Comments
 (0)