//$Header: /cvsroot-fuse/mec-as2/39/mendelson/util/clientserver/connectionprogress/JDialogConnectionProgress.java,v 1.1 2012/04/18 14:10:44 heller Exp $ package de.mendelson.util.clientserver.connectionprogress; import de.mendelson.util.MecResourceBundle; import java.util.MissingResourceException; import java.util.ResourceBundle; import javax.swing.JDialog; import javax.swing.JFrame; /* * Copyright (C) mendelson-e-commerce GmbH Berlin Germany * * This software is subject to the license agreement set forth in the license. * Please read and agree to all terms before using this software. * Other product and brand names are trademarks of their respective owners. */ /** * GUI Client root implementation * @author S.Heller * @version $Revision: 1.1 $ */ public class JDialogConnectionProgress extends JDialog { private MecResourceBundle rb = null; /** Creates new form JDialogConnectionProgress */ public JDialogConnectionProgress(JFrame parent) { super(parent); //load resource bundle try { this.rb = (MecResourceBundle) ResourceBundle.getBundle( ResourceBundleConnectionProgress.class.getName()); } catch (MissingResourceException e) { throw new RuntimeException("Oops..resource bundle " + e.getClassName() + " not found."); } initComponents(); } public void setHost(String host) { this.jLabelConnect.setText(this.rb.getResourceString("connecting.to", host)); } /** 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. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jPanelMain = new javax.swing.JPanel(); jProgressBar = new javax.swing.JProgressBar(); jLabelConnect = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setFocusable(false); setFocusableWindowState(false); setResizable(false); setUndecorated(true); getContentPane().setLayout(new java.awt.GridBagLayout()); jPanelMain.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanelMain.setLayout(new java.awt.GridBagLayout()); jProgressBar.setFocusable(false); jProgressBar.setIndeterminate(true); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 10, 10, 10); jPanelMain.add(jProgressBar, gridBagConstraints); jLabelConnect.setText(this.rb.getResourceString( "connecting.to")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(10, 10, 5, 10); jPanelMain.add(jLabelConnect, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; getContentPane().add(jPanelMain, gridBagConstraints); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width-243)/2, (screenSize.height-75)/2, 243, 75); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabelConnect; private javax.swing.JPanel jPanelMain; private javax.swing.JProgressBar jProgressBar; // End of variables declaration//GEN-END:variables }