1 19 20 package org.netbeans.bluej.upgrade; 21 22 import java.awt.Dialog ; 23 import java.util.ArrayList ; 24 import java.util.ResourceBundle ; 25 import javax.swing.JPanel ; 26 import javax.swing.event.ChangeListener ; 27 import org.openide.util.NbBundle; 28 29 30 33 final class AutoUpgradePanel extends JPanel { 34 35 String source; 36 37 38 public AutoUpgradePanel (String directory) { 39 this.source = directory; 40 initComponents(); 41 initAccessibility(); 42 } 43 44 47 void removeChangeListener(ChangeListener l) { 48 changeListeners.remove(l); 49 } 50 51 55 void addChangeListener(ChangeListener l) { 56 if (!changeListeners.contains(l)) { 57 changeListeners.add(l); 58 } 59 } 60 61 private void initAccessibility() { 62 this.getAccessibleContext().setAccessibleDescription(bundle.getString("MSG_Confirmation")); } 64 65 66 71 private void initComponents() { 73 txtVersions = new javax.swing.JTextArea (); 74 75 setLayout(new java.awt.BorderLayout ()); 76 77 setName(bundle.getString("LBL_UpgradePanel_Name")); 78 txtVersions.setBackground(getBackground()); 79 txtVersions.setColumns(50); 80 txtVersions.setEditable(false); 81 txtVersions.setFont(new java.awt.Font ("Dialog", 0, 12)); 82 txtVersions.setLineWrap(true); 83 txtVersions.setRows(3); 84 txtVersions.setText(NbBundle.getMessage (AutoUpgradePanel.class, "MSG_Confirmation", source)); 85 txtVersions.setWrapStyleWord(true); 86 txtVersions.setMinimumSize(new java.awt.Dimension (100, 50)); 87 add(txtVersions, java.awt.BorderLayout.CENTER); 88 89 } 90 92 private javax.swing.JTextArea txtVersions; 94 96 private static final ResourceBundle bundle = NbBundle.getBundle(AutoUpgradePanel.class); 97 private ArrayList changeListeners = new ArrayList (1); 98 99 } 100 | Popular Tags |