/[xulu]/trunk/src/appl/parallel/starter/client/XuluStarterClientPanel.java
ViewVC logotype

Annotation of /trunk/src/appl/parallel/starter/client/XuluStarterClientPanel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 78 - (hide annotations)
Wed Feb 10 16:43:46 2010 UTC (14 years, 10 months ago) by alfonx
File size: 5847 byte(s)
Merged branch 1.8-gt2-2.6 to trunk. Now the trunk is based on GeoTools 2.6.1 and schmitzm-2.0.x
1 mojays 2 package appl.parallel.starter.client;
2    
3     import java.awt.Dimension;
4     import java.awt.GridBagConstraints;
5 alfonx 78 import java.awt.GridBagLayout;
6     import java.awt.GridLayout;
7     import java.awt.Insets;
8 mojays 2
9 alfonx 78 import javax.swing.BoxLayout;
10 mojays 2 import javax.swing.JButton;
11     import javax.swing.JLabel;
12 alfonx 78 import javax.swing.JList;
13     import javax.swing.JPanel;
14     import javax.swing.JScrollPane;
15 mojays 2 import javax.swing.ListSelectionModel;
16     import javax.swing.border.SoftBevelBorder;
17    
18     /**
19     * The GUI for the XuluStarterController . The events are controlled by the
20     * {@link XuluStarterController}. This GUI was created with the Visual Editor
21     * plugin for eclipse and should be edited using this VE.
22     *
23     * @author Dominik Appl
24     */
25     public class XuluStarterClientPanel extends JPanel {
26    
27     static final long serialVersionUID = 1L;
28    
29     JPanel executionPanel = null;
30    
31     JLabel Steps = null;
32    
33     JScrollPane jScrollPane1 = null;
34    
35     JPanel buttonPanel = null;
36    
37     JList serverList = null;
38    
39     JButton refreshButton = null;
40    
41     JButton startButton = null;
42    
43     JButton stopButton = null;
44    
45     JButton restartButton = null;
46    
47     /**
48     * This is the default constructor. It should be only used be the eclipse VE
49     */
50     public XuluStarterClientPanel() {
51     super();
52     initialize();
53     }
54    
55     /**
56     * This method initializes this
57     *
58     * @return void
59     */
60     private void initialize() {
61     this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
62     this.setSize(248, 292);
63     this.add(getExecutionPanel(), null);
64     }
65    
66     /**
67     * This method initializes executionPanel
68     *
69     * @return javax.swing.JPanel
70     */
71     private JPanel getExecutionPanel() {
72     if (executionPanel == null) {
73     GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
74     gridBagConstraints1.gridx = 1;
75     gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
76     gridBagConstraints1.insets = new Insets(0, 5, 5, 5);
77     gridBagConstraints1.gridy = 4;
78     GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
79     gridBagConstraints12.gridx = 1;
80     gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
81     gridBagConstraints12.insets = new Insets(0, 5, 5, 5);
82     gridBagConstraints12.gridy = 3;
83     GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
84     gridBagConstraints11.fill = GridBagConstraints.BOTH;
85     gridBagConstraints11.weighty = 1.0;
86     gridBagConstraints11.gridx = 0;
87     gridBagConstraints11.gridy = 1;
88     gridBagConstraints11.ipadx = 0;
89     gridBagConstraints11.insets = new Insets(5, 5, 5, 5);
90     gridBagConstraints11.gridwidth = 2;
91     gridBagConstraints11.weightx = 1.0;
92     GridBagConstraints gridBagConstraints = new GridBagConstraints();
93     gridBagConstraints.insets = new Insets(0, 0, 0, 0);
94     gridBagConstraints.gridy = 0;
95     gridBagConstraints.anchor = GridBagConstraints.NORTH;
96     gridBagConstraints.gridheight = 1;
97     gridBagConstraints.gridwidth = 2;
98     gridBagConstraints.gridx = 0;
99     Steps = new JLabel();
100     Steps.setText("Potential Servers");
101     Steps.setName("Steps");
102     executionPanel = new JPanel();
103     executionPanel.setLayout(new GridBagLayout());
104     executionPanel.setBorder(new SoftBevelBorder(
105     SoftBevelBorder.LOWERED));
106     executionPanel.setVisible(true);
107     executionPanel.add(Steps, gridBagConstraints);
108     executionPanel.add(getJScrollPane1(), gridBagConstraints11);
109     executionPanel.add(getButtonPanel(), gridBagConstraints12);
110     executionPanel.add(getRefreshButton(), gridBagConstraints1);
111     }
112     return executionPanel;
113     }
114    
115     /**
116     * This method initializes jScrollPane1
117     *
118     * @return javax.swing.JScrollPane
119     */
120     private JScrollPane getJScrollPane1() {
121     if (jScrollPane1 == null) {
122     jScrollPane1 = new JScrollPane();
123     jScrollPane1.setName("jScrollPane1");
124     jScrollPane1.setViewportView(getServerList());
125     jScrollPane1.setPreferredSize(new Dimension(200, 250));
126     }
127     return jScrollPane1;
128     }
129    
130     /**
131     * This method initializes buttonPanel
132     *
133     * @return javax.swing.JPanel
134     */
135     protected JPanel getButtonPanel() {
136     if (buttonPanel == null) {
137     GridLayout gridLayout = new GridLayout();
138     gridLayout.setRows(1);
139     buttonPanel = new JPanel();
140     buttonPanel.setLayout(gridLayout);
141     buttonPanel.add(getStartButton(), null);
142     buttonPanel.add(getStopButton(), null);
143     buttonPanel.add(getRestartButton(), null);
144     }
145     return buttonPanel;
146     }
147    
148     /**
149     * This method initializes serverList
150     *
151     * @return javax.swing.JList
152     */
153     private JList getServerList() {
154     if (serverList == null) {
155     serverList = new JList();
156     serverList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
157     }
158     return serverList;
159     }
160    
161     /**
162     * This method initializes refreshButton
163     *
164     * @return javax.swing.JButton
165     */
166     private JButton getRefreshButton() {
167     if (refreshButton == null) {
168     refreshButton = new JButton();
169     refreshButton.setText("Refresh");
170     }
171     return refreshButton;
172     }
173    
174     /**
175     * This method initializes startButton
176     *
177     * @return javax.swing.JButton
178     */
179     private JButton getStartButton() {
180     if (startButton == null) {
181     startButton = new JButton();
182     startButton.setText("Start");
183     startButton.setName("startButton");
184     }
185     return startButton;
186     }
187    
188     /**
189     * This method initializes stopButton
190     *
191     * @return javax.swing.JButton
192     */
193     private JButton getStopButton() {
194     if (stopButton == null) {
195     stopButton = new JButton();
196     stopButton.setText("Stop");
197     stopButton.setName("stopButton");
198     }
199     return stopButton;
200     }
201    
202     /**
203     * This method initializes restartButton
204     *
205     * @return javax.swing.JButton
206     */
207     private JButton getRestartButton() {
208     if (restartButton == null) {
209     restartButton = new JButton();
210     restartButton.setText("Restart");
211     restartButton.setName("restartButton");
212     }
213     return restartButton;
214     }
215    
216 alfonx 78 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26