1 19 20 package org.netbeans.modules.j2ee.clientproject.ui.wizards; 21 22 import javax.swing.JPanel ; 23 import org.openide.WizardDescriptor; 24 import org.openide.WizardValidationException; 25 import org.openide.util.NbBundle; 26 27 32 public class PanelConfigureProjectVisual extends JPanel { 33 34 private PanelConfigureProject panel; 35 36 private boolean ignoreProjectDirChanges; 37 38 private boolean ignoreAntProjectNameChanges; 39 40 private boolean noDir = true; 41 42 private SettingsPanel projectLocationPanel; 43 44 private PanelOptionsVisual optionsPanel; 45 46 47 public PanelConfigureProjectVisual( PanelConfigureProject panel ) { 48 this.panel = panel; 49 initComponents(); 50 setName(NbBundle.getMessage(PanelConfigureProjectVisual.class,"TXT_NameAndLoc")); projectLocationPanel = new PanelProjectLocationVisual( panel ); 52 putClientProperty("NewProjectWizard_Title", NbBundle.getMessage(PanelConfigureProjectVisual.class, "TXT_NewAppClient")); jSeparator1.setVisible(true); 54 getAccessibleContext().setAccessibleName(NbBundle.getMessage(PanelConfigureProjectVisual.class, "TXT_NewAppClient")); getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(PanelConfigureProjectVisual.class, "ACSD_NewAppClient")); locationContainer.add( projectLocationPanel, java.awt.BorderLayout.CENTER ); 57 optionsPanel = new PanelOptionsVisual( panel ); 58 projectLocationPanel.addPropertyChangeListener(optionsPanel); 59 optionsContainer.add( optionsPanel, java.awt.BorderLayout.CENTER ); 60 } 61 62 boolean valid( WizardDescriptor wizardDescriptor ) { 63 wizardDescriptor.putProperty( "WizardPanel_errorMessage", "" ); return projectLocationPanel.valid( wizardDescriptor ) && optionsPanel.valid(wizardDescriptor); 65 } 66 67 void read(WizardDescriptor d) { 68 projectLocationPanel.read(d); 69 optionsPanel.read(d); 70 } 71 72 void store( WizardDescriptor d ) { 73 projectLocationPanel.store( d ); 74 optionsPanel.store( d ); 75 } 76 77 void validate(WizardDescriptor d) throws WizardValidationException { 78 projectLocationPanel.validate(d); 79 } 80 81 82 87 private void initComponents() { 89 java.awt.GridBagConstraints gridBagConstraints; 90 91 locationContainer = new javax.swing.JPanel (); 92 jSeparator1 = new javax.swing.JSeparator (); 93 optionsContainer = new javax.swing.JPanel (); 94 95 setLayout(new java.awt.GridBagLayout ()); 96 97 locationContainer.setLayout(new java.awt.BorderLayout ()); 98 99 gridBagConstraints = new java.awt.GridBagConstraints (); 100 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 101 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 102 gridBagConstraints.weightx = 1.0; 103 add(locationContainer, gridBagConstraints); 104 locationContainer.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getBundle(PanelConfigureProjectVisual.class).getString("ACSN_locationContainer")); 105 locationContainer.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(PanelConfigureProjectVisual.class).getString("ACSD_locationContainer")); 106 107 gridBagConstraints = new java.awt.GridBagConstraints (); 108 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 109 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 110 gridBagConstraints.weightx = 1.0; 111 gridBagConstraints.insets = new java.awt.Insets (12, 0, 12, 0); 112 add(jSeparator1, gridBagConstraints); 113 114 optionsContainer.setLayout(new java.awt.BorderLayout ()); 115 116 gridBagConstraints = new java.awt.GridBagConstraints (); 117 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 118 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 119 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 120 gridBagConstraints.weightx = 1.0; 121 gridBagConstraints.weighty = 1.0; 122 add(optionsContainer, gridBagConstraints); 123 optionsContainer.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getBundle(PanelConfigureProjectVisual.class).getString("ACSN_optionsContainer")); 124 optionsContainer.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(PanelConfigureProjectVisual.class).getString("ACSD_optionsContainer")); 125 126 } 128 130 131 private javax.swing.JSeparator jSeparator1; 133 private javax.swing.JPanel locationContainer; 134 private javax.swing.JPanel optionsContainer; 135 137 138 } 139 | Popular Tags |