summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-04-23 19:48:59 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-04-23 19:48:59 (GMT)
commit169d8d340ea91ddb34c463332867b056e9bea035 (patch)
tree5343e86f42fe190cb42beaf68f25a3e695995737 /idrop-lite
parente4c217f7f7782b185dc8989c5bc64b3f8fef9446 (diff)
downloadQCG-Data-169d8d340ea91ddb34c463332867b056e9bea035.zip
QCG-Data-169d8d340ea91ddb34c463332867b056e9bea035.tar.gz
QCG-Data-169d8d340ea91ddb34c463332867b056e9bea035.tar.bz2
[#1250] jargon/idrop performance testing and optimization for 3.3.2
Diffstat (limited to 'idrop-lite')
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/IRODSTree.java1
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/OutlineRenderProvider.java56
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java2
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java1
4 files changed, 59 insertions, 1 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/IRODSTree.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/IRODSTree.java
index e5994c8..65fb7b3 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/IRODSTree.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/IRODSTree.java
@@ -92,6 +92,7 @@ public class IRODSTree extends Outline implements TreeWillExpandListener,
setTransferHandler(new IRODSTreeTransferHandler(idropParentGui,
"selectionModel"));
setDropMode(javax.swing.DropMode.USE_SELECTION);
+ this.setRenderDataProvider(new OutlineRenderProvider(this));
setUpTreeMenu();
IrodsSelectionListenerForBuildingInfoPanel treeListener;
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/OutlineRenderProvider.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/OutlineRenderProvider.java
new file mode 100644
index 0000000..735bd24
--- /dev/null
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/OutlineRenderProvider.java
@@ -0,0 +1,56 @@
+
+package org.irods.jargon.idrop.lite;
+
+import java.text.DateFormat;
+import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
+import org.netbeans.swing.outline.RenderDataProvider;
+
+/**
+ * @author Mike Conway - DICE (www.irods.org)
+ */
+public class OutlineRenderProvider implements RenderDataProvider {
+ private final IRODSTree tree;
+ private final DateFormat dateFormat = DateFormat.getDateTimeInstance();
+
+ public OutlineRenderProvider(final IRODSTree tree) {
+ this.tree = tree;
+ }
+
+ public java.awt.Color getBackground(Object o) {
+ return null;
+ }
+
+ public String getDisplayName(Object o) {
+ return o.toString();
+ }
+
+ public java.awt.Color getForeground(Object o) {
+ return null;
+ }
+
+ public javax.swing.Icon getIcon(Object o) {
+ return null;
+ }
+
+ public String getTooltipText(Object o) {
+ IRODSNode node = (IRODSNode) o;
+ CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) node.getUserObject();
+ StringBuilder sb = new StringBuilder();
+ sb.append("<html>");
+ sb.append("<h3>");
+ sb.append(entry.getFormattedAbsolutePath());
+ sb.append("</h3>");
+ sb.append("<b>size:</b>");
+ sb.append(entry.getDisplayDataSize());
+ sb.append("<br/><b>last mod:</b>");
+ if (entry.getModifiedAt() != null) {
+ sb.append(dateFormat.format(entry.getModifiedAt()));
+ }
+ sb.append("</html>");
+ return sb.toString();
+ }
+
+ public boolean isHtmlDisplayName(Object o) {
+ return false;
+ }
+ } \ No newline at end of file
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java
index 66b1374..265a7b6 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java
@@ -1,5 +1,5 @@
package org.irods.jargon.idrop.lite;
public final class Version {
public static String VERSION="2.0.1-SNAPSHOT";
- public static String BUILD_TIME="20130419-1021";
+ public static String BUILD_TIME="20130423-1515";
}
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
index 5766130..124dce8 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
@@ -317,6 +317,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
log.info("creating idropCore...");
iDropCore = new iDropLiteCore();
+ iDropCore.setIrodsFileSystem(irodsFileSystem);
if (!processLogin()) {
return false;