summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-04-23 19:49:24 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-04-23 19:49:24 (GMT)
commitdd69c355d967e2b97f6b0562cc948f492fad43f4 (patch)
treefaa89973da76d5dd1f91ea9b11f66e1f513c0d86
parent169d8d340ea91ddb34c463332867b056e9bea035 (diff)
parentfa43afe478f114e368ebdac05b95e9ec8f12a619 (diff)
downloadQCG-Data-dd69c355d967e2b97f6b0562cc948f492fad43f4.zip
QCG-Data-dd69c355d967e2b97f6b0562cc948f492fad43f4.tar.gz
QCG-Data-dd69c355d967e2b97f6b0562cc948f492fad43f4.tar.bz2
Merge branch 'master' of ssh://code.renci.org/gitroot/irodsidrop
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java8
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java74
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties1
3 files changed, 66 insertions, 17 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
index e395fb6..9d910a4 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
@@ -58,6 +58,7 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
private Synchronization selectedSynchronization = null;
private DateFormat dateFormat = SimpleDateFormat.getDateTimeInstance();
private final iDrop idropGui;
+ private boolean initializing = true;
/**
* Creates new form IDROPConfigurationPanel
@@ -1282,7 +1283,12 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
private void comboPrefsDefaultResourceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboPrefsDefaultResourceActionPerformed
String newResource = (String)comboPrefsDefaultResource.getSelectedItem();
idropCore.getIrodsAccount().setDefaultStorageResource(newResource);
- idropGui.reinitializeForChangedIRODSAccount();
+ if (! initializing) {
+ idropGui.reinitializeForChangedIRODSAccount();
+ }
+ else {
+ initializing = false;
+ }
}//GEN-LAST:event_comboPrefsDefaultResourceActionPerformed
private void checkConnectionRestartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkConnectionRestartActionPerformed
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
index d794e2f..cdf2bf9 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
@@ -25,6 +25,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
+import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
@@ -39,6 +40,7 @@ import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO;
import org.irods.jargon.core.pub.EnvironmentalInfoAO;
+import org.irods.jargon.core.pub.ResourceAO;
import org.irods.jargon.core.pub.io.IRODSFile;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
import org.irods.jargon.core.transfer.TransferStatus;
@@ -139,7 +141,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
// setUpTransferPanel(false);
// }
//
-// setUpAccountGutter();
+ setUpAccountGutter();
setVisibleComponentsAtStartup();
@@ -607,18 +609,18 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
// /*
// * Get a list of storage resources on this host
// */
-// try {
-// ResourceAO resourceAO = this.getiDropCore().getIRODSAccessObjectFactory().getResourceAO(this.getIrodsAccount());
-// log.info("getting a list of all resources in the zone");
-// List<String> resources = new ArrayList<String>();
-// resources.add("");
-// resources.addAll(resourceAO.listResourceAndResourceGroupNames());
-// comboDefaultResource.setModel(new DefaultComboBoxModel(resources.toArray()));
-// comboDefaultResource.setSelectedItem(this.getIrodsAccount().getDefaultStorageResource());
-// } catch (JargonException ex) {
-// log.error("error getting resource list", ex);
-// throw new IdropRuntimeException("error getting resource list", ex);
-// }
+ try {
+ ResourceAO resourceAO = this.getiDropCore().getIRODSAccessObjectFactory().getResourceAO(this.getIrodsAccount());
+ log.info("getting a list of all resources in the zone");
+ List<String> resources = new ArrayList<String>();
+ resources.add("");
+ resources.addAll(resourceAO.listResourceAndResourceGroupNames());
+ cbIrodsResource.setModel(new DefaultComboBoxModel(resources.toArray()));
+ cbIrodsResource.setSelectedItem(this.getIrodsAccount().getDefaultStorageResource());
+ } catch (JargonException ex) {
+ log.error("error getting resource list", ex);
+ throw new IdropRuntimeException("error getting resource list", ex);
+ }
}
/**
@@ -1616,6 +1618,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
listLocalDrives = new javax.swing.JList();
pnlDrivesFiller = new javax.swing.JPanel();
scrollLocalFileTree = new javax.swing.JScrollPane();
+ jPanel1 = new javax.swing.JPanel();
+ jPanel2 = new javax.swing.JPanel();
+ jLabel1 = new javax.swing.JLabel();
+ cbIrodsResource = new javax.swing.JComboBox();
+ jPanel3 = new javax.swing.JPanel();
pnlMainTransferStatus = new javax.swing.JPanel();
pnlIdropBottom = new javax.swing.JPanel();
pnlCurrentTransferStatus = new javax.swing.JPanel();
@@ -1634,6 +1641,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(622, 158));
+ setPreferredSize(new java.awt.Dimension(730, 670));
setSize(new java.awt.Dimension(822, 158));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
@@ -1642,7 +1650,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
});
pnlMain.setMinimumSize(new java.awt.Dimension(622, 158));
- pnlMain.setPreferredSize(new java.awt.Dimension(730, 635));
+ pnlMain.setPreferredSize(new java.awt.Dimension(730, 670));
pnlMain.setLayout(new java.awt.BorderLayout());
pnlMainToolbar.setMinimumSize(new java.awt.Dimension(622, 131));
@@ -1807,7 +1815,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
pnlMain.add(pnlMainToolbar, java.awt.BorderLayout.NORTH);
pnlMainIrodsTree.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- pnlMainIrodsTree.setPreferredSize(new java.awt.Dimension(834, 360));
+ pnlMainIrodsTree.setPreferredSize(new java.awt.Dimension(834, 395));
pnlMainIrodsTree.setLayout(new java.awt.BorderLayout());
splitPanelTrees.setPreferredSize(new java.awt.Dimension(834, 360));
@@ -1852,6 +1860,30 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
pnlMainIrodsTree.add(splitPanelTrees, java.awt.BorderLayout.CENTER);
+ jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 10, 1, 10));
+ jPanel1.setPreferredSize(new java.awt.Dimension(100, 35));
+ jPanel1.setLayout(new java.awt.BorderLayout());
+
+ jPanel2.setLayout(new java.awt.BorderLayout());
+
+ jLabel1.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.jLabel1.text")); // NOI18N
+ jPanel2.add(jLabel1, java.awt.BorderLayout.WEST);
+
+ cbIrodsResource.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+ cbIrodsResource.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ cbIrodsResourceActionPerformed(evt);
+ }
+ });
+ jPanel2.add(cbIrodsResource, java.awt.BorderLayout.EAST);
+
+ jPanel1.add(jPanel2, java.awt.BorderLayout.WEST);
+
+ jPanel3.setPreferredSize(new java.awt.Dimension(400, 35));
+ jPanel1.add(jPanel3, java.awt.BorderLayout.EAST);
+
+ pnlMainIrodsTree.add(jPanel1, java.awt.BorderLayout.SOUTH);
+
pnlMain.add(pnlMainIrodsTree, java.awt.BorderLayout.CENTER);
pnlMainTransferStatus.setPreferredSize(new java.awt.Dimension(835, 120));
@@ -1862,7 +1894,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
pnlIdropBottom.setMinimumSize(new java.awt.Dimension(166, 66));
pnlIdropBottom.setLayout(new java.awt.BorderLayout());
- pnlCurrentTransferStatus.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
+ pnlCurrentTransferStatus.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 10, 1, 10));
pnlCurrentTransferStatus.setPreferredSize(new java.awt.Dimension(62, 62));
pnlCurrentTransferStatus.setLayout(new java.awt.GridBagLayout());
@@ -2150,6 +2182,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
this.setVisible(false);
this.formShown = false;
}//GEN-LAST:event_formWindowClosing
+
+ private void cbIrodsResourceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbIrodsResourceActionPerformed
+ String newResource = (String) cbIrodsResource.getSelectedItem();
+ this.getiDropCore().getIrodsAccount().setDefaultStorageResource(newResource);
+ }//GEN-LAST:event_cbIrodsResourceActionPerformed
/**
* @param args the command line arguments
*/
@@ -2195,7 +2232,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
private javax.swing.JButton btnMainToolbarSync;
private javax.swing.JButton btnMainToolbarUpload;
private javax.swing.JButton btnShowTransferManager;
+ private javax.swing.JComboBox cbIrodsResource;
private javax.swing.JToolBar idropProgressPanelToolbar;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JPanel jPanel3;
private javax.swing.JPopupMenu jPopupMenu1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
index 0d8eaa9..b99c8cf 100644
--- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
@@ -141,6 +141,7 @@ iDrop.lblBreadCrumb.text=
iDrop.scrollLocalFileTree.toolTipText=scroll panel tooltip
iDrop.btnMainToolbarCopy.actionCommand=Copy/Move
iDrop.btnMainToolbarCopy.text=Copy/Move
+iDrop.jLabel1.text=Resource:
DownloadDialog.title=Download Files and Collections from iRODS
DownloadDialog.jLabel1.text=Download Target Location:
DownloadDialog.jLabel2.text=Files/Collections that will be Downloaded: