summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authorLISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-02-13 20:56:16 (GMT)
committer LISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-02-13 20:56:16 (GMT)
commita6faf7b3c41e669855d89ecd49ca2ae70d87fe2a (patch)
tree5b15b2fc2c98e187573a60e7318831df79f835ff /idrop-lite
parent0733f11acdaf61f2ba1bc034e3be59d7ec83760d (diff)
downloadQCG-Data-a6faf7b3c41e669855d89ecd49ca2ae70d87fe2a.zip
QCG-Data-a6faf7b3c41e669855d89ecd49ca2ae70d87fe2a.tar.gz
QCG-Data-a6faf7b3c41e669855d89ecd49ca2ae70d87fe2a.tar.bz2
[#615] removed Cancel button in display mode 3 and fixed negative file size in download table
Diffstat (limited to 'idrop-lite')
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.form15
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java40
-rw-r--r--idrop-lite/src/main/resources/org/irods/jargon/idrop/lite/Bundle.properties1
3 files changed, 11 insertions, 45 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.form b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.form
index f24a687..339de36 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.form
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.form
@@ -1680,7 +1680,7 @@
<Container class="javax.swing.JPanel" name="jPanel4">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[300, 40]"/>
+ <Dimension value="[160, 40]"/>
</Property>
</Properties>
<Constraints>
@@ -1704,19 +1704,6 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bntBeginDownloadActionPerformed"/>
</Events>
</Component>
- <Component class="javax.swing.JButton" name="btnCancelDownload">
- <Properties>
- <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
- <Font name="Lucida Grande" size="12" style="0"/>
- </Property>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/irods/jargon/idrop/lite/Bundle.properties" key="iDropLiteApplet.btnCancelDownload.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCancelDownloadActionPerformed"/>
- </Events>
- </Component>
</SubComponents>
</Container>
</SubComponents>
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 2c576e3..8464045 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
@@ -34,7 +34,6 @@ import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
-import javax.swing.filechooser.FileSystemView;
import javax.swing.table.DefaultTableModel;
import javax.swing.tree.TreePath;
@@ -54,6 +53,7 @@ import org.irods.jargon.datautils.datacache.DataCacheServiceFactory;
import org.irods.jargon.datautils.datacache.DataCacheServiceFactoryImpl;
import org.irods.jargon.datautils.datacache.DataCacheServiceImpl;
import org.irods.jargon.datautils.shoppingcart.FileShoppingCart;
+import org.irods.jargon.datautils.shoppingcart.ShoppingCartEntry;
import org.irods.jargon.datautils.shoppingcart.ShoppingCartService;
import org.irods.jargon.datautils.shoppingcart.ShoppingCartServiceImpl;
import org.irods.jargon.idrop.lite.finder.IRODSFinderDialog;
@@ -1202,6 +1202,12 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
dataCacheServiceFactory);
log.info("getting cart as logged in user, key: {}", this.key);
cart = shoppingCartService.retreiveShoppingCartAsLoggedInUser(this.key);
+
+ // for testing
+ //cart = FileShoppingCart.instance();
+ //ShoppingCartEntry entry = ShoppingCartEntry.instance("/test1/home/test1/NC_DEMv2_6_Tile16.txt");
+ //cart.addAnItem(entry);
+ //
} catch (JargonException e) {
log.error("could not create shopping cart");
Logger.getLogger(iDropLiteApplet.class.getName()).log(Level.SEVERE, null, e);
@@ -1212,9 +1218,6 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
cartContents = cart.getShoppingCartFileList();
}
- // for testing
- // cartContents.add("/renci/home/rods/lisa/icp.out");
-
log.info("returning contents of shopping cart {}", cartContents);
return cartContents;
}
@@ -1241,7 +1244,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
log.error("cannot retrieve irods file size for display in download table");
fileSize = 0;
}
- rowData[1] = (int) fileSize;
+ rowData[1] = fileSize;
rowData[2] = 0;
rowData[3] = Boolean.TRUE;
rowData[4] = fileType;
@@ -1461,7 +1464,6 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
bntBeginDownload = new javax.swing.JButton();
- btnCancelDownload = new javax.swing.JButton();
pnlIdropWebMode = new javax.swing.JPanel();
pnlIdropWebModeDownloadTarget = new javax.swing.JPanel();
txtIdropWebModeDownloadTarget = new javax.swing.JTextField();
@@ -2038,7 +2040,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
}
) {
Class[] types = new Class [] {
- java.lang.String.class, java.lang.Integer.class, java.lang.Object.class, java.lang.Boolean.class, java.lang.Integer.class
+ java.lang.String.class, java.lang.Long.class, java.lang.Object.class, java.lang.Boolean.class, java.lang.Integer.class
};
boolean[] canEdit = new boolean [] {
false, false, false, true, false
@@ -2238,7 +2240,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
pnlDownloadButtons.setLayout(new java.awt.BorderLayout());
pnlDownloadButtons.add(jPanel3, java.awt.BorderLayout.WEST);
- jPanel4.setPreferredSize(new java.awt.Dimension(300, 40));
+ jPanel4.setPreferredSize(new java.awt.Dimension(160, 40));
bntBeginDownload.setFont(new java.awt.Font("Lucida Grande", 0, 12));
bntBeginDownload.setText(org.openide.util.NbBundle.getMessage(iDropLiteApplet.class, "iDropLiteApplet.bntBeginDownload.text")); // NOI18N
@@ -2249,15 +2251,6 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
});
jPanel4.add(bntBeginDownload);
- btnCancelDownload.setFont(new java.awt.Font("Lucida Grande", 0, 12));
- btnCancelDownload.setText(org.openide.util.NbBundle.getMessage(iDropLiteApplet.class, "iDropLiteApplet.btnCancelDownload.text")); // NOI18N
- btnCancelDownload.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelDownloadActionPerformed(evt);
- }
- });
- jPanel4.add(btnCancelDownload);
-
pnlDownloadButtons.add(jPanel4, java.awt.BorderLayout.EAST);
pnlOperationMode3.add(pnlDownloadButtons, java.awt.BorderLayout.PAGE_END);
@@ -2540,18 +2533,6 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
}
}//GEN-LAST:event_bntBeginDownloadActionPerformed
- private void btnCancelDownloadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelDownloadActionPerformed
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
- if (isTransferInProgress()) {
- setTransferCancelled(true);
- }
- }
- });
- }//GEN-LAST:event_btnCancelDownloadActionPerformed
-
private void btnUploadUrlActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUploadUrlActionPerformed
UploadFromURLDialog dlgUploadFromURL = new UploadFromURLDialog(this, true);
dlgUploadFromURL.setSize(495, 200);
@@ -2570,7 +2551,6 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
private javax.swing.JButton bntBeginDownload;
private javax.swing.JButton btnBrowseDownloadTarget;
private javax.swing.JButton btnBrowseIRODSUploadDest;
- private javax.swing.JButton btnCancelDownload;
private javax.swing.JButton btnIdropWebModeBeginDownload;
private javax.swing.JButton btnIdropWebModeTargetBrowse;
private javax.swing.JButton btnIrodsTreeRefresh;
diff --git a/idrop-lite/src/main/resources/org/irods/jargon/idrop/lite/Bundle.properties b/idrop-lite/src/main/resources/org/irods/jargon/idrop/lite/Bundle.properties
index f59ca2e..38a814d 100644
--- a/idrop-lite/src/main/resources/org/irods/jargon/idrop/lite/Bundle.properties
+++ b/idrop-lite/src/main/resources/org/irods/jargon/idrop/lite/Bundle.properties
@@ -31,7 +31,6 @@ iDropLiteApplet.btnUploadBeginImport.text=Begin Import
iDropLiteApplet.btnUploadUrl.text=Import file from URL
iDropLiteApplet.txtDownloadTarget.text=
iDropLiteApplet.bntBeginDownload.text=Begin Download
-iDropLiteApplet.btnCancelDownload.text=Cancel
iDropLiteApplet.btnBrowseDownloadTarget.text=Browse
iDropLiteApplet.txtIdropWebModeDownloadTarget.text=
iDropLiteApplet.btnIdropWebModeTargetBrowse.text=Browse