KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ddloaders > web > multiview > MessageDestRefsPanel


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.ddloaders.web.multiview;
21
22 import org.netbeans.modules.j2ee.ddloaders.web.*;
23 import org.netbeans.modules.xml.multiview.ui.*;
24 import org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef;
25 import org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException;
26
27 /** MessageDestRefsPanel section inner panel for Message Destination References
28  *
29  * Created on April 14, 2005
30  * @author mkuchtiak
31  */

32 public class MessageDestRefsPanel extends SectionInnerPanel {
33
34     /** Creates new form JspPGPanel */
35     public MessageDestRefsPanel(SectionView sectionView, DDDataObject dObj) {
36         super(sectionView);
37         initComponents();
38         // Error Pages
39
MessageDestRefTableModel model = new MessageDestRefTableModel();
40         MessageDestRefsTablePanel panel = new MessageDestRefsTablePanel(dObj, model);
41         MessageDestinationRef[] refs = null;
42         try {
43             refs = dObj.getWebApp().getMessageDestinationRef();
44         } catch (VersionNotSupportedException ex) {
45             refs = new MessageDestinationRef[0];
46         }
47         panel.setModel(dObj.getWebApp(),refs);
48         java.awt.GridBagConstraints JavaDoc gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
49         gridBagConstraints.gridx = 0;
50         gridBagConstraints.gridy = 0;
51         //gridBagConstraints.gridwidth = 4;
52
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
53         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
54         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 10, 0, 0);
55         gridBagConstraints.weightx = 1.0;
56         //gridBagConstraints.weighty = 5.0;
57
add(panel, gridBagConstraints);
58     }
59     public javax.swing.JComponent JavaDoc getErrorComponent(String JavaDoc errorId) {
60         return null;
61     }
62
63     public void setValue(javax.swing.JComponent JavaDoc source, Object JavaDoc value) {
64     }
65     
66     public void linkButtonPressed(Object JavaDoc obj, String JavaDoc id) {
67     }
68     
69     /** This method is called from within the constructor to
70      * initialize the form.
71      * WARNING: Do NOT modify this code. The content of this method is
72      * always regenerated by the Form Editor.
73      */

74     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
75
private void initComponents() {
76         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
77
78         filler = new javax.swing.JPanel JavaDoc();
79
80         setLayout(new java.awt.GridBagLayout JavaDoc());
81
82         filler.setOpaque(false);
83         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
84         gridBagConstraints.gridx = 1;
85         gridBagConstraints.gridy = 0;
86         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
87         add(filler, gridBagConstraints);
88
89     }
90     // </editor-fold>//GEN-END:initComponents
91

92     
93     // Variables declaration - do not modify//GEN-BEGIN:variables
94
private javax.swing.JPanel JavaDoc filler;
95     // End of variables declaration//GEN-END:variables
96

97 }
98
Popular Tags