summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authorLISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2011-08-19 21:31:54 (GMT)
committer LISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2011-08-19 21:31:54 (GMT)
commitf937c6f46c9467fb7e3acbf81c7a81593e536759 (patch)
tree06421bf7af0b5a74b71323103d5c7cf2edd77ac3 /idrop-lite
parent1595ae3a8d54bacf5dca28976228952282b87bc6 (diff)
downloadQCG-Data-f937c6f46c9467fb7e3acbf81c7a81593e536759.zip
QCG-Data-f937c6f46c9467fb7e3acbf81c7a81593e536759.tar.gz
QCG-Data-f937c6f46c9467fb7e3acbf81c7a81593e536759.tar.bz2
[#427] fixed bug with missing scroll panel for local drives on windows
Diffstat (limited to 'idrop-lite')
-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
3 files changed, 108 insertions, 24 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;