1 19 20 21 package org.netbeans.modules.i18n.wizard; 22 23 import org.openide.util.NbBundle; 24 import javax.swing.JPanel ; 25 26 27 34 final class ProgressWizardPanel extends JPanel { 35 36 37 public ProgressWizardPanel(boolean withSubProgress) { 38 initComponents(); 39 this.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(AdditionalWizardPanel.class).getString("ACS_ProgressWizardPanel")); 40 41 if(!withSubProgress) { 42 remove(subLabel); 43 remove(subProgress); 44 } 45 46 setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION); 47 } 48 49 50 51 public void setMainText(String text) { 52 mainLabel.setText(text); 53 } 54 55 56 public void setSubText(String text) { 57 subLabel.setText(text); 58 } 59 60 61 public void setMainProgress(int value) { 62 mainProgress.setValue(value); 63 } 64 65 66 public void setSubProgress(int value) { 67 subProgress.setValue(value); 68 } 69 70 75 private void initComponents() { mainLabel = new javax.swing.JLabel (); 77 mainProgress = new javax.swing.JProgressBar (); 78 subLabel = new javax.swing.JLabel (); 79 subProgress = new javax.swing.JProgressBar (); 80 setLayout(new java.awt.GridBagLayout ()); 81 java.awt.GridBagConstraints gridBagConstraints1; 82 83 84 gridBagConstraints1 = new java.awt.GridBagConstraints (); 85 gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTHWEST; 86 add(mainLabel, gridBagConstraints1); 87 88 89 90 gridBagConstraints1 = new java.awt.GridBagConstraints (); 91 gridBagConstraints1.gridx = 0; 92 gridBagConstraints1.gridy = 1; 93 gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; 94 gridBagConstraints1.insets = new java.awt.Insets (7, 0, 0, 0); 95 gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTH; 96 gridBagConstraints1.weightx = 1.0; 97 add(mainProgress, gridBagConstraints1); 98 99 100 101 gridBagConstraints1 = new java.awt.GridBagConstraints (); 102 gridBagConstraints1.gridx = 0; 103 gridBagConstraints1.gridy = 2; 104 gridBagConstraints1.insets = new java.awt.Insets (11, 0, 0, 0); 105 gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTHWEST; 106 add(subLabel, gridBagConstraints1); 107 108 109 110 gridBagConstraints1 = new java.awt.GridBagConstraints (); 111 gridBagConstraints1.gridx = 0; 112 gridBagConstraints1.gridy = 3; 113 gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; 114 gridBagConstraints1.insets = new java.awt.Insets (7, 0, 0, 0); 115 gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTH; 116 gridBagConstraints1.weightx = 1.0; 117 add(subProgress, gridBagConstraints1); 118 119 } 121 122 private javax.swing.JLabel mainLabel; 124 private javax.swing.JProgressBar mainProgress; 125 private javax.swing.JLabel subLabel; 126 private javax.swing.JProgressBar subProgress; 127 129 } 130 131 | Popular Tags |