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-2007 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.compapp.projects.jbi.ui.wizards;
043:
044: import org.netbeans.modules.compapp.projects.jbi.ui.customizer.JbiProjectProperties;
045: import org.openide.WizardDescriptor;
046: import org.openide.util.NbBundle;
047:
048: public class PanelOptionsVisual extends javax.swing.JPanel {
049:
050: // private static boolean lastMainClassCheck = false; // XXX Store somewhere
051:
052: private PanelConfigureProject panel;
053: private String j2eeLevel = JbiProjectProperties.J2EE_1_4;
054:
055: /** Creates new form PanelOptionsVisual */
056: public PanelOptionsVisual(PanelConfigureProject panel) {
057: initComponents();
058: this .panel = panel;
059: //B initJ2EESpecLevels();
060: }
061:
062: /** This method is called from within the constructor to
063: * initialize the form.
064: * WARNING: Do NOT modify this code. The content of this method is
065: * always regenerated by the Form Editor.
066: */
067: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
068: private void initComponents() {
069:
070: setAsMainCheckBox = new javax.swing.JCheckBox();
071:
072: setAsMainCheckBox.setSelected(true);
073: org.openide.awt.Mnemonics
074: .setLocalizedText(
075: setAsMainCheckBox,
076: NbBundle
077: .getBundle(
078: "org/netbeans/modules/compapp/projects/jbi/ui/wizards/Bundle")
079: .getString(
080: "LBL_NWP1_SetAsMain_CheckBox")); // NOI18N
081: setAsMainCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
082:
083: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
084: this );
085: this .setLayout(layout);
086: layout.setHorizontalGroup(layout.createParallelGroup(
087: org.jdesktop.layout.GroupLayout.LEADING).add(
088: layout.createSequentialGroup().addContainerGap().add(
089: setAsMainCheckBox).addContainerGap(294,
090: Short.MAX_VALUE)));
091: layout.setVerticalGroup(layout.createParallelGroup(
092: org.jdesktop.layout.GroupLayout.LEADING).add(
093: layout.createSequentialGroup().addContainerGap().add(
094: setAsMainCheckBox).add(35, 35, 35)));
095:
096: setAsMainCheckBox.getAccessibleContext()
097: .setAccessibleDescription(
098: org.openide.util.NbBundle.getMessage(
099: PanelOptionsVisual.class,
100: "ACS_LBL_NWP1_SetAsMain_A11YDesc")); // NOI18N
101: }// </editor-fold>//GEN-END:initComponents
102:
103: boolean valid(WizardDescriptor wizardDescriptor) {
104: return true;
105: }
106:
107: void store(WizardDescriptor d) {
108: d.putProperty(WizardProperties.SET_AS_MAIN, setAsMainCheckBox
109: .isSelected() ? Boolean.TRUE : Boolean.FALSE);
110: d.putProperty(WizardProperties.J2EE_LEVEL, j2eeLevel);
111: }
112:
113: void read(WizardDescriptor d) {
114: }
115:
116: // Variables declaration - do not modify//GEN-BEGIN:variables
117: private javax.swing.JCheckBox setAsMainCheckBox;
118: // End of variables declaration//GEN-END:variables
119:
120: //B private void initJ2EESpecLevels() {
121: //B j2eeSpecComboBox.addItem(NbBundle.getBundle("org/netbeans/modules/compapp/projects/jbiserver/ui/wizards/Bundle").getString("J2EESpecLevel_0")); // NOI18N
122: //B j2eeSpecComboBox.setSelectedIndex(0);
123: //B }
124: }
|