1 19 20 package org.netbeans.modules.j2ee.ejbjarproject.ui.wizards; 21 22 import javax.swing.JPanel ; 23 24 import org.openide.WizardDescriptor; 25 import org.openide.util.NbBundle; 26 27 public class PanelConfigureProjectVisual extends JPanel { 28 29 private PanelConfigureProject panel; 30 31 private PanelProjectLocationVisual projectLocationPanel; 32 private PanelOptionsVisual optionsPanel; 33 34 35 public PanelConfigureProjectVisual(PanelConfigureProject panel) { 36 this.panel = panel; 37 initComponents(); 38 this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(PanelConfigureProjectVisual.class, "ACS_NWP1_NamePanel_A11YDesc")); 40 projectLocationPanel = new PanelProjectLocationVisual(panel); 41 locationContainer.add(projectLocationPanel, java.awt.BorderLayout.NORTH); 42 43 optionsPanel = new PanelOptionsVisual(panel); 44 java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints (); 45 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 46 gridBagConstraints.weightx = 1.0; 47 gridBagConstraints.weighty = 1.0; 48 optionsContainer.add(optionsPanel, gridBagConstraints); 49 50 71 73 74 setName(NbBundle.getBundle("org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/Bundle").getString("LBL_NWP1_ProjectTitleName")); putClientProperty ("NewProjectWizard_Title", NbBundle.getMessage(PanelConfigureProjectVisual.class, "TXT_NewWebApp")); } 78 79 boolean valid(WizardDescriptor wizardDescriptor) { 80 return projectLocationPanel.valid(wizardDescriptor) && optionsPanel.valid(wizardDescriptor); 81 } 82 83 void read (WizardDescriptor d) { 84 projectLocationPanel.read(d); 85 optionsPanel.read(d); 86 } 87 88 void store(WizardDescriptor d) { 89 projectLocationPanel.store(d); 90 optionsPanel.store(d); 91 } 92 93 98 private void initComponents() { 100 java.awt.GridBagConstraints gridBagConstraints; 101 102 locationContainer = new javax.swing.JPanel (); 103 jSeparator1 = new javax.swing.JSeparator (); 104 optionsContainer = new javax.swing.JPanel (); 105 106 setLayout(new java.awt.GridBagLayout ()); 107 108 setRequestFocusEnabled(false); 109 locationContainer.setLayout(new java.awt.BorderLayout ()); 110 111 gridBagConstraints = new java.awt.GridBagConstraints (); 112 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 113 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 114 gridBagConstraints.weightx = 1.0; 115 add(locationContainer, gridBagConstraints); 116 117 gridBagConstraints = new java.awt.GridBagConstraints (); 118 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 119 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 120 gridBagConstraints.weightx = 1.0; 121 gridBagConstraints.insets = new java.awt.Insets (12, 0, 12, 0); 122 add(jSeparator1, gridBagConstraints); 123 124 optionsContainer.setLayout(new java.awt.GridBagLayout ()); 125 126 gridBagConstraints = new java.awt.GridBagConstraints (); 127 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 128 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 129 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 130 gridBagConstraints.weightx = 1.0; 131 gridBagConstraints.weighty = 1.0; 132 add(optionsContainer, gridBagConstraints); 133 134 } 136 private javax.swing.JSeparator jSeparator1; 138 private javax.swing.JPanel locationContainer; 139 private javax.swing.JPanel optionsContainer; 140 142 } 143 | Popular Tags |