001: /*
002: * Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
003: *
004: * Redistribution and use in source and binary forms, with or without
005: * modification, are permitted provided that the following conditions are met:
006: *
007: * * Redistributions of source code must retain the above copyright notice,
008: * this list of conditions and the following disclaimer.
009: *
010: * * Redistributions in binary form must reproduce the above copyright notice,
011: * this list of conditions and the following disclaimer in the documentation
012: * and/or other materials provided with the distribution.
013: *
014: * * Neither the name of Sun Microsystems, Inc. nor the names of its contributors
015: * may be used to endorse or promote products derived from this software without
016: * specific prior written permission.
017: *
018: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
019: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
020: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
021: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
022: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
023: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
024: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
025: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
026: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
027: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
028: * THE POSSIBILITY OF SUCH DAMAGE.
029: */
030:
031: package examples;
032:
033: public class Antenna extends javax.swing.JFrame {
034:
035: /** Creates new form Antenna */
036: public Antenna() {
037: initComponents();
038: }
039:
040: /** This method is called from within the constructor to
041: * initialize the form.
042: * WARNING: Do NOT modify this code. The content of this method is
043: * always regenerated by the Form Editor.
044: */
045: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
046: private void initComponents() {
047: jPanel1 = new javax.swing.JPanel();
048: jLabel1 = new javax.swing.JLabel();
049: jLabel2 = new javax.swing.JLabel();
050: jTextField1 = new javax.swing.JTextField();
051: jTextField2 = new javax.swing.JTextField();
052: jCheckBox1 = new javax.swing.JCheckBox();
053: jPanel2 = new javax.swing.JPanel();
054: jLabel3 = new javax.swing.JLabel();
055: jLabel4 = new javax.swing.JLabel();
056: jLabel5 = new javax.swing.JLabel();
057: jLabel6 = new javax.swing.JLabel();
058: jLabel7 = new javax.swing.JLabel();
059: jTextField3 = new javax.swing.JTextField();
060: jLabel8 = new javax.swing.JLabel();
061: jTextField4 = new javax.swing.JTextField();
062: jComboBox1 = new javax.swing.JComboBox();
063: jTextField5 = new javax.swing.JTextField();
064: jLabel9 = new javax.swing.JLabel();
065: jTextField6 = new javax.swing.JTextField();
066: jButton1 = new javax.swing.JButton();
067: jTextField8 = new javax.swing.JTextField();
068: jLabel10 = new javax.swing.JLabel();
069: jTextField9 = new javax.swing.JTextField();
070: jButton2 = new javax.swing.JButton();
071: jComboBox2 = new javax.swing.JComboBox();
072: jButton5 = new javax.swing.JButton();
073: jButton3 = new javax.swing.JButton();
074: jButton4 = new javax.swing.JButton();
075:
076: setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
077: setTitle("Antenna");
078: jPanel1.setBorder(javax.swing.BorderFactory
079: .createTitledBorder(" Position/Direction "));
080: jLabel1.setText("Direction [\u00b0]:");
081:
082: jLabel2.setText("Height [m]:");
083:
084: jTextField1.setText("140.000");
085:
086: jTextField2.setText("110.000");
087:
088: jCheckBox1.setText("Height is Lower Edge (Not Center)");
089: jCheckBox1.setBorder(javax.swing.BorderFactory
090: .createEmptyBorder(0, 0, 0, 0));
091: jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
092:
093: org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(
094: jPanel1);
095: jPanel1.setLayout(jPanel1Layout);
096: jPanel1Layout
097: .setHorizontalGroup(jPanel1Layout
098: .createParallelGroup(
099: org.jdesktop.layout.GroupLayout.LEADING)
100: .add(
101: jPanel1Layout
102: .createSequentialGroup()
103: .addContainerGap()
104: .add(
105: jPanel1Layout
106: .createParallelGroup(
107: org.jdesktop.layout.GroupLayout.TRAILING)
108: .add(jLabel2)
109: .add(jLabel1))
110: .addPreferredGap(
111: org.jdesktop.layout.LayoutStyle.RELATED)
112: .add(
113: jPanel1Layout
114: .createParallelGroup(
115: org.jdesktop.layout.GroupLayout.LEADING)
116: .add(jCheckBox1)
117: .add(
118: jTextField2,
119: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
120: 376,
121: Short.MAX_VALUE)
122: .add(
123: jTextField1,
124: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
125: 376,
126: Short.MAX_VALUE))
127: .addContainerGap()));
128: jPanel1Layout
129: .setVerticalGroup(jPanel1Layout
130: .createParallelGroup(
131: org.jdesktop.layout.GroupLayout.LEADING)
132: .add(
133: jPanel1Layout
134: .createSequentialGroup()
135: .add(
136: jPanel1Layout
137: .createParallelGroup(
138: org.jdesktop.layout.GroupLayout.BASELINE)
139: .add(jLabel1)
140: .add(
141: jTextField1,
142: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
143: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
144: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
145: .addPreferredGap(
146: org.jdesktop.layout.LayoutStyle.RELATED)
147: .add(
148: jPanel1Layout
149: .createParallelGroup(
150: org.jdesktop.layout.GroupLayout.BASELINE)
151: .add(jLabel2)
152: .add(
153: jTextField2,
154: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
155: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
156: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
157: .addPreferredGap(
158: org.jdesktop.layout.LayoutStyle.RELATED)
159: .add(jCheckBox1)
160: .addContainerGap(
161: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
162: Short.MAX_VALUE)));
163:
164: jPanel2.setBorder(javax.swing.BorderFactory
165: .createTitledBorder(" System "));
166: jLabel3.setText("Channels:");
167:
168: jLabel4.setText("Antenna Type:");
169:
170: jLabel5.setText("Electrical Downtilt From [\u00b0]:");
171:
172: jLabel6.setText("Polarization:");
173:
174: jLabel7.setText("Frequency From [MHz]:");
175:
176: jTextField3.setText("2");
177:
178: jLabel8.setText("Watts:");
179:
180: jTextField4.setText("12.000");
181:
182: jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(
183: new String[] { "Kathrein 742151" }));
184:
185: jTextField5.setText("0.000");
186:
187: jLabel9.setText("To:");
188:
189: jTextField6.setText("10.000");
190:
191: jButton1.setText("Adjust");
192:
193: jTextField8.setText("943.000");
194:
195: jLabel10.setText("To:");
196:
197: jTextField9.setText("951.000");
198:
199: jButton2.setText("Adjust");
200:
201: jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(
202: new String[] { "X +45\u00b0" }));
203:
204: jButton5.setText("Adjust");
205:
206: org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(
207: jPanel2);
208: jPanel2.setLayout(jPanel2Layout);
209: jPanel2Layout
210: .setHorizontalGroup(jPanel2Layout
211: .createParallelGroup(
212: org.jdesktop.layout.GroupLayout.LEADING)
213: .add(
214: jPanel2Layout
215: .createSequentialGroup()
216: .addContainerGap()
217: .add(
218: jPanel2Layout
219: .createParallelGroup(
220: org.jdesktop.layout.GroupLayout.LEADING)
221: .add(
222: org.jdesktop.layout.GroupLayout.TRAILING,
223: jLabel7)
224: .add(
225: org.jdesktop.layout.GroupLayout.TRAILING,
226: jLabel6)
227: .add(
228: org.jdesktop.layout.GroupLayout.TRAILING,
229: jLabel5)
230: .add(
231: org.jdesktop.layout.GroupLayout.TRAILING,
232: jLabel4)
233: .add(
234: org.jdesktop.layout.GroupLayout.TRAILING,
235: jLabel3))
236: .addPreferredGap(
237: org.jdesktop.layout.LayoutStyle.RELATED)
238: .add(
239: jPanel2Layout
240: .createParallelGroup(
241: org.jdesktop.layout.GroupLayout.LEADING)
242: .add(
243: jComboBox1,
244: 0,
245: 307,
246: Short.MAX_VALUE)
247: .add(
248: jPanel2Layout
249: .createSequentialGroup()
250: .add(
251: jPanel2Layout
252: .createParallelGroup(
253: org.jdesktop.layout.GroupLayout.LEADING)
254: .add(
255: jTextField8,
256: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
257: 98,
258: Short.MAX_VALUE)
259: .add(
260: jTextField5,
261: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
262: 98,
263: Short.MAX_VALUE)
264: .add(
265: jTextField3,
266: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
267: 98,
268: Short.MAX_VALUE))
269: .addPreferredGap(
270: org.jdesktop.layout.LayoutStyle.RELATED)
271: .add(
272: jPanel2Layout
273: .createParallelGroup(
274: org.jdesktop.layout.GroupLayout.TRAILING)
275: .add(
276: jLabel8)
277: .add(
278: jLabel9)
279: .add(
280: jLabel10))
281: .addPreferredGap(
282: org.jdesktop.layout.LayoutStyle.RELATED)
283: .add(
284: jPanel2Layout
285: .createParallelGroup(
286: org.jdesktop.layout.GroupLayout.LEADING)
287: .add(
288: org.jdesktop.layout.GroupLayout.TRAILING,
289: jTextField4,
290: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
291: 97,
292: Short.MAX_VALUE)
293: .add(
294: org.jdesktop.layout.GroupLayout.TRAILING,
295: jTextField6,
296: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
297: 97,
298: Short.MAX_VALUE)
299: .add(
300: org.jdesktop.layout.GroupLayout.TRAILING,
301: jTextField9,
302: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
303: 97,
304: Short.MAX_VALUE))
305: .addPreferredGap(
306: org.jdesktop.layout.LayoutStyle.RELATED)
307: .add(
308: jPanel2Layout
309: .createParallelGroup(
310: org.jdesktop.layout.GroupLayout.LEADING)
311: .add(
312: jButton5)
313: .add(
314: jButton1)
315: .add(
316: jButton2)))
317: .add(
318: jComboBox2,
319: 0,
320: 307,
321: Short.MAX_VALUE))
322: .addContainerGap()));
323: jPanel2Layout
324: .setVerticalGroup(jPanel2Layout
325: .createParallelGroup(
326: org.jdesktop.layout.GroupLayout.LEADING)
327: .add(
328: jPanel2Layout
329: .createSequentialGroup()
330: .add(
331: jPanel2Layout
332: .createParallelGroup(
333: org.jdesktop.layout.GroupLayout.BASELINE)
334: .add(jLabel3)
335: .add(
336: jTextField3,
337: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
338: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
339: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
340: .add(jLabel8)
341: .add(
342: jTextField4,
343: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
344: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
345: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
346: .add(jButton5))
347: .addPreferredGap(
348: org.jdesktop.layout.LayoutStyle.RELATED)
349: .add(
350: jPanel2Layout
351: .createParallelGroup(
352: org.jdesktop.layout.GroupLayout.BASELINE)
353: .add(jLabel4)
354: .add(
355: jComboBox1,
356: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
357: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
358: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
359: .addPreferredGap(
360: org.jdesktop.layout.LayoutStyle.RELATED)
361: .add(
362: jPanel2Layout
363: .createParallelGroup(
364: org.jdesktop.layout.GroupLayout.BASELINE)
365: .add(jLabel5)
366: .add(
367: jTextField5,
368: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
369: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
370: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
371: .add(jButton1)
372: .add(
373: jTextField6,
374: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
375: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
376: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
377: .add(jLabel9))
378: .addPreferredGap(
379: org.jdesktop.layout.LayoutStyle.RELATED)
380: .add(
381: jPanel2Layout
382: .createParallelGroup(
383: org.jdesktop.layout.GroupLayout.BASELINE)
384: .add(jLabel6)
385: .add(
386: jComboBox2,
387: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
388: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
389: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
390: .addPreferredGap(
391: org.jdesktop.layout.LayoutStyle.RELATED)
392: .add(
393: jPanel2Layout
394: .createParallelGroup(
395: org.jdesktop.layout.GroupLayout.BASELINE)
396: .add(jLabel7)
397: .add(
398: jTextField8,
399: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
400: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
401: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
402: .add(jButton2)
403: .add(
404: jTextField9,
405: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
406: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
407: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
408: .add(jLabel10))
409: .addContainerGap(
410: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
411: Short.MAX_VALUE)));
412:
413: jButton3.setText("Cancel");
414:
415: jButton4.setText("OK");
416:
417: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
418: getContentPane());
419: getContentPane().setLayout(layout);
420: layout
421: .setHorizontalGroup(layout
422: .createParallelGroup(
423: org.jdesktop.layout.GroupLayout.LEADING)
424: .add(
425: layout
426: .createSequentialGroup()
427: .addContainerGap()
428: .add(
429: layout
430: .createParallelGroup(
431: org.jdesktop.layout.GroupLayout.LEADING)
432: .add(
433: jPanel2,
434: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
435: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
436: Short.MAX_VALUE)
437: .add(
438: jPanel1,
439: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
440: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
441: Short.MAX_VALUE)
442: .add(
443: org.jdesktop.layout.GroupLayout.TRAILING,
444: layout
445: .createSequentialGroup()
446: .add(
447: jButton4)
448: .addPreferredGap(
449: org.jdesktop.layout.LayoutStyle.RELATED)
450: .add(
451: jButton3)))
452: .addContainerGap()));
453:
454: layout.linkSize(
455: new java.awt.Component[] { jButton3, jButton4 },
456: org.jdesktop.layout.GroupLayout.HORIZONTAL);
457:
458: layout
459: .setVerticalGroup(layout
460: .createParallelGroup(
461: org.jdesktop.layout.GroupLayout.LEADING)
462: .add(
463: layout
464: .createSequentialGroup()
465: .addContainerGap()
466: .add(
467: jPanel1,
468: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
469: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
470: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
471: .addPreferredGap(
472: org.jdesktop.layout.LayoutStyle.RELATED)
473: .add(
474: jPanel2,
475: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
476: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
477: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
478: .addPreferredGap(
479: org.jdesktop.layout.LayoutStyle.RELATED,
480: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
481: Short.MAX_VALUE)
482: .add(
483: layout
484: .createParallelGroup(
485: org.jdesktop.layout.GroupLayout.BASELINE)
486: .add(jButton3)
487: .add(jButton4))
488: .addContainerGap()));
489: pack();
490: }// </editor-fold>//GEN-END:initComponents
491:
492: /**
493: * @param args the command line arguments
494: */
495: public static void main(String args[]) {
496: java.awt.EventQueue.invokeLater(new Runnable() {
497: public void run() {
498: new Antenna().setVisible(true);
499: }
500: });
501: }
502:
503: // Variables declaration - do not modify//GEN-BEGIN:variables
504: private javax.swing.JButton jButton1;
505: private javax.swing.JButton jButton2;
506: private javax.swing.JButton jButton3;
507: private javax.swing.JButton jButton4;
508: private javax.swing.JButton jButton5;
509: private javax.swing.JCheckBox jCheckBox1;
510: private javax.swing.JComboBox jComboBox1;
511: private javax.swing.JComboBox jComboBox2;
512: private javax.swing.JLabel jLabel1;
513: private javax.swing.JLabel jLabel10;
514: private javax.swing.JLabel jLabel2;
515: private javax.swing.JLabel jLabel3;
516: private javax.swing.JLabel jLabel4;
517: private javax.swing.JLabel jLabel5;
518: private javax.swing.JLabel jLabel6;
519: private javax.swing.JLabel jLabel7;
520: private javax.swing.JLabel jLabel8;
521: private javax.swing.JLabel jLabel9;
522: private javax.swing.JPanel jPanel1;
523: private javax.swing.JPanel jPanel2;
524: private javax.swing.JTextField jTextField1;
525: private javax.swing.JTextField jTextField2;
526: private javax.swing.JTextField jTextField3;
527: private javax.swing.JTextField jTextField4;
528: private javax.swing.JTextField jTextField5;
529: private javax.swing.JTextField jTextField6;
530: private javax.swing.JTextField jTextField8;
531: private javax.swing.JTextField jTextField9;
532: // End of variables declaration//GEN-END:variables
533:
534: }
|