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-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.db.explorer.dlg;
043:
044: import java.awt.BorderLayout;
045: import javax.swing.JComponent;
046: import org.openide.util.NbBundle;
047:
048: /**
049: *
050: * @author Andrei Badea
051: */
052: public class GrabTableProgressPanel extends javax.swing.JPanel {
053:
054: public GrabTableProgressPanel() {
055: initComponents();
056: }
057:
058: public void setProgressComponent(JComponent component) {
059: progressPlaceHolderPanel.removeAll();
060: progressPlaceHolderPanel.add(component, BorderLayout.CENTER);
061: }
062:
063: /** This method is called from within the constructor to
064: * initialize the form.
065: * WARNING: Do NOT modify this code. The content of this method is
066: * always regenerated by the Form Editor.
067: */
068: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
069: private void initComponents() {
070: messageLabel = new javax.swing.JLabel();
071: progressPlaceHolderPanel = new javax.swing.JPanel();
072:
073: messageLabel.setText(NbBundle.getBundle(
074: "org.netbeans.modules.db.resources.Bundle").getString(
075: "GrabTableProgressDialogMessage"));
076: messageLabel.getAccessibleContext().setAccessibleName(
077: NbBundle.getBundle(
078: "org.netbeans.modules.db.resources.Bundle")
079: .getString("GrabTableProgressDialogMessage"));
080: messageLabel.getAccessibleContext().setAccessibleDescription(
081: NbBundle.getBundle(
082: "org.netbeans.modules.db.resources.Bundle")
083: .getString("GrabTableProgressDialogMessage"));
084:
085: progressPlaceHolderPanel.setLayout(new java.awt.BorderLayout());
086:
087: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
088: this );
089: this .setLayout(layout);
090: layout
091: .setHorizontalGroup(layout
092: .createParallelGroup(
093: org.jdesktop.layout.GroupLayout.LEADING)
094: .add(
095: org.jdesktop.layout.GroupLayout.LEADING,
096: layout
097: .createSequentialGroup()
098: .addContainerGap()
099: .add(
100: layout
101: .createParallelGroup(
102: org.jdesktop.layout.GroupLayout.LEADING)
103: .add(
104: messageLabel)
105: .add(
106: progressPlaceHolderPanel,
107: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
108: 376,
109: Short.MAX_VALUE))
110: .addContainerGap()));
111: layout.setVerticalGroup(layout.createParallelGroup(
112: org.jdesktop.layout.GroupLayout.LEADING).add(
113: org.jdesktop.layout.GroupLayout.LEADING,
114: layout.createSequentialGroup().addContainerGap().add(
115: messageLabel).addPreferredGap(
116: org.jdesktop.layout.LayoutStyle.RELATED).add(
117: progressPlaceHolderPanel,
118: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
119: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
120: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
121: .addContainerGap(18, Short.MAX_VALUE)));
122: }
123:
124: // </editor-fold>//GEN-END:initComponents
125:
126: // Variables declaration - do not modify//GEN-BEGIN:variables
127: public javax.swing.JLabel messageLabel;
128: public javax.swing.JPanel progressPlaceHolderPanel;
129: // End of variables declaration//GEN-END:variables
130:
131: }
|