summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorLisa Stillwell <lisa@renci.org>2012-10-31 20:32:17 (GMT)
committer Lisa Stillwell <lisa@renci.org>2012-10-31 20:32:17 (GMT)
commit7aa71fe5189ac6c892a2fc9b109226423a6dcd6a (patch)
tree07e5bb62106f5be64109db09ee48e42d874d99e8 /idrop-swing
parent55d501883a6e1bb8bedc0b0e5ccb11a3794103cd (diff)
downloadQCG-Data-7aa71fe5189ac6c892a2fc9b109226423a6dcd6a.zip
QCG-Data-7aa71fe5189ac6c892a2fc9b109226423a6dcd6a.tar.gz
QCG-Data-7aa71fe5189ac6c892a2fc9b109226423a6dcd6a.tar.bz2
[#983] added logic to support discussed upload feature
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/finder/IRODSFinderTreeSelectionListener.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/finder/IRODSFinderTreeSelectionListener.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/finder/IRODSFinderTreeSelectionListener.java
new file mode 100644
index 0000000..5e1f6d4
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/finder/IRODSFinderTreeSelectionListener.java
@@ -0,0 +1,51 @@
+/*
+ *A listener for iRODS finder dialog tree selected
+ */
+package org.irods.jargon.idrop.finder;
+
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeSelectionEvent;
+
+import org.irods.jargon.idrop.exceptions.IdropException;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This object will listen to tree selection events in the iDrop Finder Dialog iRODS tree,
+ * and update the Select button on the iRODS Finder dialog
+ *
+ *
+ *
+ * @author Mike Conway - DICE (www.irods.org)
+ */
+public class IRODSFinderTreeSelectionListener implements
+ ListSelectionListener {
+
+ public static org.slf4j.Logger log = LoggerFactory.getLogger(IRODSFinderTreeSelectionListener.class);
+ private final IRODSFinderDialog irodsFinderDialog;
+
+ public IRODSFinderTreeSelectionListener(final IRODSFinderDialog irodsFinderDialog)
+ throws IdropException {
+ if (irodsFinderDialog == null) {
+ throw new IdropException("null irods finder dialog");
+ }
+
+ this.irodsFinderDialog = irodsFinderDialog;
+
+ }
+
+ public void treeExpanded(final TreeExpansionEvent event) {
+ // operation not needed, left for interface contract
+ }
+
+ public void treeCollapsed(final TreeExpansionEvent event) {
+ // operation not needed, left for interface contract
+ }
+
+ @Override
+ public void valueChanged(ListSelectionEvent lse) {
+ log.info("lse: {}", lse);
+ irodsFinderDialog.enableButtonSelectFolder(true);
+ }
+}