ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/ControlPanel.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/ControlPanel.java (file contents):
Revision 1.11 by ajm, Tue Feb 27 15:11:44 2001 UTC vs.
Revision 1.18 by tdb, Wed Feb 5 19:35:04 2003 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * http://www.i-scream.org.uk
4 + * Copyright (C) 2000-2002 i-scream
5 + *
6 + * This program is free software; you can redistribute it and/or
7 + * modify it under the terms of the GNU General Public License
8 + * as published by the Free Software Foundation; either version 2
9 + * of the License, or (at your option) any later version.
10 + *
11 + * This program is distributed in the hope that it will be useful,
12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 + * GNU General Public License for more details.
15 + *
16 + * You should have received a copy of the GNU General Public License
17 + * along with this program; if not, write to the Free Software
18 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 + */
20 +
21   //---PACKAGE DECLARATION---
22 < package uk.ac.ukc.iscream.conient;
22 > package uk.org.iscream.cms.conient;
23  
24   //---IMPORTS---
25 < import uk.ac.ukc.iscream.util.*;
25 > import uk.org.iscream.cms.util.*;
26   import javax.swing.*;
27   import java.awt.BorderLayout;
28   import java.net.URL;
# Line 55 | Line 75 | public class ControlPanel extends JPanel {
75       */
76      private JToolBar setupToolBar() {
77          
78 <        JButton connectButton = new JButton("Connect", new ImageIcon("./resources/control16.gif"));
78 >        JButton connectButton = new JButton("Connect", new ImageIcon(getClass().getResource("/resources/control16.gif")));
79          connectButton.addActionListener(new ActionListener() {
80              public void actionPerformed(ActionEvent e) {
81                  _actionQueue.add(new Integer(ConnectionHandler.CONNECT));
82              }
83          });
84 <        JButton disconnectButton = new JButton("Disconnect", new ImageIcon("./resources/stop16.gif"));
84 >        JButton disconnectButton = new JButton("Disconnect", new ImageIcon(getClass().getResource("/resources/stop16.gif")));
85          disconnectButton.addActionListener(new ActionListener() {
86              public void actionPerformed(ActionEvent e) {
87                  _actionQueue.add(new Integer(ConnectionHandler.DISCONNECT));
88              }
89          });
90          
91 <        JButton startDataButton = new JButton("Start Data", new ImageIcon("./resources/data16.gif"));
91 >        JButton startDataButton = new JButton("Start Data", new ImageIcon(getClass().getResource("/resources/data16.gif")));
92          startDataButton.addActionListener(new ActionListener() {
93              public void actionPerformed(ActionEvent e) {
94                  _actionQueue.add(new Integer(ConnectionHandler.STARTDATA));
95              }
96          });
97 <        JButton stopDataButton = new JButton("Stop Data", new ImageIcon("./resources/stop16.gif"));
97 >        JButton stopDataButton = new JButton("Stop Data", new ImageIcon(getClass().getResource("/resources/stop16.gif")));
98          stopDataButton.addActionListener(new ActionListener() {
99              public void actionPerformed(ActionEvent e) {
100                  _actionQueue.add(new Integer(ConnectionHandler.STOPDATA));
# Line 89 | Line 109 | public class ControlPanel extends JPanel {
109          bar.add(stopDataButton);
110  
111          bar.add(Box.createGlue());
112 <        JLabel image = new JLabel(new ImageIcon("./resources/i-scream.gif"));
112 >        JLabel image = new JLabel(new ImageIcon(getClass().getResource("/resources/i-scream.gif")));
113          bar.add(image);
114          return bar;
115      }
# Line 152 | Line 172 | public class ControlPanel extends JPanel {
172          bar.add(conientMenu);
173          
174          JMenu connectionMenu = new JMenu("Connection");
175 <        JMenuItem controlConnect = new JMenuItem("Connect", new ImageIcon("./resources/control16.gif"));      
175 >        JMenuItem controlConnect = new JMenuItem("Connect", new ImageIcon(getClass().getResource("/resources/control16.gif")));      
176          controlConnect.addActionListener(new ActionListener() {
177              public void actionPerformed(ActionEvent e) {
178                  _actionQueue.add(new Integer(ConnectionHandler.CONNECT));
179              }
180          });
181          connectionMenu.add(controlConnect);
182 <        JMenuItem controlDisconnect = new JMenuItem("Disconnect", new ImageIcon("./resources/stop16.gif"));
182 >        JMenuItem controlDisconnect = new JMenuItem("Disconnect", new ImageIcon(getClass().getResource("/resources/stop16.gif")));
183          controlDisconnect.addActionListener(new ActionListener() {
184              public void actionPerformed(ActionEvent e) {
185                  _actionQueue.add(new Integer(ConnectionHandler.DISCONNECT));
# Line 167 | Line 187 | public class ControlPanel extends JPanel {
187          });
188          connectionMenu.add(controlDisconnect);
189          connectionMenu.addSeparator();
190 <        JMenuItem dataConnect = new JMenuItem("Start Data", new ImageIcon("./resources/data16.gif"));      
190 >        JMenuItem dataConnect = new JMenuItem("Start Data", new ImageIcon(getClass().getResource("/resources/data16.gif")));
191          dataConnect.addActionListener(new ActionListener() {
192              public void actionPerformed(ActionEvent e) {
193                  _actionQueue.add(new Integer(ConnectionHandler.STARTDATA));
194              }
195          });
196          connectionMenu.add(dataConnect);
197 <        JMenuItem dataDisconnect = new JMenuItem("Stop Data", new ImageIcon("./resources/stop16.gif"));
197 >        JMenuItem dataDisconnect = new JMenuItem("Stop Data", new ImageIcon(getClass().getResource("/resources/stop16.gif")));
198          dataDisconnect.addActionListener(new ActionListener() {
199              public void actionPerformed(ActionEvent e) {
200                  _actionQueue.add(new Integer(ConnectionHandler.STOPDATA));
# Line 182 | Line 202 | public class ControlPanel extends JPanel {
202          });
203          connectionMenu.add(dataDisconnect);
204          bar.add(connectionMenu);
205 <        
186 <        JMenu helpMenu = new JMenu("Help");
187 <        JMenuItem help = new JMenuItem("Help");
188 <        helpMenu.add(help);
189 <        JMenuItem about = new JMenuItem("About");
190 <        helpMenu.add(about);
191 <        bar.add(helpMenu);
192 <        
205 >              
206          return bar;
207      }
208  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines