1 19 20 21 package org.netbeans.modules.project.ui; 22 23 import java.awt.BorderLayout ; 24 import javax.swing.JComponent ; 25 import javax.swing.SwingUtilities ; 26 import org.netbeans.api.progress.ProgressHandle; 27 import org.netbeans.api.progress.ProgressHandleFactory; 28 29 33 public class OpeningProjectPanel extends javax.swing.JPanel { 34 35 private JComponent progress; 36 37 38 public OpeningProjectPanel(ProgressHandle handle) { 39 progress = ProgressHandleFactory.createProgressComponent(handle); 40 initComponents(); 41 nameOfTheProject.setBackground(javax.swing.UIManager.getColor("Panel.background")); } 44 45 50 private void initComponents() { 52 java.awt.GridBagConstraints gridBagConstraints; 53 54 jLabel1 = new javax.swing.JLabel (); 55 innerPanel = new javax.swing.JPanel (); 56 nameOfTheProject = new javax.swing.JTextField (); 57 jPanel1 = new javax.swing.JPanel (); 58 59 setBorder(javax.swing.BorderFactory.createEmptyBorder(11, 11, 11, 11)); 60 setLayout(new java.awt.GridBagLayout ()); 61 62 jLabel1.setText(org.openide.util.NbBundle.getMessage(OpeningProjectPanel.class, "LBL_Opening_Projects", new Object [] {})); gridBagConstraints = new java.awt.GridBagConstraints (); 64 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 65 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 6); 66 add(jLabel1, gridBagConstraints); 67 68 innerPanel.add(progress, BorderLayout.CENTER); 69 innerPanel.setLayout(new java.awt.BorderLayout ()); 70 gridBagConstraints = new java.awt.GridBagConstraints (); 71 gridBagConstraints.gridx = 0; 72 gridBagConstraints.gridy = 1; 73 gridBagConstraints.gridwidth = 2; 74 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 75 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 76 gridBagConstraints.weightx = 1.0; 77 add(innerPanel, gridBagConstraints); 78 79 nameOfTheProject.setColumns(20); 80 nameOfTheProject.setEditable(false); 81 nameOfTheProject.setFont(javax.swing.UIManager.getFont("Label.font")); 82 nameOfTheProject.setBorder(null); 83 nameOfTheProject.setDisabledTextColor(javax.swing.UIManager.getColor("Label.foreground")); 84 gridBagConstraints = new java.awt.GridBagConstraints (); 85 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 86 gridBagConstraints.weightx = 1.0; 87 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 0); 88 add(nameOfTheProject, gridBagConstraints); 89 gridBagConstraints = new java.awt.GridBagConstraints (); 90 gridBagConstraints.gridx = 0; 91 gridBagConstraints.gridy = 2; 92 gridBagConstraints.gridwidth = 2; 93 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 94 gridBagConstraints.weightx = 1.0; 95 gridBagConstraints.weighty = 1.0; 96 add(jPanel1, gridBagConstraints); 97 } 99 100 public javax.swing.JPanel innerPanel; 102 public javax.swing.JLabel jLabel1; 103 public javax.swing.JPanel jPanel1; 104 public javax.swing.JTextField nameOfTheProject; 105 107 public void setProjectName(final String name) { 108 nameOfTheProject.setText(name); 109 } 110 } 111 | Popular Tags |