1 |
< |
import javax.swing.*; |
2 |
< |
import javax.swing.border.*; |
3 |
< |
import java.awt.Color; |
4 |
< |
import uk.ac.ukc.iscream.util.*; |
1 |
> |
//---PACKAGE DECLARATION--- |
2 |
|
|
3 |
+ |
//---IMPORTS--- |
4 |
+ |
import uk.ac.ukc.iscream.util.*; |
5 |
+ |
import javax.swing.*; |
6 |
|
import java.awt.*; |
7 |
|
import java.awt.event.*; |
8 |
– |
import java.net.*; |
9 |
– |
import java.io.*; |
10 |
– |
import java.util.Date; |
11 |
– |
import java.text.DateFormat; |
12 |
– |
import java.util.Locale; |
13 |
– |
import java.util.HashMap; |
14 |
– |
import javax.swing.border.*; |
8 |
|
|
9 |
+ |
/** |
10 |
+ |
* This panel holds the toolbar at the top. |
11 |
+ |
* The tool bar dispatches events to the ConnectionHandler. |
12 |
+ |
* |
13 |
+ |
* @author $Author$ |
14 |
+ |
* @version $Id$ |
15 |
+ |
*/ |
16 |
|
public class ControlPanel extends JPanel { |
17 |
+ |
|
18 |
+ |
//---FINAL ATTRIBUTES--- |
19 |
+ |
|
20 |
+ |
/** |
21 |
+ |
* The current CVS revision of this class |
22 |
+ |
*/ |
23 |
+ |
public final String REVISION = "$Revision$"; |
24 |
+ |
|
25 |
+ |
//---STATIC METHODS--- |
26 |
+ |
|
27 |
+ |
//---CONSTRUCTORS--- |
28 |
+ |
|
29 |
|
public ControlPanel(DataPanel data) { |
30 |
|
super(); |
31 |
|
setLayout(new BorderLayout()); |
34 |
|
add(_toolBar, "North"); |
35 |
|
_handler.start(); |
36 |
|
} |
37 |
< |
|
37 |
> |
|
38 |
> |
//---PUBLIC METHODS--- |
39 |
> |
|
40 |
> |
//---PRIVATE METHODS--- |
41 |
> |
|
42 |
|
private JToolBar setupToolBar() { |
43 |
|
JButton connectButton = new JButton("Connect"); |
44 |
|
connectButton.addActionListener(new ActionListener() { |
84 |
|
return bar; |
85 |
|
} |
86 |
|
|
87 |
+ |
//---ACCESSOR/MUTATOR METHODS--- |
88 |
+ |
|
89 |
+ |
//---ATTRIBUTES--- |
90 |
+ |
|
91 |
|
DataPanel _data; |
92 |
|
JToolBar _toolBar = setupToolBar(); |
93 |
|
|
94 |
|
Queue _actionQueue = new Queue(); |
95 |
|
ConnectionHandler _handler; |
96 |
< |
} |
96 |
> |
|
97 |
> |
//---STATIC ATTRIBUTES--- |
98 |
> |
|
99 |
> |
} |