KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > earproject > ui > customizer > CustomizerLibraries


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.earproject.ui.customizer;
21
22 import javax.swing.JButton JavaDoc;
23 import javax.swing.JPanel JavaDoc;
24 import org.openide.util.HelpCtx;
25 import org.openide.util.NbBundle;
26
27 public final class CustomizerLibraries extends JPanel JavaDoc implements ArchiveCustomizerPanel, HelpCtx.Provider {
28     
29     // Helper for storing properties
30
private final VisualPropertySupport vps;
31     
32     private final VisualClasspathSupport vws;
33     
34     public CustomizerLibraries(final EarProjectProperties earProperties) {
35         initComponents();
36         this.getAccessibleContext().setAccessibleDescription(
37                 NbBundle.getMessage(CustomizerLibraries.class, "ACS_CustomizeRun_A11YDesc")); // NOI18N
38
vws = new VisualClasspathSupport(earProperties.getProject(),
39                 (String JavaDoc) earProperties.get(EarProjectProperties.J2EE_PLATFORM),
40                 jTableAddContent,
41                 jButtonAddJar,
42                 jButtonAddLib,
43                 jButtonAddProject,
44                 new JButton JavaDoc(), // edit button
45
jButtonRemove,
46                 new JButton JavaDoc(),
47                 new JButton JavaDoc(), true);
48         vps = new VisualPropertySupport(earProperties);
49     }
50     
51     public void initValues() {
52         vps.register(vws, EarProjectProperties.RUN_CLASSPATH);
53     }
54     
55     /** This method is called from within the constructor to
56      * initialize the form.
57      * WARNING: Do NOT modify this code. The content of this method is
58      * always regenerated by the Form Editor.
59      */

60     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
61
private void initComponents() {
62         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
63
64         embeddedCPPanel = new javax.swing.JPanel JavaDoc();
65         jLabelEmbeddedCP = new javax.swing.JLabel JavaDoc();
66         jScrollPane2 = new javax.swing.JScrollPane JavaDoc();
67         jTableAddContent = new javax.swing.JTable JavaDoc();
68         jButtonAddJar = new javax.swing.JButton JavaDoc();
69         jButtonAddLib = new javax.swing.JButton JavaDoc();
70         jButtonAddProject = new javax.swing.JButton JavaDoc();
71         jButtonRemove = new javax.swing.JButton JavaDoc();
72
73         setLayout(new java.awt.GridBagLayout JavaDoc());
74
75         embeddedCPPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
76
77         jLabelEmbeddedCP.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
78         jLabelEmbeddedCP.setLabelFor(jTableAddContent);
79         org.openide.awt.Mnemonics.setLocalizedText(jLabelEmbeddedCP, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizerRun_EmbeddedClasspathElements_JLabel")); // NOI18N
80
jLabelEmbeddedCP.setVerticalAlignment(javax.swing.SwingConstants.TOP);
81         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
82         gridBagConstraints.gridx = 0;
83         gridBagConstraints.gridy = 0;
84         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
85         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
86         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
87         embeddedCPPanel.add(jLabelEmbeddedCP, gridBagConstraints);
88
89         jTableAddContent.setModel(new javax.swing.table.DefaultTableModel JavaDoc(
90             new Object JavaDoc [][] {
91
92             },
93             new String JavaDoc [] {
94
95             }
96         ));
97         jScrollPane2.setViewportView(jTableAddContent);
98
99         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
100         gridBagConstraints.gridx = 0;
101         gridBagConstraints.gridy = 1;
102         gridBagConstraints.gridheight = 4;
103         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
104         gridBagConstraints.weightx = 10.0;
105         gridBagConstraints.weighty = 1.0;
106         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 11);
107         embeddedCPPanel.add(jScrollPane2, gridBagConstraints);
108
109         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddJar, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeEAR_AddJar_JButton")); // NOI18N
110
gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
111         gridBagConstraints.gridx = 1;
112         gridBagConstraints.gridy = 1;
113         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
114         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
115         embeddedCPPanel.add(jButtonAddJar, gridBagConstraints);
116
117         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddLib, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeCompile_Classpath_AddLibrary_JButton")); // NOI18N
118
gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
119         gridBagConstraints.gridx = 1;
120         gridBagConstraints.gridy = 2;
121         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
122         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
123         embeddedCPPanel.add(jButtonAddLib, gridBagConstraints);
124
125         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddProject, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeCompile_Classpath_AddProject_JButton")); // NOI18N
126
gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
127         gridBagConstraints.gridx = 1;
128         gridBagConstraints.gridy = 3;
129         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
130         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 11, 0);
131         embeddedCPPanel.add(jButtonAddProject, gridBagConstraints);
132
133         org.openide.awt.Mnemonics.setLocalizedText(jButtonRemove, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeCompile_Classpath_Remove_JButton")); // NOI18N
134
gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
135         gridBagConstraints.gridx = 1;
136         gridBagConstraints.gridy = 4;
137         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
138         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
139         embeddedCPPanel.add(jButtonRemove, gridBagConstraints);
140
141         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
142         gridBagConstraints.gridx = 0;
143         gridBagConstraints.gridy = 0;
144         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
145         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
146         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
147         gridBagConstraints.weightx = 1.0;
148         gridBagConstraints.weighty = 1.0;
149         add(embeddedCPPanel, gridBagConstraints);
150
151     }// </editor-fold>//GEN-END:initComponents
152

153     // Variables declaration - do not modify//GEN-BEGIN:variables
154
private javax.swing.JPanel JavaDoc embeddedCPPanel;
155     private javax.swing.JButton JavaDoc jButtonAddJar;
156     private javax.swing.JButton JavaDoc jButtonAddLib;
157     private javax.swing.JButton JavaDoc jButtonAddProject;
158     private javax.swing.JButton JavaDoc jButtonRemove;
159     private javax.swing.JLabel JavaDoc jLabelEmbeddedCP;
160     private javax.swing.JScrollPane JavaDoc jScrollPane2;
161     private javax.swing.JTable JavaDoc jTableAddContent;
162     // End of variables declaration//GEN-END:variables
163

164     public HelpCtx getHelpCtx() {
165         return new HelpCtx(CustomizerLibraries.class);
166     }
167     
168 }
169
Popular Tags