1 19 20 package org.netbeans.modules.autoupdate; 21 22 import java.beans.Customizer ; 23 import org.openide.util.NbBundle; 24 25 class LoginPanel extends javax.swing.JPanel { 26 27 Wizard.Validator validator; 28 29 Settings settings = null; 30 31 static final long serialVersionUID =-3335860872113235775L; 32 33 34 private javax.swing.JPanel customizer = null; 35 36 private java.awt.GridBagConstraints gridBagConstraints1 = new java.awt.GridBagConstraints (); 37 38 39 public LoginPanel(Wizard.Validator validator) { 40 putClientProperty("WizardPanel_autoWizardStyle", Boolean.TRUE); putClientProperty("WizardPanel_contentDisplayed", Boolean.TRUE); putClientProperty("WizardPanel_contentNumbered", Boolean.TRUE); putClientProperty("WizardPanel_contentSelectedIndex", new Integer (0)); putClientProperty("WizardPanel_contentData", new String [] { getBundle("WIZ_First"), 46 getBundle("WIZ_Select"), 47 getBundle("WIZ_Download"), 48 getBundle("WIZ_View") 49 }); 50 setName(getBundle("LAB_Login")); 51 initComponents (); 52 initAccessibility(); 53 setPreferredSize(new java.awt.Dimension (500, 380)); 54 55 settings = Settings.getShared(); 56 57 this.validator = validator; 58 59 gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTHWEST; 60 gridBagConstraints1.weightx = 1.0; 61 gridBagConstraints1.weighty = 1.0; 62 } 63 64 void setCustomizer(javax.swing.JPanel panel, AutoupdateType at) { 65 setName(getBundle("LAB_Login") + " - " + at.getName()); 66 67 if (customizer != null) 68 this.remove(customizer); 69 customizer = panel; 70 if (customizer != null) { 71 ((Customizer )customizer).setObject(at); 72 this.add(customizer, gridBagConstraints1); 73 } 74 } 75 76 81 private void initComponents() { 83 setLayout(new java.awt.GridBagLayout ()); 84 85 } 87 private void initAccessibility(){ 88 getAccessibleContext().setAccessibleDescription(getBundle("ACSD_LoginPanel")); 89 } 90 93 private static String getBundle( String key ) { 94 return NbBundle.getMessage( LoginPanel.class, key ); 95 } 96 } 97 | Popular Tags |