/** * Runs Cockpit as a stand-alone application. * @param args * @throws Exception */ public static void main(String args[]) throws Exception { // When running on OS X, display app menu in the right place (i.e. not the app window) System.setProperty("apple.laf.useScreenMenuBar", "true"); JFrame ownerFrame = new JFrame("JetS3t Cockpit"); ownerFrame.addWindowListener(new WindowListener() { public void windowOpened(WindowEvent e) { } public void windowClosing(WindowEvent e) { e.getWindow().dispose(); } public void windowClosed(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowDeiconified(WindowEvent e) { } public void windowActivated(WindowEvent e) { } public void windowDeactivated(WindowEvent e) { } }); new Cockpit(ownerFrame); }
/** * Handles list selection events for this application. */ public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } if (e.getSource().equals(bucketsTable.getSelectionModel())) { bucketSelectedAction(); } else if (e.getSource().equals(objectsTable.getSelectionModel())) { objectSelectedAction(); } }
loginEvent(null); } else if ("LogoutEvent".equals(event.getActionCommand())) { logoutEvent(); } else if (event.getActionCommand() != null && event.getActionCommand().startsWith("LoginSwitch")) { String loginName = event.getActionCommand().substring("LoginSwitch:".length()); ProviderCredentials credentials = loginAwsCredentialsMap.get(loginName); loginEvent(credentials); } else if ("QuitEvent".equals(event.getActionCommand())) { System.exit(0); listBucketProperties(); } else if ("RefreshBuckets".equals(event.getActionCommand())) { listAllBuckets(); } else if ("CreateBucket".equals(event.getActionCommand())) { createBucketAction(); } else if ("DeleteBucket".equals(event.getActionCommand())) { deleteSelectedBucket(); } else if ("ManageDistributions".equals(event.getActionCommand())) { S3Bucket[] buckets = bucketTableModel.getBuckets(); addThirdPartyBucket(); } else if ("UpdateBucketACL".equals(event.getActionCommand())) { updateBucketAccessControlList(); } else if ("UpdateBucketRequesterPaysStatus".equals(event.getActionCommand())) { updateBucketRequesterPaysSetting(); displayObjectsAttributesDialog(); } else if ("CopyObjects".equals(event.getActionCommand())) { copyObjects();
loginEvent(null); } else if ("LogoutEvent".equals(event.getActionCommand())) { logoutEvent(); } else if (event.getActionCommand() != null && event.getActionCommand().startsWith("LoginSwitch")) { String loginName = event.getActionCommand().substring("LoginSwitch:".length()); ProviderCredentials credentials = loginAwsCredentialsMap.get(loginName); loginEvent(credentials); } else if ("QuitEvent".equals(event.getActionCommand())) { System.exit(0); listBucketProperties(); } else if ("RefreshBuckets".equals(event.getActionCommand())) { listAllBuckets(); } else if ("CreateBucket".equals(event.getActionCommand())) { createBucketAction(); } else if ("DeleteBucket".equals(event.getActionCommand())) { deleteSelectedBucket(); } else if ("ManageDistributions".equals(event.getActionCommand())) { S3Bucket[] buckets = bucketTableModel.getBuckets(); addThirdPartyBucket(); } else if ("UpdateBucketACL".equals(event.getActionCommand())) { updateBucketAccessControlList(); } else if ("UpdateBucketRequesterPaysStatus".equals(event.getActionCommand())) { updateBucketRequesterPaysSetting(); displayObjectsAttributesDialog(); } else if ("CopyObjects".equals(event.getActionCommand())) { copyObjects();
/** * Handles list selection events for this application. */ public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } if (e.getSource().equals(bucketsTable.getSelectionModel())) { bucketSelectedAction(); } else if (e.getSource().equals(objectsTable.getSelectionModel())) { objectSelectedAction(); } }
/** * Runs Cockpit as a stand-alone application. * @param args * @throws Exception */ public static void main(String args[]) throws Exception { // When running on OS X, display app menu in the right place (i.e. not the app window) System.setProperty("apple.laf.useScreenMenuBar", "true"); JFrame ownerFrame = new JFrame("JetS3t Cockpit"); ownerFrame.addWindowListener(new WindowListener() { public void windowOpened(WindowEvent e) { } public void windowClosing(WindowEvent e) { e.getWindow().dispose(); } public void windowClosed(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowDeiconified(WindowEvent e) { } public void windowActivated(WindowEvent e) { } public void windowDeactivated(WindowEvent e) { } }); new Cockpit(ownerFrame); }