/**
* Actions performed when a bucket is selected in the bucket list table.
*/
private void bucketSelectedAction() {
S3Bucket newlySelectedBucket = getCurrentSelectedBucket();
if (newlySelectedBucket == null) {
viewBucketPropertiesMenuItem.setEnabled(false);
refreshBucketMenuItem.setEnabled(true);
updateBucketACLMenuItem.setEnabled(false);
deleteBucketMenuItem.setEnabled(false);
refreshObjectMenuItem.setEnabled(false);
uploadFilesMenuItem.setEnabled(false);
objectTableModel.removeAllObjects();
objectsTable.getDropTarget().setActive(false);
objectsTableSP.getDropTarget().setActive(false);
return;
}
viewBucketPropertiesMenuItem.setEnabled(true);
refreshBucketMenuItem.setEnabled(true);
updateBucketACLMenuItem.setEnabled(true);
deleteBucketMenuItem.setEnabled(true);
refreshObjectMenuItem.setEnabled(true);
uploadFilesMenuItem.setEnabled(true);
objectsTable.getDropTarget().setActive(true);
objectsTableSP.getDropTarget().setActive(true);
if (cachedBuckets.containsKey(newlySelectedBucket.getName())) {
S3Object[] objects = (S3Object[]) cachedBuckets.get(newlySelectedBucket.getName());
objectTableModel.removeAllObjects();
objectTableModel.addObjects(objects);
updateObjectsSummary(false);
} else {