KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > wizards > WrapperPanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.web.wizards;
21
22 import org.openide.util.NbBundle;
23
24 /** A single panel for a wizard - the GUI portion.
25  *
26  * @author mk115033
27  */

28 public class WrapperPanel extends javax.swing.JPanel JavaDoc {
29
30     /** The wizard panel descriptor associated with this GUI panel.
31      * If you need to fire state changes or something similar, you can
32      * use this handle to do so.
33      */

34     private WrapperSelection wizardPanel;
35     /** Create the wizard panel and set up some basic properties. */
36     public WrapperPanel(WrapperSelection wizardPanel) {
37         this.wizardPanel=wizardPanel;
38         initComponents();
39         // Provide a name in the title bar.
40
setName(NbBundle.getMessage(WrapperPanel.class, "TITLE_wrapperPanel"));
41         /*
42         // Optional: provide a special description for this pane.
43         // You must have turned on WizardDescriptor.WizardPanel_helpDisplayed
44         // (see descriptor in standard iterator template for an example of this).
45         try {
46             putClientProperty ("WizardPanel_helpURL", // NOI18N
47                 new URL ("nbresloc:/org/netbeans/modules/web/wizards/WrapperPanelHelp.html")); // NOI18N
48         } catch (MalformedURLException mfue) {
49             throw new IllegalStateException (mfue.toString ());
50         }
51          */

52         // a11y part
53
getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(WrapperPanel.class, "A11Y_DESC_wrapperPanel"));
54         jCheckBox1.getAccessibleContext().setAccessibleName(jCheckBox1.getText());
55         jCheckBox1.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(WrapperPanel.class, "A11Y_DESC_wrapperPanel"));
56     }
57     
58     /** This method is called from within the constructor to
59      * initialize the form.
60      * WARNING: Do NOT modify this code. The content of this method is
61      * always regenerated by the Form Editor.
62      */

63     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
64
private void initComponents() {
65         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
66
67         jCheckBox1 = new javax.swing.JCheckBox JavaDoc();
68         jPanel1 = new javax.swing.JPanel JavaDoc();
69
70         setLayout(new java.awt.GridBagLayout JavaDoc());
71
72         setRequestFocusEnabled(false);
73         jCheckBox1.setMnemonic(org.openide.util.NbBundle.getMessage(WrapperPanel.class, "LBL_WebModule_Mnemonic").charAt(0));
74         jCheckBox1.setText(org.openide.util.NbBundle.getMessage(WrapperPanel.class, "OPT_FilterWrapper"));
75         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
76         gridBagConstraints.gridx = 0;
77         gridBagConstraints.gridy = 0;
78         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
79         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
80         gridBagConstraints.weightx = 1.0;
81         gridBagConstraints.insets = new java.awt.Insets JavaDoc(40, 10, 10, 0);
82         add(jCheckBox1, gridBagConstraints);
83
84         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
85         gridBagConstraints.gridx = 0;
86         gridBagConstraints.gridy = 1;
87         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
88         gridBagConstraints.weighty = 1.0;
89         add(jPanel1, gridBagConstraints);
90
91     }// </editor-fold>//GEN-END:initComponents
92

93     // Variables declaration - do not modify//GEN-BEGIN:variables
94
private javax.swing.JCheckBox JavaDoc jCheckBox1;
95     private javax.swing.JPanel JavaDoc jPanel1;
96     // End of variables declaration//GEN-END:variables
97

98     boolean isWrapper() {
99         return jCheckBox1.isSelected();
100     }
101
102 }
103
Popular Tags