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 2006 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: package org.netbeans.modules.websvc.wsitconf.ui;
043:
044: /**
045: *
046: * @author MartinG
047: */
048: public class ErrorJPanel extends javax.swing.JPanel {
049:
050: /**
051: * Creates new form ErrorJPanel
052: */
053: public ErrorJPanel(String text) {
054: initComponents();
055: jTextArea1.setText(text);
056: }
057:
058: /** This method is called from within the constructor to
059: * initialize the form.
060: * WARNING: Do NOT modify this code. The content of this method is
061: * always regenerated by the Form Editor.
062: */
063: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
064: private void initComponents() {
065:
066: jScrollPane1 = new javax.swing.JScrollPane();
067: jTextArea1 = new javax.swing.JTextArea();
068: jLabel1 = new javax.swing.JLabel();
069:
070: jScrollPane1.setBorder(null);
071: jScrollPane1
072: .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
073: jScrollPane1
074: .setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
075: jScrollPane1.setHorizontalScrollBar(null);
076:
077: jTextArea1.setEditable(false);
078: jTextArea1.setLineWrap(true);
079: jTextArea1
080: .setText("This is a long text for testing purposes...This is a long text for testing purposes...This is a long text for testing purposes...This is a long text for testing purposes...");
081: jTextArea1.setWrapStyleWord(true);
082: jTextArea1.setAutoscrolls(false);
083: jTextArea1.setBorder(null);
084: jTextArea1.setOpaque(false);
085: jScrollPane1.setViewportView(jTextArea1);
086:
087: jLabel1
088: .setIcon(new javax.swing.ImageIcon(
089: getClass()
090: .getResource(
091: "/org/netbeans/modules/websvc/wsitconf/resources/warning.gif")));
092: jLabel1
093: .setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
094: jLabel1.setIconTextGap(0);
095:
096: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
097: this );
098: this .setLayout(layout);
099: layout
100: .setHorizontalGroup(layout
101: .createParallelGroup(
102: org.jdesktop.layout.GroupLayout.LEADING)
103: .add(
104: layout
105: .createSequentialGroup()
106: .addContainerGap()
107: .add(
108: jLabel1,
109: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
110: 16,
111: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
112: .addPreferredGap(
113: org.jdesktop.layout.LayoutStyle.RELATED)
114: .add(
115: jScrollPane1,
116: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
117: 354, Short.MAX_VALUE)
118: .addContainerGap()));
119: layout
120: .setVerticalGroup(layout
121: .createParallelGroup(
122: org.jdesktop.layout.GroupLayout.LEADING)
123: .add(
124: layout
125: .createSequentialGroup()
126: .add(
127: layout
128: .createParallelGroup(
129: org.jdesktop.layout.GroupLayout.LEADING)
130: .add(
131: layout
132: .createSequentialGroup()
133: .addContainerGap()
134: .add(
135: jLabel1))
136: .add(
137: jScrollPane1,
138: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
139: 120,
140: Short.MAX_VALUE))
141: .addContainerGap(
142: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
143: Short.MAX_VALUE)));
144: }// </editor-fold>//GEN-END:initComponents
145:
146: // Variables declaration - do not modify//GEN-BEGIN:variables
147: private javax.swing.JLabel jLabel1;
148: private javax.swing.JScrollPane jScrollPane1;
149: private javax.swing.JTextArea jTextArea1;
150: // End of variables declaration//GEN-END:variables
151:
152: }
|