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: * ComponentLibDetailPanel.java
043: *
044: * Created on April 15, 2005, 1:35 PM
045: */
046:
047: package org.netbeans.modules.visualweb.complib.ui;
048:
049: import org.netbeans.modules.visualweb.complib.Complib;
050:
051: /**
052: *
053: * @author jhoff
054: */
055: public class HelpSourcesDetailPanel extends javax.swing.JPanel {
056:
057: /**
058: * Creates new form ComponentLibDetailPanel
059: *
060: * @param compLib
061: */
062: public HelpSourcesDetailPanel(Complib compLib) {
063: initComponents();
064:
065: PathListModel plm = new PathListModel(compLib.getHelpPath());
066: lstHelpSources.setModel(plm);
067: txtHelpSetFile.setText(compLib.getHelpSetFile());
068: }
069:
070: /**
071: * This method is called from within the constructor to initialize the form.
072: * WARNING: Do NOT modify this code. The content of this method is always
073: * regenerated by the Form Editor.
074: */
075: // <editor-fold defaultstate="collapsed" desc=" Generated Code
076: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
077: private void initComponents() {
078: java.awt.GridBagConstraints gridBagConstraints;
079:
080: scrollHelpSources = new javax.swing.JScrollPane();
081: lstHelpSources = new javax.swing.JList();
082: lblHelpSources = new javax.swing.JLabel();
083: lblHelpSetFile = new javax.swing.JLabel();
084: txtHelpSetFile = new javax.swing.JTextField();
085: tpnlDescription = new javax.swing.JTextPane();
086:
087: setLayout(new java.awt.GridBagLayout());
088:
089: scrollHelpSources.setViewportView(lstHelpSources);
090:
091: gridBagConstraints = new java.awt.GridBagConstraints();
092: gridBagConstraints.gridx = 0;
093: gridBagConstraints.gridy = 4;
094: gridBagConstraints.gridwidth = 2;
095: gridBagConstraints.gridheight = 2;
096: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
097: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
098: gridBagConstraints.weightx = 1.0;
099: gridBagConstraints.weighty = 1.0;
100: gridBagConstraints.insets = new java.awt.Insets(6, 10, 10, 11);
101: add(scrollHelpSources, gridBagConstraints);
102:
103: lblHelpSources.setLabelFor(lstHelpSources);
104: org.openide.awt.Mnemonics
105: .setLocalizedText(
106: lblHelpSources,
107: org.openide.util.NbBundle
108: .getBundle(
109: "org/netbeans/modules/visualweb/complib/ui/Bundle")
110: .getString("manager.HelpSourcesLabel")); // NOI18N
111: gridBagConstraints = new java.awt.GridBagConstraints();
112: gridBagConstraints.gridx = 0;
113: gridBagConstraints.gridy = 2;
114: gridBagConstraints.gridwidth = 2;
115: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
116: gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0);
117: add(lblHelpSources, gridBagConstraints);
118:
119: lblHelpSetFile.setLabelFor(txtHelpSetFile);
120: org.openide.awt.Mnemonics
121: .setLocalizedText(
122: lblHelpSetFile,
123: org.openide.util.NbBundle
124: .getBundle(
125: "org/netbeans/modules/visualweb/complib/ui/Bundle")
126: .getString("manager.HelpSetFileLabel")); // NOI18N
127: gridBagConstraints = new java.awt.GridBagConstraints();
128: gridBagConstraints.gridx = 0;
129: gridBagConstraints.gridy = 7;
130: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
131: gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 0);
132: add(lblHelpSetFile, gridBagConstraints);
133:
134: txtHelpSetFile.setEditable(false);
135: txtHelpSetFile.setText("chelp");
136: gridBagConstraints = new java.awt.GridBagConstraints();
137: gridBagConstraints.gridx = 1;
138: gridBagConstraints.gridy = 7;
139: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
140: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
141: gridBagConstraints.weightx = 1.0;
142: gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 10);
143: add(txtHelpSetFile, gridBagConstraints);
144:
145: tpnlDescription.setBackground(javax.swing.UIManager
146: .getDefaults().getColor("Button.background"));
147: tpnlDescription.setEditable(false);
148: tpnlDescription.setText(org.openide.util.NbBundle.getBundle(
149: HelpSourcesDetailPanel.class).getString(
150: "manager.HelpDescription")); // NOI18N
151: gridBagConstraints = new java.awt.GridBagConstraints();
152: gridBagConstraints.gridx = 0;
153: gridBagConstraints.gridy = 3;
154: gridBagConstraints.gridwidth = 2;
155: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
156: gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
157: add(tpnlDescription, gridBagConstraints);
158: }// </editor-fold>//GEN-END:initComponents
159:
160: // Variables declaration - do not modify//GEN-BEGIN:variables
161: private javax.swing.JLabel lblHelpSetFile;
162: private javax.swing.JLabel lblHelpSources;
163: private javax.swing.JList lstHelpSources;
164: private javax.swing.JScrollPane scrollHelpSources;
165: private javax.swing.JTextPane tpnlDescription;
166: private javax.swing.JTextField txtHelpSetFile;
167: // End of variables declaration//GEN-END:variables
168:
169: }
|