1 19 20 package org.netbeans.modules.j2ee.blueprints.ui.projects; 21 22 import javax.swing.JPanel ; 23 24 import org.openide.WizardDescriptor; 25 import org.openide.util.HelpCtx; 26 import org.openide.util.NbBundle; 27 28 public class PanelConfigureProjectVisual extends JPanel implements HelpCtx.Provider { 29 30 private PanelConfigureProject panel; 31 32 private PanelProjectLocationVisual projectLocationPanel; 33 private PanelOptionsVisual optionsPanel; 34 35 36 public PanelConfigureProjectVisual(PanelConfigureProject panel) { 37 this.panel = panel; 38 initComponents(); 39 this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(PanelConfigureProjectVisual.class, "ACS_NWP1_NamePanel_A11YDesc")); 41 projectLocationPanel = new PanelProjectLocationVisual(panel); 42 locationContainer.add(projectLocationPanel, java.awt.BorderLayout.NORTH); 43 44 optionsPanel = new PanelOptionsVisual(panel); 45 optionsContainer.add(optionsPanel, java.awt.BorderLayout.NORTH); 46 47 setName(NbBundle.getMessage(PanelConfigureProjectVisual.class, "LBL_NWP1_ProjectTitleName")); putClientProperty ("NewProjectWizard_Title", NbBundle.getMessage(PanelConfigureProjectVisual.class, "TXT_NewWebApp")); } 51 52 boolean valid(WizardDescriptor wizardDescriptor) { 53 return projectLocationPanel.valid(wizardDescriptor) && optionsPanel.valid(wizardDescriptor); 54 } 55 56 void read (WizardDescriptor d) { 57 projectLocationPanel.read(d); 58 optionsPanel.read(d); 59 } 60 61 void store(WizardDescriptor d) { 62 projectLocationPanel.store(d); 63 optionsPanel.store(d); 64 } 65 66 71 private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; 73 74 locationContainer = new javax.swing.JPanel (); 75 jSeparator1 = new javax.swing.JSeparator (); 76 optionsContainer = new javax.swing.JPanel (); 77 78 setLayout(new java.awt.GridBagLayout ()); 79 80 setPreferredSize(new java.awt.Dimension (500, 340)); 81 setRequestFocusEnabled(false); 82 locationContainer.setLayout(new java.awt.BorderLayout ()); 83 84 gridBagConstraints = new java.awt.GridBagConstraints (); 85 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 86 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 87 gridBagConstraints.weightx = 1.0; 88 add(locationContainer, gridBagConstraints); 89 90 gridBagConstraints = new java.awt.GridBagConstraints (); 91 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 92 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 93 gridBagConstraints.weightx = 1.0; 94 gridBagConstraints.insets = new java.awt.Insets (12, 0, 12, 0); 95 add(jSeparator1, gridBagConstraints); 96 97 optionsContainer.setLayout(new java.awt.BorderLayout ()); 98 99 gridBagConstraints = new java.awt.GridBagConstraints (); 100 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 101 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 102 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 103 gridBagConstraints.weightx = 1.0; 104 gridBagConstraints.weighty = 1.0; 105 add(optionsContainer, gridBagConstraints); 106 107 } 109 private javax.swing.JSeparator jSeparator1; 111 private javax.swing.JPanel locationContainer; 112 private javax.swing.JPanel optionsContainer; 113 115 118 public HelpCtx getHelpCtx() { 119 return new HelpCtx(PanelConfigureProjectVisual.class); 120 } 121 } 122 | Popular Tags |