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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26