/*
 * SplashDialog.java
 *
 * Created on 9 ottobre 2004, 11.19
 */

package it.businesslogic.ireport.gui;

/**
 *
 * @author  Administrator
 */
public class SplashDialog extends javax.swing.JDialog {
    
    /** Creates new form SplashDialog */
    public SplashDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        
        //this.setSize(320,261);
        this.pack();
        it.businesslogic.ireport.util.Misc.centerFrame(this);
    }
    
    public void updateLoadingStatus(int status, String label)
    {
        jProgressBar1.setValue(status);
        if (label != null) jProgressBar1.setString( label);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jProgressBar1 = new javax.swing.JProgressBar();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);
        setUndecorated(true);
        jPanel1.setLayout(new java.awt.BorderLayout());

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/it/businesslogic/ireport/icons/logo122.png")));
        jLabel1.setIconTextGap(0);
        jPanel1.add(jLabel1, java.awt.BorderLayout.CENTER);

        jProgressBar1.setMinimumSize(new java.awt.Dimension(10, 21));
        jProgressBar1.setPreferredSize(new java.awt.Dimension(148, 21));
        jProgressBar1.setString("Loading");
        jProgressBar1.setStringPainted(true);
        jPanel1.add(jProgressBar1, java.awt.BorderLayout.SOUTH);

        getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);

        pack();
    }// </editor-fold>//GEN-END:initComponents
        
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JProgressBar jProgressBar1;
    // End of variables declaration//GEN-END:variables
    
}
