this.progressDialog = new ProgressDialog(this.ownerFrame, "Please wait...", null);
/** * Constructs the progress dialog box. * * @param owner the Frame over which the progress dialog will be displayed and centred * @param title the title for the progress dialog */ public ProgressDialog(Frame owner, String title, Properties applicationProperties) { super(owner, title, true); this.applicationProperties = applicationProperties; initGui(); }
public void stopDialog() { progressBar.setIndeterminate(false); progressBar.setValue(progressBar.getMaximum()); this.setVisible(false); }
this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); this.setResizable(true); this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); this.getRootPane().getActionMap().put("ESCAPE", new AbstractAction() { private static final long serialVersionUID = 4397881858674185924L; this.getContentPane().add(container); this.pack(); this.setLocationRelativeTo(this.getOwner());
this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); this.setResizable(true); this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); this.getRootPane().getActionMap().put("ESCAPE", new AbstractAction() { private static final long serialVersionUID = 4397881858674185924L; this.getContentPane().add(container); this.pack(); this.setLocationRelativeTo(this.getOwner());
this.progressDialog = new ProgressDialog(this.ownerFrame, "Please wait...", null);
public void stopDialog() { progressBar.setIndeterminate(false); progressBar.setValue(progressBar.getMaximum()); this.setVisible(false); }
/** * Constructs the progress dialog box. * * @param owner the Frame over which the progress dialog will be displayed and centred * @param title the title for the progress dialog */ public ProgressDialog(Frame owner, String title, Properties applicationProperties) { super(owner, title, true); this.applicationProperties = applicationProperties; initGui(); }
public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Bucket Logging", null); SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.startDialog("Retrieving bucket logging status", null, 0, 0, null, null); } }); try { S3BucketLoggingStatus loggingStatus = s3Service.getBucketLoggingStatus(bucketName); loggingStatusMap.put(bucketName, loggingStatus); displayBucketLoggingStatus(loggingStatus); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); ErrorDialog.showDialog(ownerFrame, null, "Unable to retrieve bucket logging status for " + bucketName, e); } SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); } }).start();
public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Bucket Logging", null); SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.startDialog("Retrieving bucket logging status", null, 0, 0, null, null); } }); try { S3BucketLoggingStatus loggingStatus = s3Service.getBucketLoggingStatus(bucketName); loggingStatusMap.put(bucketName, loggingStatus); displayBucketLoggingStatus(loggingStatus); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); ErrorDialog.showDialog(ownerFrame, null, "Unable to retrieve bucket logging status for " + bucketName, e); } SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); } }).start();
this.setVisible(true);
public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Bucket Logging", null); SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.startDialog("Setting bucket logging status", null, 0, 0, null, null); } }); try { S3BucketLoggingStatus loggingStatus = new S3BucketLoggingStatus(loggedToBucketName[0], loggingFilePrefix[0]); s3Service.setBucketLoggingStatus(loggedBucketName, loggingStatus, true); loggingStatusMap.put(loggedBucketName, loggingStatus); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); ErrorDialog.showDialog(ownerFrame, null, "Unable to set bucket logging status for " + loggedBucketName, e); } SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); }; })).start();
public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Bucket Logging", null); SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.startDialog("Setting bucket logging status", null, 0, 0, null, null); } }); try { S3BucketLoggingStatus loggingStatus = new S3BucketLoggingStatus(loggedToBucketName[0], loggingFilePrefix[0]); s3Service.setBucketLoggingStatus(loggedBucketName, loggingStatus, true); loggingStatusMap.put(loggedBucketName, loggingStatus); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); ErrorDialog.showDialog(ownerFrame, null, "Unable to set bucket logging status for " + loggedBucketName, e); } SwingUtilities.invokeLater(new Runnable() { public void run() { progressDialog.stopDialog(); } }); }; })).start();
@Override public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Listing Distributions", null);
@Override public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Listing Distributions", null);
@Override public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Creating Distribution", null);
@Override public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Creating Distribution", null);
@Override public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Updating Distribution", null);
@Override public void run() { final ProgressDialog progressDialog = new ProgressDialog(ownerFrame, "Updating Distribution", null);