001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: /*
021: * NewJPanel_CustomizerJarContent.java
022: *
023: * Created on June 5, 2006, 11:20 PM
024: */
025:
026: package org.netbeans.modules.bpel.project.ui.customizer;
027:
028: import java.awt.Dialog;
029: import java.awt.event.ActionListener;
030:
031: import javax.swing.JPanel;
032: import org.netbeans.modules.bpel.project.ProjectConstants;
033:
034: import org.openide.util.HelpCtx;
035: import org.openide.util.NbBundle;
036: import org.netbeans.modules.compapp.projects.base.ui.customizer.IcanproProjectProperties;
037:
038: /** Customizer for WAR packaging.
039: */
040: public class CustomizerJarContent extends JPanel implements
041: IcanproCustomizer.Panel, HelpCtx.Provider {
042:
043: private Dialog dialog;
044: //private final AddFilter filterDlg = new AddFilter();
045: //private DefaultListModel dlm = new DefaultListModel();
046: IcanproProjectProperties webProperties;
047: private VisualPropertySupport vps;
048: private VisualArchiveIncludesSupport vas;
049: private ActionListener actionListener;
050:
051: /** Creates new form CustomizerCompile */
052: public CustomizerJarContent(IcanproProjectProperties webProperties) {
053: initComponents();
054: this .getAccessibleContext().setAccessibleDescription(
055: NbBundle.getMessage(CustomizerGeneral.class,
056: "ACS_CustomizeWAR_A11YDesc")); //NOI18N
057:
058: this .webProperties = webProperties;
059: vps = new VisualPropertySupport(webProperties);
060: vas = new VisualArchiveIncludesSupport(webProperties,
061: // jTableComp,
062: jTableAddContent,
063: //jButtonUpdate,
064: jButtonConfig, jButtonAddProject, jButtonRemove);
065: // vas.initTable();
066: }
067:
068: public void initValues() {
069: //vps.register(jTextFieldFileName, IcanproProjectProperties.JAR_NAME);
070: vps.register(vas, ProjectConstants.WS_CONTENT_ADDITIONAL);
071:
072: vas.initTableValues();
073: }
074:
075: /** This method is called from within the constructor to
076: * initialize the form.
077: * WARNING: Do NOT modify this code. The content of this method is
078: * always regenerated by the Form Editor.
079: */
080: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
081: private void initComponents() {
082: jLabelAddContent = new javax.swing.JLabel();
083: jScrollPane2 = new javax.swing.JScrollPane();
084: jTableAddContent = new javax.swing.JTable();
085: jButtonAddProject = new javax.swing.JButton();
086: jButtonRemove = new javax.swing.JButton();
087: jButtonConfig = new javax.swing.JButton();
088:
089: setBorder(javax.swing.BorderFactory.createEtchedBorder());
090: setMinimumSize(new java.awt.Dimension(208, 240));
091: jLabelAddContent.setLabelFor(jTableAddContent);
092:
093: jTableAddContent
094: .setModel(new javax.swing.table.DefaultTableModel(
095: new Object[][] {
096:
097: }, new String[] {
098:
099: }));
100: jScrollPane2.setViewportView(jTableAddContent);
101:
102: org.openide.awt.Mnemonics.setLocalizedText(jButtonAddProject,
103: org.openide.util.NbBundle.getMessage(
104: CustomizerJarContent.class,
105: "LBL_CustomizeWAR_AddProject_JButton"));
106: jButtonAddProject.getAccessibleContext()
107: .setAccessibleDescription(null);
108:
109: org.openide.awt.Mnemonics.setLocalizedText(jButtonRemove,
110: org.openide.util.NbBundle.getMessage(
111: CustomizerJarContent.class,
112: "LBL_CustomizeWAR_Remove_JButton"));
113: jButtonRemove.getAccessibleContext().setAccessibleDescription(
114: null);
115:
116: org.openide.awt.Mnemonics.setLocalizedText(jButtonConfig,
117: org.openide.util.NbBundle.getMessage(
118: CustomizerJarContent.class,
119: "LBL_CustomizeWAR_Config_JButton"));
120:
121: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
122: this );
123: this .setLayout(layout);
124: layout
125: .setHorizontalGroup(layout
126: .createParallelGroup(
127: org.jdesktop.layout.GroupLayout.LEADING)
128: .add(
129: layout
130: .createSequentialGroup()
131: .addContainerGap()
132: .add(
133: layout
134: .createParallelGroup(
135: org.jdesktop.layout.GroupLayout.LEADING)
136: .add(
137: jLabelAddContent)
138: .add(
139: jScrollPane2,
140: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
141: 460,
142: Short.MAX_VALUE))
143: .addPreferredGap(
144: org.jdesktop.layout.LayoutStyle.RELATED)
145: .add(
146: layout
147: .createParallelGroup(
148: org.jdesktop.layout.GroupLayout.LEADING)
149: .add(
150: layout
151: .createParallelGroup(
152: org.jdesktop.layout.GroupLayout.TRAILING)
153: .add(
154: jButtonAddProject)
155: .add(
156: jButtonRemove))
157: .add(
158: jButtonConfig))
159: .addContainerGap()));
160:
161: layout.linkSize(new java.awt.Component[] { jButtonAddProject,
162: jButtonConfig, jButtonRemove },
163: org.jdesktop.layout.GroupLayout.HORIZONTAL);
164:
165: layout
166: .setVerticalGroup(layout
167: .createParallelGroup(
168: org.jdesktop.layout.GroupLayout.LEADING)
169: .add(
170: layout
171: .createSequentialGroup()
172: .addContainerGap()
173: .add(jLabelAddContent)
174: .addPreferredGap(
175: org.jdesktop.layout.LayoutStyle.RELATED)
176: .add(
177: layout
178: .createParallelGroup(
179: org.jdesktop.layout.GroupLayout.LEADING)
180: .add(
181: layout
182: .createSequentialGroup()
183: .add(
184: jButtonAddProject)
185: .addPreferredGap(
186: org.jdesktop.layout.LayoutStyle.RELATED)
187: .add(
188: jButtonRemove)
189: .addPreferredGap(
190: org.jdesktop.layout.LayoutStyle.RELATED)
191: .add(
192: jButtonConfig)
193: .add(
194: 331,
195: 331,
196: 331))
197: .add(
198: layout
199: .createSequentialGroup()
200: .add(
201: jScrollPane2,
202: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
203: 403,
204: Short.MAX_VALUE)
205: .addContainerGap()))));
206: }// </editor-fold>//GEN-END:initComponents
207:
208: // Variables declaration - do not modify//GEN-BEGIN:variables
209: private javax.swing.JButton jButtonAddProject;
210: private javax.swing.JButton jButtonConfig;
211: private javax.swing.JButton jButtonRemove;
212: private javax.swing.JLabel jLabelAddContent;
213: private javax.swing.JScrollPane jScrollPane2;
214: private javax.swing.JTable jTableAddContent;
215:
216: // End of variables declaration//GEN-END:variables
217:
218: /** Help context where to find more about the paste type action.
219: * @return the help context for this action
220: */
221: public HelpCtx getHelpCtx() {
222: return new HelpCtx(CustomizerJarContent.class);
223: }
224: }
|