001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: /*
042: * CompLibDetails.java
043: *
044: * Created on April 18, 2005, 12:05 PM
045: */
046:
047: package org.netbeans.modules.visualweb.complib.ui;
048:
049: import java.awt.GridBagConstraints;
050: import java.awt.GridBagLayout;
051:
052: import org.netbeans.modules.visualweb.complib.Complib;
053:
054: /**
055: * Component library manager main detail panel
056: *
057: * @author jhoff
058: * @author Edwin Goei
059: */
060: public class MainDetailPanel extends javax.swing.JPanel {
061:
062: /**
063: * Creates new form ComponentsDetailPanel
064: *
065: * @param compLib
066: */
067: public MainDetailPanel(Complib compLib) {
068: initComponents();
069:
070: componentDetailsPanel.setLayout(new GridBagLayout());
071: clGBConstraints = new GridBagConstraints();
072: clGBConstraints.fill = GridBagConstraints.BOTH;
073: clGBConstraints.weightx = 1.0;
074: clGBConstraints.weighty = 1.0;
075: componentDetailsPanel.add(new ComponentsPanel(compLib),
076: clGBConstraints);
077:
078: txtCompLibDisplayName.setText(compLib.getTitle());
079: txtCompLibURI.setText(compLib.getIdentifier()
080: .getNamespaceUriString());
081: txtCompLibVersion.setText(compLib.getIdentifier()
082: .getVersionString());
083: }
084:
085: /**
086: * This method is called from within the constructor to initialize the form.
087: * WARNING: Do NOT modify this code. The content of this method is always
088: * regenerated by the Form Editor.
089: */
090: // <editor-fold defaultstate="collapsed" desc=" Generated Code
091: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
092: private void initComponents() {
093: java.awt.GridBagConstraints gridBagConstraints;
094:
095: lblCompLibName = new javax.swing.JLabel();
096: txtCompLibDisplayName = new javax.swing.JTextField();
097: txtCompLibURI = new javax.swing.JTextField();
098: lblCompLibURI = new javax.swing.JLabel();
099: lblCompLibVersion = new javax.swing.JLabel();
100: txtCompLibVersion = new javax.swing.JTextField();
101: componentDetailsPanel = new javax.swing.JPanel();
102:
103: setLayout(new java.awt.GridBagLayout());
104:
105: lblCompLibName.setLabelFor(txtCompLibDisplayName);
106: org.openide.awt.Mnemonics
107: .setLocalizedText(
108: lblCompLibName,
109: org.openide.util.NbBundle
110: .getBundle(
111: "org/netbeans/modules/visualweb/complib/ui/Bundle")
112: .getString("manager.LibraryName"));
113: gridBagConstraints = new java.awt.GridBagConstraints();
114: gridBagConstraints.gridx = 0;
115: gridBagConstraints.gridy = 0;
116: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
117: gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 10);
118: add(lblCompLibName, gridBagConstraints);
119: lblCompLibName.getAccessibleContext().setAccessibleDescription(
120: org.openide.util.NbBundle.getMessage(
121: MainDetailPanel.class,
122: "manager.LibraryNameA11yDescription"));
123:
124: txtCompLibDisplayName.setEditable(false);
125: txtCompLibDisplayName.setText("Sun Web UI Components");
126: gridBagConstraints = new java.awt.GridBagConstraints();
127: gridBagConstraints.gridx = 1;
128: gridBagConstraints.gridy = 0;
129: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
130: gridBagConstraints.weightx = 1.0;
131: gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 10);
132: add(txtCompLibDisplayName, gridBagConstraints);
133:
134: txtCompLibURI.setEditable(false);
135: txtCompLibURI.setText("http://www.sun.com/jsf/sun_web_ui");
136: gridBagConstraints = new java.awt.GridBagConstraints();
137: gridBagConstraints.gridx = 1;
138: gridBagConstraints.gridy = 1;
139: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
140: gridBagConstraints.weightx = 1.0;
141: gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 10);
142: add(txtCompLibURI, gridBagConstraints);
143:
144: lblCompLibURI.setLabelFor(txtCompLibURI);
145: org.openide.awt.Mnemonics
146: .setLocalizedText(
147: lblCompLibURI,
148: org.openide.util.NbBundle
149: .getBundle(
150: "org/netbeans/modules/visualweb/complib/ui/Bundle")
151: .getString("manager.IdentificationURI"));
152: gridBagConstraints = new java.awt.GridBagConstraints();
153: gridBagConstraints.gridx = 0;
154: gridBagConstraints.gridy = 1;
155: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
156: gridBagConstraints.insets = new java.awt.Insets(6, 10, 0, 10);
157: add(lblCompLibURI, gridBagConstraints);
158: lblCompLibURI.getAccessibleContext().setAccessibleDescription(
159: org.openide.util.NbBundle.getMessage(
160: MainDetailPanel.class,
161: "manager.IdentificationURIA11yDescription"));
162:
163: lblCompLibVersion.setLabelFor(txtCompLibVersion);
164: org.openide.awt.Mnemonics
165: .setLocalizedText(
166: lblCompLibVersion,
167: org.openide.util.NbBundle
168: .getBundle(
169: "org/netbeans/modules/visualweb/complib/ui/Bundle")
170: .getString("manager.Version"));
171: gridBagConstraints = new java.awt.GridBagConstraints();
172: gridBagConstraints.gridx = 0;
173: gridBagConstraints.gridy = 2;
174: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
175: gridBagConstraints.insets = new java.awt.Insets(6, 10, 10, 10);
176: add(lblCompLibVersion, gridBagConstraints);
177: lblCompLibVersion.getAccessibleContext()
178: .setAccessibleDescription(
179: org.openide.util.NbBundle.getMessage(
180: MainDetailPanel.class,
181: "manager.VersionA11yDescription"));
182:
183: txtCompLibVersion.setEditable(false);
184: txtCompLibVersion.setText("1.0");
185: gridBagConstraints = new java.awt.GridBagConstraints();
186: gridBagConstraints.gridx = 1;
187: gridBagConstraints.gridy = 2;
188: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
189: gridBagConstraints.weightx = 1.0;
190: gridBagConstraints.insets = new java.awt.Insets(6, 0, 10, 10);
191: add(txtCompLibVersion, gridBagConstraints);
192:
193: componentDetailsPanel.setLayout(new java.awt.GridBagLayout());
194:
195: gridBagConstraints = new java.awt.GridBagConstraints();
196: gridBagConstraints.gridx = 0;
197: gridBagConstraints.gridy = 3;
198: gridBagConstraints.gridwidth = 2;
199: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
200: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
201: gridBagConstraints.weightx = 1.0;
202: gridBagConstraints.weighty = 1.0;
203: add(componentDetailsPanel, gridBagConstraints);
204:
205: }// </editor-fold>//GEN-END:initComponents
206:
207: // Variables declaration - do not modify//GEN-BEGIN:variables
208: private javax.swing.JPanel componentDetailsPanel;
209: private javax.swing.JLabel lblCompLibName;
210: private javax.swing.JLabel lblCompLibURI;
211: private javax.swing.JLabel lblCompLibVersion;
212: private javax.swing.JTextField txtCompLibDisplayName;
213: private javax.swing.JTextField txtCompLibURI;
214: private javax.swing.JTextField txtCompLibVersion;
215: // End of variables declaration//GEN-END:variables
216: private GridBagConstraints clGBConstraints;
217: }
|