/** * Dialog box for displaying and modifying CloudFront distributions. * * @param ownerFrame * the frame that will own the dialog. * @param cloudFrontService * a CloudFrontService that will be used to query and update distributions. This * service must be initialised with the necessary AWS credentials to perform the * API operations. * @param hyperlinkListener * the listener that will act on any hyperlink events triggered by the user clicking on HTTP links. */ public static void showDialog(Frame ownerFrame, CloudFrontService cloudFrontService, String[] bucketNames, HyperlinkActivatedListener hyperlinkListener) { ManageDistributionsDialog dialog = new ManageDistributionsDialog( ownerFrame, cloudFrontService, bucketNames, hyperlinkListener); dialog.setVisible(true); dialog.dispose(); }
this.getRootPane().setDefaultButton(finishedButton); 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 = -7782288899638043533L; 2, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, insetsHorizontalOnly, 0, 0)); this.getContentPane().setLayout(new GridBagLayout()); this.getContentPane().add(tablePanel, new GridBagConstraints(0, 0, 1, 1, 1, 2, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); this.getContentPane().add(detailPanel, new GridBagConstraints(0, 1, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsHorizontalOnly, 0, 0)); this.getContentPane().add(finishedButton, new GridBagConstraints(0, 2, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, insetsHorizontalOnly, 0, 0)); this.pack(); this.setSize(690, 600); columnModel.getColumn(3).setPreferredWidth(210); // Domain name columnModel.getColumn(4).setPreferredWidth(220); // Last Modified this.setLocationRelativeTo(ownerFrame); refreshDistributions();
public void actionPerformed(ActionEvent event) { if (event.getSource().equals(finishedButton)) { this.setVisible(false); } else if (event.getActionCommand().equals("AddCname")) { cnamesTableModel.addCname("New CNAME"); cnamesTableModel.removeRow(cnamesTable.getSelectedRow()); } else if (event.getActionCommand().equals("RefreshDistributions")) { refreshDistributions(); } else if (event.getActionCommand().equals("DeleteDistribution")) { final Distribution distribution = distributionListTableModel.getDistributionAtRow(
defaultRootObject, minTTL); refreshDistributions(); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() {
public void actionPerformed(ActionEvent actionEvent) { setVisible(false); } });
bucketNames[i] = buckets[i].getName(); ManageDistributionsDialog.showDialog(ownerFrame, cloudFrontService, bucketNames, this); } else if ("AddThirdPartyBucket".equals(event.getActionCommand())) { addThirdPartyBucket();
this.getRootPane().setDefaultButton(finishedButton); 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 = -7782288899638043533L; 2, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, insetsHorizontalOnly, 0, 0)); this.getContentPane().setLayout(new GridBagLayout()); this.getContentPane().add(tablePanel, new GridBagConstraints(0, 0, 1, 1, 1, 2, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); this.getContentPane().add(detailPanel, new GridBagConstraints(0, 1, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsHorizontalOnly, 0, 0)); this.getContentPane().add(finishedButton, new GridBagConstraints(0, 2, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, insetsHorizontalOnly, 0, 0)); this.pack(); this.setSize(690, 600); columnModel.getColumn(3).setPreferredWidth(210); // Domain name columnModel.getColumn(4).setPreferredWidth(220); // Last Modified this.setLocationRelativeTo(ownerFrame); refreshDistributions();
public void actionPerformed(ActionEvent event) { if (event.getSource().equals(finishedButton)) { this.setVisible(false); } else if (event.getActionCommand().equals("AddCname")) { cnamesTableModel.addCname("New CNAME"); cnamesTableModel.removeRow(cnamesTable.getSelectedRow()); } else if (event.getActionCommand().equals("RefreshDistributions")) { refreshDistributions(); } else if (event.getActionCommand().equals("DeleteDistribution")) { final Distribution distribution = distributionListTableModel.getDistributionAtRow(
defaultRootObject, minTTL); refreshDistributions(); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() {
public void actionPerformed(ActionEvent actionEvent) { setVisible(false); } });
bucketNames[i] = buckets[i].getName(); ManageDistributionsDialog.showDialog(ownerFrame, cloudFrontService, bucketNames, this); } else if ("AddThirdPartyBucket".equals(event.getActionCommand())) { addThirdPartyBucket();
/** * Dialog box for displaying and modifying CloudFront distributions. * * @param ownerFrame * the frame that will own the dialog. * @param cloudFrontService * a CloudFrontService that will be used to query and update distributions. This * service must be initialised with the necessary AWS credentials to perform the * API operations. * @param hyperlinkListener * the listener that will act on any hyperlink events triggered by the user clicking on HTTP links. */ public static void showDialog(Frame ownerFrame, CloudFrontService cloudFrontService, String[] bucketNames, HyperlinkActivatedListener hyperlinkListener) { ManageDistributionsDialog dialog = new ManageDistributionsDialog( ownerFrame, cloudFrontService, bucketNames, hyperlinkListener); dialog.setVisible(true); dialog.dispose(); }
defaultRootObject, minTTL); refreshDistributions(); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() {
refreshDistributions(); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() {
defaultRootObject, minTTL); refreshDistributions(); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() {
refreshDistributions(); } catch (Exception e) { SwingUtilities.invokeLater(new Runnable() {