summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-08-21 19:11:37 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-08-21 19:11:37 (GMT)
commit13e6cfd0b760ca033fccda3bb662f264feedd155 (patch)
tree3c628851f36684a8141d89d2f827043e21d9e37b
parentee54c3cb46b78b1fe641ba917f815c69db6e4e34 (diff)
parent2149430f72a533d846465bc8ffd529e087af9eba (diff)
downloadQCG-Data-13e6cfd0b760ca033fccda3bb662f264feedd155.zip
QCG-Data-13e6cfd0b760ca033fccda3bb662f264feedd155.tar.gz
QCG-Data-13e6cfd0b760ca033fccda3bb662f264feedd155.tar.bz2
Merge branch 'master' of ssh://code.renci.org/gitroot/irodsidrop
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java2
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.form67
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java63
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form34
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java21
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/TreeUtils.java42
6 files changed, 185 insertions, 44 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java
index 557dec7..188c443 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List;
import javax.swing.tree.TreePath;
+import org.slf4j.LoggerFactory;
/**
* Utilities for working with local file systems
@@ -12,6 +13,7 @@ import javax.swing.tree.TreePath;
* @author Mike Conway - DICE (www.irods.org)
*/
public class LocalFileUtils {
+ private static final org.slf4j.Logger log = LoggerFactory.getLogger(iDropLiteApplet.class);
public static List<String> listFileRootsForSystem() {
List<String> fileRoots = new ArrayList<String>();
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 caf9a90..d51bceb 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
@@ -255,7 +255,7 @@
<Dimension value="[101, 44]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[292, 44]"/>
+ <Dimension value="[295, 110]"/>
</Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
@@ -268,6 +268,11 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="pnlLocalRefreshButton">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[101, 35]"/>
+ </Property>
+ </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="North"/>
@@ -286,6 +291,12 @@
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="scrollLocalDrives">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[285, 140]"/>
+ </Property>
+ <Property name="requestFocusEnabled" type="boolean" value="false"/>
+ </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
@@ -293,8 +304,28 @@
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JList" name="lstLocalDrives">
+ <Properties>
+ <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
+ <StringArray count="0"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[39, 75]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[100, 75]"/>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlDrivesFiller">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[292, 5]"/>
+ </Property>
+ </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="South"/>
@@ -309,7 +340,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ <EmptySpace min="0" pref="5" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
@@ -576,7 +607,7 @@
<Dimension value="[100, 44]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[289, 44]"/>
+ <Dimension value="[285, 120]"/>
</Property>
</Properties>
<Constraints>
@@ -588,6 +619,11 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="pnlUploadRefreshButton">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[101, 35]"/>
+ </Property>
+ </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="North"/>
@@ -609,6 +645,11 @@
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="scrollUploadLocalDrives">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[282, 140]"/>
+ </Property>
+ </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
@@ -616,8 +657,26 @@
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JList" name="lstUploadLocalDrives">
+ <Properties>
+ <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
+ <StringArray count="0"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[285, 85]"/>
+ </Property>
+ <Property name="requestFocusEnabled" type="boolean" value="false"/>
+ </Properties>
+ </Component>
+ </SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlUploadLocalDrivesFiller">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[289, 10]"/>
+ </Property>
+ </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="South"/>
@@ -632,7 +691,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="100" max="32767" attributes="0"/>
+ <EmptySpace min="0" pref="10" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
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 99b091f..8b077f4 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
@@ -68,8 +68,6 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
IRODSFileSystem irodsFileSystem = null;
private LocalFileSystemModel localFileModel = null;
private LocalFileSystemModel localUploadFileModel = null;
- private JList listLocalDrives;
- private JList listUploadLocalDrives;
/** Initializes the applet NewJApplet */
public void init() {
@@ -345,11 +343,10 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
@Override
public void run() {
- listLocalDrives = new JList();
initializeLocalFileTreeModel(null);
fileTree = new LocalFileTree(localFileModel, gui);
- listLocalDrives.getSelectionModel().addListSelectionListener(
+ lstLocalDrives.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
@Override
@@ -360,7 +357,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
log.debug("new local file system model");
log.debug("selection event:{}", e);
- Object selectedItem = listLocalDrives.getSelectedValue();
+ Object selectedItem = lstLocalDrives.getSelectedValue();
initializeLocalFileTreeModelWhenDriveIsSelected(selectedItem);
}
@@ -395,11 +392,10 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
@Override
public void run() {
- listUploadLocalDrives = new JList();
initializeUploadLocalFileTreeModel(null);
fileUploadTree = new LocalFileTree(localUploadFileModel, gui);
- listUploadLocalDrives.getSelectionModel().addListSelectionListener(
+ lstUploadLocalDrives.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
@Override
@@ -410,7 +406,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
log.debug("new uload local file system model");
log.debug("uload selection event:{}", e);
- Object selectedItem = listUploadLocalDrives.getSelectedValue();
+ Object selectedItem = lstUploadLocalDrives.getSelectedValue();
initializeUploadLocalFileTreeModelWhenDriveIsSelected(selectedItem);
}
@@ -428,17 +424,17 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
final Object selectedDrive) {
if (selectedDrive == null) {
log.debug("selected drive is null, use the first one");
- listLocalDrives.setSelectedIndex(0);
+ lstLocalDrives.setSelectedIndex(0);
localFileModel = new LocalFileSystemModel(new LocalFileNode(
- new File((String) listLocalDrives.getSelectedValue())));
+ new File((String) lstLocalDrives.getSelectedValue())));
fileTree.setModel(localFileModel);
} else {
log.debug(
"selected drive is not null, create new root based on selection",
selectedDrive);
- listLocalDrives.setSelectedValue(selectedDrive, true);
+ lstLocalDrives.setSelectedValue(selectedDrive, true);
localFileModel = new LocalFileSystemModel(new LocalFileNode(
new File((String) selectedDrive)));
fileTree.setModel(localFileModel);
@@ -468,7 +464,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
listModel.addElement(root);
}
- listLocalDrives.setModel(listModel);
+ lstLocalDrives.setModel(listModel);
scrollLocalDrives.setVisible(true);
}
@@ -478,17 +474,17 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
final Object selectedDrive) {
if (selectedDrive == null) {
log.debug("selected drive is null, use the first one");
- listUploadLocalDrives.setSelectedIndex(0);
+ lstUploadLocalDrives.setSelectedIndex(0);
localUploadFileModel = new LocalFileSystemModel(new LocalFileNode(
- new File((String) listUploadLocalDrives.getSelectedValue())));
+ new File((String) lstUploadLocalDrives.getSelectedValue())));
fileUploadTree.setModel(localUploadFileModel);
} else {
log.debug(
"selected drive is not null, create new root based on selection",
selectedDrive);
- listUploadLocalDrives.setSelectedValue(selectedDrive, true);
+ lstUploadLocalDrives.setSelectedValue(selectedDrive, true);
localUploadFileModel = new LocalFileSystemModel(new LocalFileNode(
new File((String) selectedDrive)));
fileUploadTree.setModel(localUploadFileModel);
@@ -518,7 +514,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
listModel.addElement(root);
}
- listUploadLocalDrives.setModel(listModel);
+ lstUploadLocalDrives.setModel(listModel);
scrollUploadLocalDrives.setVisible(true);
}
@@ -683,6 +679,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
pnlLocalRefreshButton = new javax.swing.JPanel();
btnLocalRefresh = new javax.swing.JButton();
scrollLocalDrives = new javax.swing.JScrollPane();
+ lstLocalDrives = new javax.swing.JList();
pnlDrivesFiller = new javax.swing.JPanel();
scrollLocalFileTree = new javax.swing.JScrollPane();
pnlIrodsTree = new javax.swing.JPanel();
@@ -703,6 +700,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
pnlUploadRefreshButton = new javax.swing.JPanel();
btnUploadLocalRefresh = new javax.swing.JButton();
scrollUploadLocalDrives = new javax.swing.JScrollPane();
+ lstUploadLocalDrives = new javax.swing.JList();
pnlUploadLocalDrivesFiller = new javax.swing.JPanel();
scrollUploadLocalTree = new javax.swing.JScrollPane();
pnlUploadCenterTools = new javax.swing.JPanel();
@@ -815,16 +813,28 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
pnlLocalTree.setLayout(new java.awt.BorderLayout());
pnlLocalRoots.setMinimumSize(new java.awt.Dimension(101, 44));
- pnlLocalRoots.setPreferredSize(new java.awt.Dimension(292, 44));
+ pnlLocalRoots.setPreferredSize(new java.awt.Dimension(295, 110));
pnlLocalRoots.setRequestFocusEnabled(false);
pnlLocalRoots.setLayout(new java.awt.BorderLayout());
+ pnlLocalRefreshButton.setPreferredSize(new java.awt.Dimension(101, 35));
+
btnLocalRefresh.setText(org.openide.util.NbBundle.getMessage(iDropLiteApplet.class, "iDropLiteApplet.btnLocalRefresh.text")); // NOI18N
pnlLocalRefreshButton.add(btnLocalRefresh);
pnlLocalRoots.add(pnlLocalRefreshButton, java.awt.BorderLayout.NORTH);
+
+ scrollLocalDrives.setPreferredSize(new java.awt.Dimension(285, 140));
+ scrollLocalDrives.setRequestFocusEnabled(false);
+
+ lstLocalDrives.setMinimumSize(new java.awt.Dimension(39, 75));
+ lstLocalDrives.setPreferredSize(new java.awt.Dimension(100, 75));
+ scrollLocalDrives.setViewportView(lstLocalDrives);
+
pnlLocalRoots.add(scrollLocalDrives, java.awt.BorderLayout.CENTER);
+ pnlDrivesFiller.setPreferredSize(new java.awt.Dimension(292, 5));
+
org.jdesktop.layout.GroupLayout pnlDrivesFillerLayout = new org.jdesktop.layout.GroupLayout(pnlDrivesFiller);
pnlDrivesFiller.setLayout(pnlDrivesFillerLayout);
pnlDrivesFillerLayout.setHorizontalGroup(
@@ -833,7 +843,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
);
pnlDrivesFillerLayout.setVerticalGroup(
pnlDrivesFillerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 0, Short.MAX_VALUE)
+ .add(0, 5, Short.MAX_VALUE)
);
pnlLocalRoots.add(pnlDrivesFiller, java.awt.BorderLayout.SOUTH);
@@ -943,9 +953,11 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
pnlUploadLocalTree.setLayout(new java.awt.BorderLayout());
pnlUploadRoots.setMinimumSize(new java.awt.Dimension(100, 44));
- pnlUploadRoots.setPreferredSize(new java.awt.Dimension(289, 44));
+ pnlUploadRoots.setPreferredSize(new java.awt.Dimension(285, 120));
pnlUploadRoots.setLayout(new java.awt.BorderLayout());
+ pnlUploadRefreshButton.setPreferredSize(new java.awt.Dimension(101, 35));
+
btnUploadLocalRefresh.setText(org.openide.util.NbBundle.getMessage(iDropLiteApplet.class, "iDropLiteApplet.btnUploadLocalRefresh.text")); // NOI18N
btnUploadLocalRefresh.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -955,8 +967,17 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
pnlUploadRefreshButton.add(btnUploadLocalRefresh);
pnlUploadRoots.add(pnlUploadRefreshButton, java.awt.BorderLayout.NORTH);
+
+ scrollUploadLocalDrives.setPreferredSize(new java.awt.Dimension(282, 140));
+
+ lstUploadLocalDrives.setPreferredSize(new java.awt.Dimension(285, 85));
+ lstUploadLocalDrives.setRequestFocusEnabled(false);
+ scrollUploadLocalDrives.setViewportView(lstUploadLocalDrives);
+
pnlUploadRoots.add(scrollUploadLocalDrives, java.awt.BorderLayout.CENTER);
+ pnlUploadLocalDrivesFiller.setPreferredSize(new java.awt.Dimension(289, 10));
+
org.jdesktop.layout.GroupLayout pnlUploadLocalDrivesFillerLayout = new org.jdesktop.layout.GroupLayout(pnlUploadLocalDrivesFiller);
pnlUploadLocalDrivesFiller.setLayout(pnlUploadLocalDrivesFillerLayout);
pnlUploadLocalDrivesFillerLayout.setHorizontalGroup(
@@ -965,7 +986,7 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
);
pnlUploadLocalDrivesFillerLayout.setVerticalGroup(
pnlUploadLocalDrivesFillerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 100, Short.MAX_VALUE)
+ .add(0, 10, Short.MAX_VALUE)
);
pnlUploadRoots.add(pnlUploadLocalDrivesFiller, java.awt.BorderLayout.SOUTH);
@@ -1265,6 +1286,8 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JLabel lblTransferFileName;
private javax.swing.JLabel lblUploadTransferFileName;
+ private javax.swing.JList lstLocalDrives;
+ private javax.swing.JList lstUploadLocalDrives;
private javax.swing.JProgressBar pbTransferStatus;
private javax.swing.JProgressBar pbUploadTransferStatus;
private javax.swing.JPanel pnlDrivesFiller;
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
index 057dcde..7a816b9 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
@@ -865,14 +865,17 @@
</Constraint>
</Constraints>
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
- <Property name="alignment" type="int" value="0"/>
- <Property name="horizontalGap" type="int" value="0"/>
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
+ <Property name="columns" type="int" value="0"/>
+ <Property name="rows" type="int" value="1"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="lblFileOrCollectionName">
<Properties>
<Property name="text" type="java.lang.String" value=" "/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[900, 100]"/>
+ </Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[80, 30]"/>
</Property>
@@ -1335,16 +1338,35 @@
</Constraint>
</Constraints>
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
- <Property name="alignment" type="int" value="0"/>
- </Layout>
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JLabel" name="lblCurrentFileLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Current File:"/>
</Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
</Component>
<Component class="javax.swing.JLabel" name="lblCurrentFile">
+ <Properties>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[999, 999]"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[30, 10]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[300, 20]"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
</Component>
</SubComponents>
</Container>
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 48f741a..737906a 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
@@ -925,7 +925,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
@Override
public void run() {
- log.debug("refreshing series panel");
+ gui.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+
TreePath[] currentPaths = null;
if (getTreeStagingResource() != null) {
@@ -1009,6 +1010,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
} finally {
getiDropCore().getIrodsFileSystem().closeAndEatExceptions(
iDropCore.getIrodsAccount());
+ gui.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
});
@@ -1603,9 +1605,10 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
pnlFileNameAndIcon.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
pnlFileNameAndIcon.setMinimumSize(new java.awt.Dimension(100, 50));
- pnlFileNameAndIcon.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 5));
+ pnlFileNameAndIcon.setLayout(new java.awt.GridLayout());
lblFileOrCollectionName.setText(" ");
+ lblFileOrCollectionName.setMaximumSize(new java.awt.Dimension(900, 100));
lblFileOrCollectionName.setMinimumSize(new java.awt.Dimension(80, 30));
pnlFileNameAndIcon.add(lblFileOrCollectionName);
@@ -1838,7 +1841,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
- gridBagConstraints.weightx = 0.0050;
+ gridBagConstraints.weightx = 0.005;
pnlIdropBottom.add(userNameLabel, gridBagConstraints);
pnlTransferOverview.setLayout(new java.awt.BorderLayout());
@@ -1885,11 +1888,17 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
pnlTransferOverview.add(pnlTransferStatus, java.awt.BorderLayout.NORTH);
- pnlTransferFileInfo.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
+ pnlTransferFileInfo.setLayout(new java.awt.GridBagLayout());
lblCurrentFileLabel.setText("Current File:");
- pnlTransferFileInfo.add(lblCurrentFileLabel);
- pnlTransferFileInfo.add(lblCurrentFile);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlTransferFileInfo.add(lblCurrentFileLabel, gridBagConstraints);
+
+ lblCurrentFile.setMaximumSize(new java.awt.Dimension(999, 999));
+ lblCurrentFile.setMinimumSize(new java.awt.Dimension(30, 10));
+ lblCurrentFile.setPreferredSize(new java.awt.Dimension(300, 20));
+ pnlTransferFileInfo.add(lblCurrentFile, new java.awt.GridBagConstraints());
pnlTransferOverview.add(pnlTransferFileInfo, java.awt.BorderLayout.CENTER);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/TreeUtils.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/TreeUtils.java
index c09a3ad..70c2126 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/TreeUtils.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/TreeUtils.java
@@ -104,12 +104,23 @@ public class TreeUtils {
parent.lazyLoadOfChildrenOfThisNode();
+ String normalizedPath = null;
+
for (int i = 0; i < parent.getChildCount(); i++) {
childEntry = (File) ((LocalFileNode) parent.getChildAt(i)).getUserObject();
+
+ normalizedPath = childEntry.getAbsolutePath().replace('\\', '/');
+
+ if (normalizedPath.length() >= 2) {
+ if (normalizedPath.charAt(1) == ':') {
+ normalizedPath = normalizedPath.substring(2);
+ }
+ }
+
if (childEntry.isDirectory()) {
log.debug("child entry is a collection");
- if (userObject.equals(childEntry.getAbsolutePath())) {
+ if (userObject.equals(normalizedPath)) {
foundNode = (LocalFileNode) parent.getChildAt(i);
break;
}
@@ -119,7 +130,7 @@ public class TreeUtils {
log.debug(
"looking for match when child entry is a file with abs path:{}",
childEntry.getAbsolutePath());
- if (userObject.equals(childEntry.getAbsolutePath())) {
+ if (userObject.equals(normalizedPath)) {
foundNode = (LocalFileNode) parent.getChildAt(i);
break;
}
@@ -134,7 +145,11 @@ public class TreeUtils {
LocalFileNode localNode = (LocalFileNode) fileSystemModel.getRoot();
TreePath calculatedTreePath = new TreePath(localNode);
localNode.getUserObject();
- String[] pathComponents = absolutePath.split("/");
+
+ String normalizedPath = absolutePath.replace('\\', '/');
+
+ String[] pathComponents = normalizedPath.split("/");
+
StringBuilder searchRoot = new StringBuilder();
LocalFileNode currentNode = (LocalFileNode) fileSystemModel.getRoot();
@@ -147,6 +162,19 @@ public class TreeUtils {
String nextPathComponent;
for (int i = 0; i < pathComponents.length; i++) {
+
+ nextPathComponent = pathComponents[i];
+
+ /*
+ * In windows, the drive letter is the first part of the path, so if the first path
+ * component is length 2 and the second char is ':', then it will be ignored
+ */
+
+ if (i == 0 && nextPathComponent.length() == 2 && nextPathComponent.charAt(1) == ':') {
+ log.debug("skipping drive in path");
+ continue;
+ }
+
// next element from userObjects is the child of the current node,
// note that for the first node (typically
// '/') a delimiting slash is not needed
@@ -154,7 +182,6 @@ public class TreeUtils {
searchRoot.append('/');
}
- nextPathComponent = pathComponents[i];
searchRoot.append(nextPathComponent);
if (i > 0) {
currentNode = findChild(currentNode, searchRoot.toString());
@@ -175,7 +202,7 @@ public class TreeUtils {
}
}
if (calculatedTreePath == null) {
- throw new IdropException("cannot find path to node:" + absolutePath);
+ throw new IdropException("cannot find path to node:" + normalizedPath);
}
return calculatedTreePath;
@@ -365,8 +392,8 @@ public class TreeUtils {
tree.collapsePath(parent);
}
}
-
- public static void expandAll(final Outline tree, final TreePath parent,
+
+ public static void expandAll(final Outline tree, final TreePath parent,
final boolean expand) {
// Traverse children
TreeNode node = (TreeNode) parent.getLastPathComponent();
@@ -386,7 +413,6 @@ public class TreeUtils {
}
}
-
//FIXME: consider getting rid of defunct code below...
/**
* Given a tree node, get the nodes that are in the given expansion state as