00001 package theba.core;
00002
00003 import java.awt.BorderLayout;
00004 import java.awt.Container;
00005 import java.awt.Dialog;
00006 import java.awt.Frame;
00007 import java.awt.GridBagConstraints;
00008 import java.awt.GridBagLayout;
00009
00010 import javax.swing.JButton;
00011 import javax.swing.JCheckBox;
00012 import javax.swing.JDialog;
00013 import javax.swing.JLabel;
00014 import javax.swing.JPanel;
00015 import javax.swing.JTextField;
00016 import javax.swing.border.EmptyBorder;
00017
00021 public class FindRegionDialog extends JDialog {
00025 private static final long serialVersionUID = 1L;
00026
00027 public FindRegionDialog(Frame owner) {
00028 super(owner);
00029 initComponents();
00030 }
00031
00032 public FindRegionDialog(Dialog owner) {
00033 super(owner);
00034 initComponents();
00035 }
00036
00037 private void initComponents() {
00038
00039
00040
00041 dialogPane = new JPanel();
00042 contentPane = new JPanel();
00043 label2 = new JLabel();
00044 label1 = new JLabel();
00045 label3 = new JLabel();
00046 label9 = new JLabel();
00047 textField1 = new JTextField();
00048 textField2 = new JTextField();
00049 checkBox1 = new JCheckBox();
00050 label4 = new JLabel();
00051 textField3 = new JTextField();
00052 textField4 = new JTextField();
00053 checkBox2 = new JCheckBox();
00054 label5 = new JLabel();
00055 textField5 = new JTextField();
00056 textField6 = new JTextField();
00057 checkBox3 = new JCheckBox();
00058 label6 = new JLabel();
00059 textField7 = new JTextField();
00060 textField8 = new JTextField();
00061 checkBox4 = new JCheckBox();
00062 label7 = new JLabel();
00063 textField9 = new JTextField();
00064 textField10 = new JTextField();
00065 checkBox5 = new JCheckBox();
00066 label8 = new JLabel();
00067 buttonBar = new JPanel();
00068 okButton = new JButton();
00069 cancelButton = new JButton();
00070 GridBagConstraints gbc;
00071
00072
00073 setTitle("Find regions");
00074 Container contentPane2 = getContentPane();
00075 contentPane2.setLayout(new BorderLayout());
00076
00077
00078 {
00079 dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
00080
00081
00082 dialogPane
00083 .setBorder(new javax.swing.border.CompoundBorder(
00084 new javax.swing.border.TitledBorder(
00085 new javax.swing.border.EmptyBorder(0, 0, 0,
00086 0), "JFormDesigner Evaluation",
00087 javax.swing.border.TitledBorder.CENTER,
00088 javax.swing.border.TitledBorder.BOTTOM,
00089 new java.awt.Font("Dialog",
00090 java.awt.Font.BOLD, 12),
00091 java.awt.Color.red), dialogPane.getBorder()));
00092
00093 dialogPane.setLayout(new BorderLayout());
00094
00095
00096 {
00097 contentPane.setLayout(new GridBagLayout());
00098 ((GridBagLayout) contentPane.getLayout()).columnWidths = new int[] {
00099 0, 0, 0, 0, 0 };
00100 ((GridBagLayout) contentPane.getLayout()).rowHeights = new int[] {
00101 0, 0, 0, 0, 0, 0, 0, 0 };
00102 ((GridBagLayout) contentPane.getLayout()).columnWeights = new double[] {
00103 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
00104 ((GridBagLayout) contentPane.getLayout()).rowWeights = new double[] {
00105 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
00106
00107
00108 label2.setText("Pixelcount");
00109 gbc = new GridBagConstraints();
00110 gbc.gridx = 0;
00111 gbc.gridy = 1;
00112 gbc.fill = GridBagConstraints.BOTH;
00113 gbc.insets.bottom = 7;
00114 gbc.insets.right = 7;
00115 contentPane.add(label2, gbc);
00116
00117
00118 label1.setText("Max val");
00119 gbc = new GridBagConstraints();
00120 gbc.gridx = 1;
00121 gbc.gridy = 0;
00122 gbc.fill = GridBagConstraints.BOTH;
00123 gbc.insets.bottom = 7;
00124 gbc.insets.right = 7;
00125 contentPane.add(label1, gbc);
00126
00127
00128 label3.setText("Min val");
00129 gbc = new GridBagConstraints();
00130 gbc.gridx = 2;
00131 gbc.gridy = 0;
00132 gbc.fill = GridBagConstraints.BOTH;
00133 gbc.insets.bottom = 7;
00134 gbc.insets.right = 7;
00135 contentPane.add(label3, gbc);
00136
00137
00138 label9.setText("Enable");
00139 gbc = new GridBagConstraints();
00140 gbc.gridx = 3;
00141 gbc.gridy = 0;
00142 gbc.fill = GridBagConstraints.BOTH;
00143 gbc.insets.bottom = 7;
00144 contentPane.add(label9, gbc);
00145
00146
00147 textField1.setColumns(6);
00148 gbc = new GridBagConstraints();
00149 gbc.gridx = 1;
00150 gbc.gridy = 1;
00151 gbc.fill = GridBagConstraints.BOTH;
00152 gbc.insets.bottom = 7;
00153 gbc.insets.right = 7;
00154 contentPane.add(textField1, gbc);
00155
00156
00157 textField2.setColumns(6);
00158 gbc = new GridBagConstraints();
00159 gbc.gridx = 2;
00160 gbc.gridy = 1;
00161 gbc.fill = GridBagConstraints.BOTH;
00162 gbc.insets.bottom = 7;
00163 gbc.insets.right = 7;
00164 contentPane.add(textField2, gbc);
00165 gbc = new GridBagConstraints();
00166 gbc.gridx = 3;
00167 gbc.gridy = 1;
00168 gbc.fill = GridBagConstraints.BOTH;
00169 gbc.insets.bottom = 7;
00170 contentPane.add(checkBox1, gbc);
00171
00172
00173 label4.setText("Circularity");
00174 gbc = new GridBagConstraints();
00175 gbc.gridx = 0;
00176 gbc.gridy = 2;
00177 gbc.fill = GridBagConstraints.BOTH;
00178 gbc.insets.bottom = 7;
00179 gbc.insets.right = 7;
00180 contentPane.add(label4, gbc);
00181 gbc = new GridBagConstraints();
00182 gbc.gridx = 1;
00183 gbc.gridy = 2;
00184 gbc.fill = GridBagConstraints.BOTH;
00185 gbc.insets.bottom = 7;
00186 gbc.insets.right = 7;
00187 contentPane.add(textField3, gbc);
00188 gbc = new GridBagConstraints();
00189 gbc.gridx = 2;
00190 gbc.gridy = 2;
00191 gbc.fill = GridBagConstraints.BOTH;
00192 gbc.insets.bottom = 7;
00193 gbc.insets.right = 7;
00194 contentPane.add(textField4, gbc);
00195 gbc = new GridBagConstraints();
00196 gbc.gridx = 3;
00197 gbc.gridy = 2;
00198 gbc.fill = GridBagConstraints.BOTH;
00199 gbc.insets.bottom = 7;
00200 contentPane.add(checkBox2, gbc);
00201
00202
00203 label5.setText("Curvature");
00204 gbc = new GridBagConstraints();
00205 gbc.gridx = 0;
00206 gbc.gridy = 3;
00207 gbc.fill = GridBagConstraints.BOTH;
00208 gbc.insets.bottom = 7;
00209 gbc.insets.right = 7;
00210 contentPane.add(label5, gbc);
00211 gbc = new GridBagConstraints();
00212 gbc.gridx = 1;
00213 gbc.gridy = 3;
00214 gbc.fill = GridBagConstraints.BOTH;
00215 gbc.insets.bottom = 7;
00216 gbc.insets.right = 7;
00217 contentPane.add(textField5, gbc);
00218 gbc = new GridBagConstraints();
00219 gbc.gridx = 2;
00220 gbc.gridy = 3;
00221 gbc.fill = GridBagConstraints.BOTH;
00222 gbc.insets.bottom = 7;
00223 gbc.insets.right = 7;
00224 contentPane.add(textField6, gbc);
00225 gbc = new GridBagConstraints();
00226 gbc.gridx = 3;
00227 gbc.gridy = 3;
00228 gbc.fill = GridBagConstraints.BOTH;
00229 gbc.insets.bottom = 7;
00230 contentPane.add(checkBox3, gbc);
00231
00232
00233 label6.setText("Ecentricity");
00234 gbc = new GridBagConstraints();
00235 gbc.gridx = 0;
00236 gbc.gridy = 4;
00237 gbc.fill = GridBagConstraints.BOTH;
00238 gbc.insets.bottom = 7;
00239 gbc.insets.right = 7;
00240 contentPane.add(label6, gbc);
00241 gbc = new GridBagConstraints();
00242 gbc.gridx = 1;
00243 gbc.gridy = 4;
00244 gbc.fill = GridBagConstraints.BOTH;
00245 gbc.insets.bottom = 7;
00246 gbc.insets.right = 7;
00247 contentPane.add(textField7, gbc);
00248 gbc = new GridBagConstraints();
00249 gbc.gridx = 2;
00250 gbc.gridy = 4;
00251 gbc.fill = GridBagConstraints.BOTH;
00252 gbc.insets.bottom = 7;
00253 gbc.insets.right = 7;
00254 contentPane.add(textField8, gbc);
00255 gbc = new GridBagConstraints();
00256 gbc.gridx = 3;
00257 gbc.gridy = 4;
00258 gbc.fill = GridBagConstraints.BOTH;
00259 gbc.insets.bottom = 7;
00260 contentPane.add(checkBox4, gbc);
00261
00262
00263 label7.setText("Convexity");
00264 gbc = new GridBagConstraints();
00265 gbc.gridx = 0;
00266 gbc.gridy = 5;
00267 gbc.fill = GridBagConstraints.BOTH;
00268 gbc.insets.bottom = 7;
00269 gbc.insets.right = 7;
00270 contentPane.add(label7, gbc);
00271 gbc = new GridBagConstraints();
00272 gbc.gridx = 1;
00273 gbc.gridy = 5;
00274 gbc.fill = GridBagConstraints.BOTH;
00275 gbc.insets.bottom = 7;
00276 gbc.insets.right = 7;
00277 contentPane.add(textField9, gbc);
00278 gbc = new GridBagConstraints();
00279 gbc.gridx = 2;
00280 gbc.gridy = 5;
00281 gbc.fill = GridBagConstraints.BOTH;
00282 gbc.insets.bottom = 7;
00283 gbc.insets.right = 7;
00284 contentPane.add(textField10, gbc);
00285 gbc = new GridBagConstraints();
00286 gbc.gridx = 3;
00287 gbc.gridy = 5;
00288 gbc.fill = GridBagConstraints.BOTH;
00289 gbc.insets.bottom = 7;
00290 contentPane.add(checkBox5, gbc);
00291
00292
00293 label8.setText("Solidity");
00294 gbc = new GridBagConstraints();
00295 gbc.gridx = 0;
00296 gbc.gridy = 6;
00297 gbc.fill = GridBagConstraints.BOTH;
00298 gbc.insets.right = 7;
00299 contentPane.add(label8, gbc);
00300 }
00301 dialogPane.add(contentPane, BorderLayout.CENTER);
00302
00303
00304 {
00305 buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0));
00306 buttonBar.setLayout(new GridBagLayout());
00307 ((GridBagLayout) buttonBar.getLayout()).columnWidths = new int[] {
00308 0, 85, 80 };
00309 ((GridBagLayout) buttonBar.getLayout()).columnWeights = new double[] {
00310 1.0, 0.0, 0.0 };
00311
00312
00313 okButton.setText("OK");
00314 gbc = new GridBagConstraints();
00315 gbc.gridx = 1;
00316 gbc.gridy = 0;
00317 gbc.fill = GridBagConstraints.BOTH;
00318 gbc.insets.right = 5;
00319 buttonBar.add(okButton, gbc);
00320
00321
00322 cancelButton.setText("Cancel");
00323 gbc = new GridBagConstraints();
00324 gbc.gridx = 2;
00325 gbc.gridy = 0;
00326 gbc.fill = GridBagConstraints.BOTH;
00327 buttonBar.add(cancelButton, gbc);
00328 }
00329 dialogPane.add(buttonBar, BorderLayout.SOUTH);
00330 }
00331 contentPane2.add(dialogPane, BorderLayout.CENTER);
00332
00333
00334 }
00335
00336
00337
00338
00339 private JPanel dialogPane;
00340
00341 private JPanel contentPane;
00342
00343 private JLabel label2;
00344
00345 private JLabel label1;
00346
00347 private JLabel label3;
00348
00349 private JLabel label9;
00350
00351 private JTextField textField1;
00352
00353 private JTextField textField2;
00354
00355 private JCheckBox checkBox1;
00356
00357 private JLabel label4;
00358
00359 private JTextField textField3;
00360
00361 private JTextField textField4;
00362
00363 private JCheckBox checkBox2;
00364
00365 private JLabel label5;
00366
00367 private JTextField textField5;
00368
00369 private JTextField textField6;
00370
00371 private JCheckBox checkBox3;
00372
00373 private JLabel label6;
00374
00375 private JTextField textField7;
00376
00377 private JTextField textField8;
00378
00379 private JCheckBox checkBox4;
00380
00381 private JLabel label7;
00382
00383 private JTextField textField9;
00384
00385 private JTextField textField10;
00386
00387 private JCheckBox checkBox5;
00388
00389 private JLabel label8;
00390
00391 private JPanel buttonBar;
00392
00393 private JButton okButton;
00394
00395 private JButton cancelButton;
00396
00397 }