1   package org.wcb.gui.forms.wizard;
2   
3   import org.wcb.gui.component.JXTitlePanel;
4   import org.jdesktop.swingx.border.DropShadowBorder;
5   
6   import javax.swing.border.Border;
7   import javax.swing.border.CompoundBorder;
8   import javax.swing.*;
9   import java.awt.*;
10  
11  /**
12   * <small>
13   * <p/>
14   * Copyright (C)  2006  wbogaardt.
15   * This library is free software; you can redistribute it and/or
16   * modify it under the terms of the GNU Lesser General Public
17   * License as published by the Free Software Foundation; either
18   * version 2.1 of the License, or (at your option) any later version.
19   * <p/>
20   * This library is distributed in the hope that it will be useful,
21   * but WITHOUT ANY WARRANTY; without even the implied warranty of
22   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23   * Lesser General Public License for more details.
24   * <p/>
25   * You should have received a copy of the GNU Lesser General Public
26   * License along with this library; if not, write to the Free Software
27   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
28   * <p/>
29   * $File:  $ <br>
30   * $Change:  $ submitted by $Author: wbogaardt $ at $DateTime: Oct 26, 2006 2:43:12 PM $ <br>
31   * </small>
32   *
33   * @author wbogaardt
34   *         Wizard step 1 type of application the applicant is applying for.
35   */
36  
37  public class Step1of8710Wizard extends JXTitlePanel {
38  
39      public Step1of8710Wizard() {
40          super("Step 1 of 6 - Select Application", new Color(0x3779ff));
41          Border shadow = new DropShadowBorder(Color.BLACK, 1, 5, .3f, 15, true, true, true, true);
42          setBorder(new CompoundBorder(shadow, getBorder()));
43          initComponents();
44      }
45  
46      /** This method is called from within the constructor to
47       * initialize the form.
48       * WARNING: Do NOT modify this code. The content of this method is
49       * always regenerated by the Form Editor.
50       */
51      private void initComponents() {
52          java.awt.GridBagConstraints gridBagConstraints;
53          studentCb = new JCheckBox();
54          recreationalCb = new JCheckBox();
55          privateCb = new JCheckBox();
56          commercialCb = new JCheckBox();
57          airlineTransportCb = new JCheckBox();
58          instrumentCb = new JCheckBox();
59          additionalRatingCb = new JCheckBox();
60          airplaneSingleCb = new JCheckBox();
61          airplaneMultiCb = new JCheckBox();
62          rotocraftCb = new JCheckBox();
63          balloonCb = new JCheckBox();
64          airshipCb = new JCheckBox();
65          gliderCb = new JCheckBox();
66          poweredLiftCb = new JCheckBox();
67  
68          setLayout(new java.awt.GridBagLayout());
69  
70          studentCb.setText("Student");
71          studentCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
72          studentCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
73          gridBagConstraints = new java.awt.GridBagConstraints();
74          gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
75          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
76          add(studentCb, gridBagConstraints);
77  
78          recreationalCb.setText("Recreational");
79          recreationalCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
80          recreationalCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
81          gridBagConstraints = new java.awt.GridBagConstraints();
82          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
83          add(recreationalCb, gridBagConstraints);
84  
85          privateCb.setText("Private");
86          privateCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
87          privateCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
88          gridBagConstraints = new java.awt.GridBagConstraints();
89          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
90          add(privateCb, gridBagConstraints);
91  
92          commercialCb.setText("Commercial");
93          commercialCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
94          commercialCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
95          gridBagConstraints = new java.awt.GridBagConstraints();
96          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
97          gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);
98          add(commercialCb, gridBagConstraints);
99  
100         airlineTransportCb.setText("Airline Transport");
101         airlineTransportCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
102         airlineTransportCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
103         gridBagConstraints = new java.awt.GridBagConstraints();
104         gridBagConstraints.gridwidth = 2;
105         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
106         gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);
107         add(airlineTransportCb, gridBagConstraints);
108 
109         instrumentCb.setText("Instrument");
110         instrumentCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
111         instrumentCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
112         gridBagConstraints = new java.awt.GridBagConstraints();
113         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
114         add(instrumentCb, gridBagConstraints);
115 
116         additionalRatingCb.setText("Additional Rating");
117         additionalRatingCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
118         additionalRatingCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
119         gridBagConstraints = new java.awt.GridBagConstraints();
120         gridBagConstraints.gridx = 0;
121         gridBagConstraints.gridy = 1;
122         gridBagConstraints.gridwidth = 7;
123         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
124         gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
125         add(additionalRatingCb, gridBagConstraints);
126 
127         airplaneSingleCb.setText("Airplane Single-Engine");
128         airplaneSingleCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
129         airplaneSingleCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
130         gridBagConstraints = new java.awt.GridBagConstraints();
131         gridBagConstraints.gridx = 0;
132         gridBagConstraints.gridy = 2;
133         add(airplaneSingleCb, gridBagConstraints);
134 
135         airplaneMultiCb.setText("Airplane Multiengine");
136         airplaneMultiCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
137         airplaneMultiCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
138         gridBagConstraints = new java.awt.GridBagConstraints();
139         gridBagConstraints.gridx = 1;
140         gridBagConstraints.gridy = 2;
141         add(airplaneMultiCb, gridBagConstraints);
142 
143         rotocraftCb.setText("Rotocraft");
144         rotocraftCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
145         rotocraftCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
146         gridBagConstraints = new java.awt.GridBagConstraints();
147         gridBagConstraints.gridx = 2;
148         gridBagConstraints.gridy = 2;
149         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
150         add(rotocraftCb, gridBagConstraints);
151 
152         balloonCb.setText("Balloon");
153         balloonCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
154         balloonCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
155         gridBagConstraints = new java.awt.GridBagConstraints();
156         gridBagConstraints.gridx = 3;
157         gridBagConstraints.gridy = 2;
158         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
159         add(balloonCb, gridBagConstraints);
160 
161         airshipCb.setText("Airship");
162         airshipCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
163         airshipCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
164         gridBagConstraints = new java.awt.GridBagConstraints();
165         gridBagConstraints.gridx = 4;
166         gridBagConstraints.gridy = 2;
167         add(airshipCb, gridBagConstraints);
168 
169         gliderCb.setText("Glider");
170         gliderCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
171         gliderCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
172         gridBagConstraints = new java.awt.GridBagConstraints();
173         gridBagConstraints.gridx = 5;
174         gridBagConstraints.gridy = 2;
175         add(gliderCb, gridBagConstraints);
176 
177         poweredLiftCb.setText("Powered-Lift");
178         poweredLiftCb.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
179         poweredLiftCb.setMargin(new java.awt.Insets(0, 0, 0, 0));
180         gridBagConstraints = new java.awt.GridBagConstraints();
181         gridBagConstraints.gridx = 6;
182         gridBagConstraints.gridy = 2;
183         add(poweredLiftCb, gridBagConstraints);
184 
185     }
186 
187     public boolean isAdditionalRating() {
188         return additionalRatingCb.isSelected();
189     }
190 
191     public boolean isAirlineTransport() {
192         return airlineTransportCb.isSelected();
193     }
194 
195     public boolean isStudent() {
196         return studentCb.isSelected();
197     }
198 
199     public boolean isPrivate() {
200         return privateCb.isSelected();
201     }
202 
203     public boolean isRecreationalPilot() {
204         return recreationalCb.isSelected();
205     }
206 
207     public boolean isInstrumentRating() {
208         return instrumentCb.isSelected();
209     }
210 
211     public boolean isCommercialPilot() {
212         return commercialCb.isSelected();
213     }
214 
215     public boolean isGliderPilot() {
216         return gliderCb.isSelected();
217     }
218 
219     public boolean isAirplaneSEL(){
220         return airplaneSingleCb.isSelected();
221     }
222 
223     public boolean isAirplaneMEL() {
224         return airplaneMultiCb.isSelected();
225     }
226 
227     public boolean isAirshipRating() {
228         return airshipCb.isSelected();
229     }
230 
231     public boolean isBalloonRating() {
232         return balloonCb.isSelected();
233     }
234 
235     public boolean isRotocraft() {
236         return rotocraftCb.isSelected();
237     }
238 
239     public boolean isPoweredLift() {
240         return poweredLiftCb.isSelected();
241     }
242 
243     // Variables declaration - do not modify
244     private JCheckBox additionalRatingCb;
245     private JCheckBox airlineTransportCb;
246     private JCheckBox airplaneMultiCb;
247     private JCheckBox airplaneSingleCb;
248     private JCheckBox airshipCb;
249     private JCheckBox balloonCb;
250     private JCheckBox commercialCb;
251     private JCheckBox gliderCb;
252     private JCheckBox instrumentCb;
253     private JCheckBox poweredLiftCb;
254     private JCheckBox privateCb;
255     private JCheckBox recreationalCb;
256     private JCheckBox rotocraftCb;
257     private JCheckBox studentCb;
258     // End of variables declaration
259 
260 }