31 |
|
} |
32 |
|
}); |
33 |
|
|
34 |
+ |
JButton startDataButton = new JButton("Start Data"); |
35 |
+ |
startDataButton.addActionListener(new ActionListener() { |
36 |
+ |
public void actionPerformed(ActionEvent e) { |
37 |
+ |
_actionQueue.add(new Integer(ConnectionHandler.STARTDATA)); |
38 |
+ |
} |
39 |
+ |
}); |
40 |
+ |
|
41 |
+ |
JButton stopDataButton = new JButton("Stop Data"); |
42 |
+ |
stopDataButton.addActionListener(new ActionListener() { |
43 |
+ |
public void actionPerformed(ActionEvent e) { |
44 |
+ |
_actionQueue.add(new Integer(ConnectionHandler.STOPDATA)); |
45 |
+ |
} |
46 |
+ |
}); |
47 |
+ |
|
48 |
+ |
JButton disconnectButton = new JButton("Disconnect"); |
49 |
+ |
disconnectButton.addActionListener(new ActionListener() { |
50 |
+ |
public void actionPerformed(ActionEvent e) { |
51 |
+ |
_actionQueue.add(new Integer(ConnectionHandler.DISCONNECT)); |
52 |
+ |
} |
53 |
+ |
}); |
54 |
+ |
|
55 |
|
JToolBar bar = new JToolBar(JToolBar.HORIZONTAL); |
56 |
|
bar.add(connectButton); |
57 |
+ |
bar.add(startDataButton); |
58 |
+ |
bar.add(stopDataButton); |
59 |
+ |
bar.add(disconnectButton); |
60 |
|
return bar; |
61 |
|
} |
62 |
|
|