5 |
|
import uk.ac.ukc.iscream.util.*; |
6 |
|
import javax.swing.*; |
7 |
|
import java.awt.BorderLayout; |
8 |
+ |
import java.net.URL; |
9 |
|
import java.awt.event.ActionListener; |
10 |
|
import java.awt.event.ActionEvent; |
11 |
|
|
54 |
|
* to dispatch events to the ConnectionHandler |
55 |
|
*/ |
56 |
|
private JToolBar setupToolBar() { |
57 |
< |
JButton connectButton = new JButton("Connect", new ImageIcon("./uk/ac/ukc/iscream/conient/control16.gif")); |
57 |
> |
|
58 |
> |
JButton connectButton = new JButton("Connect", new ImageIcon("./resources/control16.gif")); |
59 |
|
connectButton.addActionListener(new ActionListener() { |
60 |
|
public void actionPerformed(ActionEvent e) { |
61 |
|
_actionQueue.add(new Integer(ConnectionHandler.CONNECT)); |
62 |
|
} |
63 |
|
}); |
64 |
< |
JButton disconnectButton = new JButton("Disconnect", new ImageIcon("./uk/ac/ukc/iscream/conient/stop16.gif")); |
64 |
> |
JButton disconnectButton = new JButton("Disconnect", new ImageIcon("./resources/stop16.gif")); |
65 |
|
disconnectButton.addActionListener(new ActionListener() { |
66 |
|
public void actionPerformed(ActionEvent e) { |
67 |
|
_actionQueue.add(new Integer(ConnectionHandler.DISCONNECT)); |
68 |
|
} |
69 |
|
}); |
70 |
|
|
71 |
< |
JButton startDataButton = new JButton("Start Data", new ImageIcon("./uk/ac/ukc/iscream/conient/data16.gif")); |
71 |
> |
JButton startDataButton = new JButton("Start Data", new ImageIcon("./resources/data16.gif")); |
72 |
|
startDataButton.addActionListener(new ActionListener() { |
73 |
|
public void actionPerformed(ActionEvent e) { |
74 |
|
_actionQueue.add(new Integer(ConnectionHandler.STARTDATA)); |
75 |
|
} |
76 |
|
}); |
77 |
< |
JButton stopDataButton = new JButton("Stop Data", new ImageIcon("./uk/ac/ukc/iscream/conient/stop16.gif")); |
77 |
> |
JButton stopDataButton = new JButton("Stop Data", new ImageIcon("./resources/stop16.gif")); |
78 |
|
stopDataButton.addActionListener(new ActionListener() { |
79 |
|
public void actionPerformed(ActionEvent e) { |
80 |
|
_actionQueue.add(new Integer(ConnectionHandler.STOPDATA)); |
89 |
|
bar.add(stopDataButton); |
90 |
|
|
91 |
|
bar.add(Box.createGlue()); |
92 |
< |
JLabel image = new JLabel(new ImageIcon("./uk/ac/ukc/iscream/conient/i-scream.gif")); |
92 |
> |
JLabel image = new JLabel(new ImageIcon("./resources/i-scream.gif")); |
93 |
|
bar.add(image); |
94 |
|
return bar; |
95 |
|
} |
152 |
|
bar.add(conientMenu); |
153 |
|
|
154 |
|
JMenu connectionMenu = new JMenu("Connection"); |
155 |
< |
JMenuItem controlConnect = new JMenuItem("Connect", new ImageIcon("./uk/ac/ukc/iscream/conient/control16.gif")); |
155 |
> |
JMenuItem controlConnect = new JMenuItem("Connect", new ImageIcon("./resources/control16.gif")); |
156 |
|
controlConnect.addActionListener(new ActionListener() { |
157 |
|
public void actionPerformed(ActionEvent e) { |
158 |
|
_actionQueue.add(new Integer(ConnectionHandler.CONNECT)); |
159 |
|
} |
160 |
|
}); |
161 |
|
connectionMenu.add(controlConnect); |
162 |
< |
JMenuItem controlDisconnect = new JMenuItem("Disconnect", new ImageIcon("./uk/ac/ukc/iscream/conient/stop16.gif")); |
162 |
> |
JMenuItem controlDisconnect = new JMenuItem("Disconnect", new ImageIcon("./resources/stop16.gif")); |
163 |
|
controlDisconnect.addActionListener(new ActionListener() { |
164 |
|
public void actionPerformed(ActionEvent e) { |
165 |
|
_actionQueue.add(new Integer(ConnectionHandler.DISCONNECT)); |
167 |
|
}); |
168 |
|
connectionMenu.add(controlDisconnect); |
169 |
|
connectionMenu.addSeparator(); |
170 |
< |
JMenuItem dataConnect = new JMenuItem("Start Data", new ImageIcon("./uk/ac/ukc/iscream/conient/data16.gif")); |
170 |
> |
JMenuItem dataConnect = new JMenuItem("Start Data", new ImageIcon("./resources/data16.gif")); |
171 |
|
dataConnect.addActionListener(new ActionListener() { |
172 |
|
public void actionPerformed(ActionEvent e) { |
173 |
|
_actionQueue.add(new Integer(ConnectionHandler.STARTDATA)); |
174 |
|
} |
175 |
|
}); |
176 |
|
connectionMenu.add(dataConnect); |
177 |
< |
JMenuItem dataDisconnect = new JMenuItem("Stop Data", new ImageIcon("./uk/ac/ukc/iscream/conient/stop16.gif")); |
177 |
> |
JMenuItem dataDisconnect = new JMenuItem("Stop Data", new ImageIcon("./resources/stop16.gif")); |
178 |
|
dataDisconnect.addActionListener(new ActionListener() { |
179 |
|
public void actionPerformed(ActionEvent e) { |
180 |
|
_actionQueue.add(new Integer(ConnectionHandler.STOPDATA)); |