001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.web.examples;
043:
044: import org.netbeans.modules.web.api.webmodule.WebModule;
045: import org.openide.WizardDescriptor;
046: import org.openide.util.NbBundle;
047:
048: public class PanelOptionsVisual extends javax.swing.JPanel {
049:
050: private PanelConfigureProject panel;
051:
052: /** Creates new form PanelOptionsVisual */
053: public PanelOptionsVisual(PanelConfigureProject panel) {
054: initComponents();
055: this .panel = panel;
056: }
057:
058: /** This method is called from within the constructor to
059: * initialize the form.
060: * WARNING: Do NOT modify this code. The content of this method is
061: * always regenerated by the Form Editor.
062: */
063: private void initComponents() {//GEN-BEGIN:initComponents
064: java.awt.GridBagConstraints gridBagConstraints;
065:
066: setAsMainCheckBox = new javax.swing.JCheckBox();
067: jScrollPane1 = new javax.swing.JScrollPane();
068:
069: setLayout(new java.awt.GridBagLayout());
070:
071: setAsMainCheckBox.setMnemonic(org.openide.util.NbBundle
072: .getMessage(PanelOptionsVisual.class,
073: "LBL_NWP1_SetAsMain_CheckBoxMnemonic")
074: .charAt(0));
075: setAsMainCheckBox.setSelected(true);
076: setAsMainCheckBox.setText(org.openide.util.NbBundle
077: .getMessage(PanelOptionsVisual.class,
078: "LBL_NWP1_SetAsMain_CheckBox"));
079: setAsMainCheckBox.setActionCommand("Set as Main Project");
080: setAsMainCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
081: gridBagConstraints = new java.awt.GridBagConstraints();
082: gridBagConstraints.gridx = 0;
083: gridBagConstraints.gridy = 0;
084: gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
085: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
086: gridBagConstraints.insets = new java.awt.Insets(0, 0, 11, 0);
087: add(setAsMainCheckBox, gridBagConstraints);
088: setAsMainCheckBox.getAccessibleContext()
089: .setAccessibleDescription(
090: org.openide.util.NbBundle.getMessage(
091: PanelOptionsVisual.class,
092: "ACS_LBL_NWP1_SetAsMain_A11YDesc"));
093:
094: jScrollPane1.setBorder(null);
095: gridBagConstraints = new java.awt.GridBagConstraints();
096: gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
097: gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
098: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
099: gridBagConstraints.weightx = 1.0;
100: gridBagConstraints.weighty = 1.0;
101: gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0);
102: add(jScrollPane1, gridBagConstraints);
103:
104: }//GEN-END:initComponents
105:
106: boolean valid(WizardDescriptor wizardDescriptor) {
107: return true;
108: }
109:
110: void store(WizardDescriptor d) {
111: d.putProperty(WizardProperties.SET_AS_MAIN, setAsMainCheckBox
112: .isSelected() ? Boolean.TRUE : Boolean.FALSE);
113: }
114:
115: void read(WizardDescriptor d) {
116: }
117:
118: // Variables declaration - do not modify//GEN-BEGIN:variables
119: private javax.swing.JScrollPane jScrollPane1;
120: private javax.swing.JCheckBox setAsMainCheckBox;
121: // End of variables declaration//GEN-END:variables
122:
123: }
|