Skip to content

Commit 73e3926

Browse files
committed
Remove widgetName from the constructor of base Widget class
1 parent b4c5fd1 commit 73e3926

21 files changed

Lines changed: 207 additions & 164 deletions

OpenBCI_GUI/W_Accelerometer.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ class W_Accelerometer extends Widget {
4444

4545
private AccelerometerCapableBoard accelBoard;
4646

47-
W_Accelerometer(String widgetName) {
48-
super(widgetName);
47+
W_Accelerometer() {
48+
super();
49+
widgetTitle = "Accelerometer";
4950

5051
accelBoard = (AccelerometerCapableBoard)currentBoard;
5152

OpenBCI_GUI/W_AnalogRead.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
////////////////////////////////////////////////////////////////////////
1010

1111
class W_AnalogRead extends Widget {
12-
1312
private float arPadding;
1413
// values for actual time series chart (rectangle encompassing all analogReadBars)
1514
private float ar_x, ar_y, ar_h, ar_w;
@@ -28,8 +27,9 @@ class W_AnalogRead extends Widget {
2827

2928
private AnalogCapableBoard analogBoard;
3029

31-
W_AnalogRead(String _widgetName) {
32-
super(_widgetName);
30+
W_AnalogRead() {
31+
super();
32+
widgetTitle = "AnalogRead";
3333

3434
analogBoard = (AnalogCapableBoard)currentBoard;
3535

OpenBCI_GUI/W_BandPower.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
////////////////////////////////////////////////////////////////////////////////////////////////////////
1616

1717
class W_BandPower extends Widget {
18-
1918
// indexes
2019
private final int DELTA = 0; // 1-4 Hz
2120
private final int THETA = 1; // 4-8 Hz
@@ -40,8 +39,9 @@ class W_BandPower extends Widget {
4039
int[] autoCleanTimers;
4140
boolean[] previousThresholdCrossed;
4241

43-
W_BandPower(String _widgetName) {
44-
super(_widgetName);
42+
W_BandPower() {
43+
super();
44+
widgetTitle = "Band Power";
4545

4646
autoCleanTimers = new int[currentBoard.getNumEXGChannels()];
4747
previousThresholdCrossed = new boolean[currentBoard.getNumEXGChannels()];

OpenBCI_GUI/W_CytonImpedance.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ class W_CytonImpedance extends Widget {
5656
private int thresholdTFWidth = 60; //Hard-code this value since there are deep errors with controlp5.textfield.setSize() and creating new graphics in this class - RW 12/13/2021
5757

5858

59-
W_CytonImpedance(String _widgetName){
60-
super(_widgetName);
59+
W_CytonImpedance() {
60+
super();
61+
widgetTitle = "Cyton Signal";
6162

6263
cytonBoard = (BoardCyton) currentBoard;
6364

OpenBCI_GUI/W_DigitalRead.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ class W_DigitalRead extends Widget {
2222

2323
private DigitalCapableBoard digitalBoard;
2424

25-
W_DigitalRead(String _widgetName) {
26-
super(_widgetName);
25+
W_DigitalRead() {
26+
super();
27+
widgetTitle = "Digital Read";
2728

2829
digitalBoard = (DigitalCapableBoard)currentBoard;
2930

OpenBCI_GUI/W_EMG.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ class W_Emg extends Widget {
2121

2222
public ExGChannelSelect emgChannelSelect;
2323

24-
W_Emg (String _widgetName) {
25-
super(_widgetName);
24+
W_Emg () {
25+
super();
26+
widgetTitle = "EMG";
2627

2728
cp5ElementsToCheck = new ArrayList<controlP5.Controller>();
2829

OpenBCI_GUI/W_EMGJoystick.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/////////////////////////////////////////////////////////////////////////////////////////////////////////
1111

1212
class W_EmgJoystick extends Widget {
13-
1413
private ControlP5 emgCp5;
1514
private Button emgSettingsButton;
1615
private List<controlP5.Controller> cp5ElementsToCheck;
@@ -71,8 +70,9 @@ class W_EmgJoystick extends Widget {
7170
private PImage yPositiveInputLabelImage = loadImage("EMG_Joystick/UP_100x100.png");
7271
private PImage yNegativeInputLabelImage = loadImage("EMG_Joystick/DOWN_100x100.png");
7372

74-
W_EmgJoystick(String _widgetName) {
75-
super(_widgetName);
73+
W_EmgJoystick() {
74+
super();
75+
widgetTitle = "EMG Joystick";
7676

7777
emgCp5 = new ControlP5(ourApplet);
7878
emgCp5.setGraphics(ourApplet, 0,0);

OpenBCI_GUI/W_FFT.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
///////////////////////////////////////////////////
1414

1515
class W_Fft extends Widget {
16-
1716
public ExGChannelSelect fftChanSelect;
1817
private boolean prevChanSelectIsVisible = false;
1918

@@ -28,8 +27,9 @@ class W_Fft extends Widget {
2827

2928
List<controlP5.Controller> cp5ElementsToCheck = new ArrayList<controlP5.Controller>();
3029

31-
W_Fft(String _widgetName) {
32-
super(_widgetName);
30+
W_Fft() {
31+
super();
32+
widgetTitle = "FFT Plot";
3333

3434
fftChanSelect = new ExGChannelSelect(ourApplet, x, y, w, navH);
3535
fftChanSelect.activateAllButtons();

OpenBCI_GUI/W_Focus.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import brainflow.LogLevels;
2222
import brainflow.MLModel;
2323

2424
class W_Focus extends Widget {
25-
2625
private ExGChannelSelect focusChanSelect;
2726
private boolean prevChanSelectIsVisible = false;
2827
private AuditoryNeurofeedback auditoryNeurofeedback;
@@ -64,8 +63,9 @@ class W_Focus extends Widget {
6463

6564
List<controlP5.Controller> cp5ElementsToCheck = new ArrayList<controlP5.Controller>();
6665

67-
W_Focus(String _widgetName) {
68-
super(_widgetName);
66+
W_Focus() {
67+
super();
68+
widgetTitle = "Focus";
6969

7070
//Add channel select dropdown to this widget
7171
focusChanSelect = new ExGChannelSelect(ourApplet, x, y, w, navH);

OpenBCI_GUI/W_GanglionImpedance.pde

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
class W_GanglionImpedance extends Widget {
2+
23
Button startStopCheck;
34
int padding = 24;
45

5-
W_GanglionImpedance(String _widgetName) {
6-
super(_widgetName);
6+
W_GanglionImpedance() {
7+
super();
8+
widgetTitle = "Ganglion Signal";
79

810
createStartStopCheck("startStopCheck", "Start Impedance Check", x + padding, y + padding, 200, NAV_HEIGHT, p4, 14, colorNotPressed, OPENBCI_DARKBLUE);
911
}

0 commit comments

Comments
 (0)