diff options
author | mconway <michael_conway@unc.edu> | 2013-06-04 14:01:32 (GMT) |
---|---|---|
committer | mconway <michael_conway@unc.edu> | 2013-06-04 14:01:32 (GMT) |
commit | 0673508f8b69b709acc5d4db0f88784d8d55767a (patch) | |
tree | 61b67065a1a21977b14b2752d4c974738edf8278 | |
parent | 6cd1fb0e3751676b0a3ac25f38f5d73e230b85f2 (diff) | |
download | QCG-Data-0673508f8b69b709acc5d4db0f88784d8d55767a.zip QCG-Data-0673508f8b69b709acc5d4db0f88784d8d55767a.tar.gz QCG-Data-0673508f8b69b709acc5d4db0f88784d8d55767a.tar.bz2 |
[#1441] add diff view to idrop
7 files changed, 137 insertions, 110 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.java index 25fa154..1989c91 100644 --- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.java +++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.java @@ -8,6 +8,7 @@ import java.awt.Cursor; import java.io.File; import javax.swing.ListSelectionModel; import javax.swing.tree.TreePath; +import org.irods.jargon.core.connection.IRODSAccount; import org.irods.jargon.core.exception.JargonException; import org.irods.jargon.core.pub.io.IRODSFile; import org.irods.jargon.datautils.tree.DiffTreePostProcessor; @@ -102,12 +103,12 @@ public class ToolsDialog extends javax.swing.JDialog { LocalFileNode selectedFileNode = (LocalFileNode) idropGui.getFileTree() .getSelectionPath().getLastPathComponent(); File targetPath = (File) selectedFileNode.getUserObject(); - String localAbsPath = targetPath.getAbsolutePath(); - File localFile = new File(localAbsPath); + final String localAbsPath = targetPath.getAbsolutePath(); + final File localFile = new File(localAbsPath); // look for iRODS absolute path for the right hand side of the diff - IRODSFileService irodsFS = null; + IRODSFileService irodsFS; try { irodsFS = new IRODSFileService(idropGui.getiDropCore() .getIrodsAccount(), idropGui.getiDropCore() @@ -117,20 +118,24 @@ public class ToolsDialog extends javax.swing.JDialog { log.error("cannot create irods file service", ex); MessageUtil.showError(this, "Cannot create iRODS file Service, see exception log", MessageUtil.ERROR_MESSAGE); this.dispose(); + return; } - String irodsAbsPath = ""; + final String irodsAbsPath; IRODSOutlineModel irodsFileSystemModel = (IRODSOutlineModel) idropGui.getIrodsTree() .getModel(); ListSelectionModel selectionModel = idropGui.getIrodsTree().getSelectionModel(); int idx = selectionModel.getLeadSelectionIndex(); - IRODSFile ifile = null; + IRODSFile ifile; // make sure there is a selected node if (idx >= 0) { try { IRODSNode selectedNode = (IRODSNode) irodsFileSystemModel .getValueAt(idx, 0); + if (selectedNode == null) { + return; + } ifile = irodsFS.getIRODSFileForPath(selectedNode.getFullPath()); // rule out "/" and choose parent if file is not a directory @@ -140,40 +145,60 @@ public class ToolsDialog extends javax.swing.JDialog { } if ((path != null) && (!path.equals("/"))) { irodsAbsPath = path; + } else { + irodsAbsPath = "/"; } + log.info("irods path for diff:{}", ifile.getAbsolutePath()); } catch (IdropException ex) { - Exceptions.printStackTrace(ex); + MessageUtil.showError(this, ex.getMessage(), MessageUtil.ERROR_MESSAGE); + this.dispose(); + return; } } else { MessageUtil.showError(this, "An iRODS path needs to be selected to do a diff", MessageUtil.ERROR_MESSAGE); this.dispose(); + return; } + final ToolsDialog thisDialog = this; + log.info("local path for diff:{}", localAbsPath); - log.info("irods path for diff:{}", irodsAbsPath); - this.dispose(); - idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - FileTreeDiffUtility fileTreeDiffUtility = new FileTreeDiffUtilityImpl(idropGui.getiDropCore().getIrodsAccount(), idropGui.getiDropCore().getIRODSAccessObjectFactory()); - try { - FileTreeModel diffModel = fileTreeDiffUtility.generateDiffLocalToIRODS(localFile, irodsAbsPath, 0L, 0L); - DiffTreePostProcessor postProcessor = new DiffTreePostProcessor(); - postProcessor.postProcessFileTreeModel(diffModel); - - log.info("diffModel:{}", diffModel); - DiffViewData diffViewData = new DiffViewData(); - diffViewData.setFileTreeModel(diffModel); - diffViewData.setIrodsAbsolutePath(irodsAbsPath); - diffViewData.setLocalAbsolutePath(localAbsPath); - DiffViewDialog diffViewDialog = new DiffViewDialog(this.idropGui, true, diffViewData); - diffViewDialog.setVisible(true); - } catch (JargonException ex) { - log.error("Error generating diff", ex); - MessageUtil.showError(this, "An error occurred generating the diff:\n" + ex.getMessage(), MessageUtil.ERROR_MESSAGE); - this.dispose(); - } finally { - idropGui.setCursor(Cursor - .getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } + + + java.awt.EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + + + thisDialog.dispose(); + idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + FileTreeDiffUtility fileTreeDiffUtility = new FileTreeDiffUtilityImpl(idropGui.getiDropCore().getIrodsAccount(), idropGui.getiDropCore().getIRODSAccessObjectFactory()); + try { + FileTreeModel diffModel = fileTreeDiffUtility.generateDiffLocalToIRODS(localFile, irodsAbsPath, 0L, 0L); + DiffTreePostProcessor postProcessor = new DiffTreePostProcessor(); + postProcessor.postProcessFileTreeModel(diffModel); + + log.info("diffModel:{}", diffModel); + DiffViewData diffViewData = new DiffViewData(); + diffViewData.setFileTreeModel(diffModel); + diffViewData.setIrodsAbsolutePath(irodsAbsPath); + diffViewData.setLocalAbsolutePath(localAbsPath); + DiffViewDialog diffViewDialog = new DiffViewDialog(thisDialog.idropGui, true, diffViewData); + diffViewDialog.setVisible(true); + } catch (JargonException ex) { + log.error("Error generating diff", ex); + MessageUtil.showError(thisDialog, "An error occurred generating the diff:\n" + ex.getMessage(), MessageUtil.ERROR_MESSAGE); + thisDialog.dispose(); + } finally { + idropGui.setCursor(Cursor + .getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + } + }); + + + + 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 910ff23..4267691 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 @@ -76,6 +76,33 @@ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> + <Component class="javax.swing.JButton" name="btnMainToolbarTree"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/icon_tree.png"/> + </Property> + <Property name="mnemonic" type="int" value="116"/> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="iDrop.btnMainToolbarTree.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="iDrop.btnMainToolbarTree.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="horizontalTextPosition" type="int" value="0"/> + <Property name="verticalTextPosition" type="int" value="3"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnMainToolbarTreeActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> <Component class="javax.swing.JButton" name="btnMainToolbarDownload"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> @@ -95,7 +122,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="4" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -118,7 +145,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="3" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -163,15 +190,6 @@ <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> <Insets value="null"/> </Property> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> <Property name="verticalTextPosition" type="int" value="3"/> </Properties> <Events> @@ -179,7 +197,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="9" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="10" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -198,7 +216,7 @@ </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="3" 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"/> + <GridBagConstraints gridX="3" gridY="1" gridWidth="2" 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> @@ -224,7 +242,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="4" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="5" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -253,7 +271,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="5" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="6" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -277,7 +295,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="6" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="7" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -296,7 +314,7 @@ </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="7" 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"/> + <GridBagConstraints gridX="8" 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> @@ -315,15 +333,6 @@ <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> <Insets value="null"/> </Property> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> <Property name="verticalTextPosition" type="int" value="3"/> </Properties> <Events> @@ -331,7 +340,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="10" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="11" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -350,15 +359,6 @@ <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> <Insets value="null"/> </Property> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> - </Property> <Property name="verticalTextPosition" type="int" value="3"/> </Properties> <Events> @@ -366,7 +366,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="11" 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"/> + <GridBagConstraints gridX="12" 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> @@ -393,7 +393,7 @@ </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="11" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="1" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="12" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="1" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> @@ -415,7 +415,7 @@ </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="12" gridY="0" 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"/> + <GridBagConstraints gridX="13" gridY="0" 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> 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 f2ea478..9b2c0ae 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 @@ -94,7 +94,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, private ChangePasswordDialog changePasswordDialog = null; private QueueManagerDialog queueManagerDialog = null; private boolean formShown = false; - private BasicArrowButton btnBreadCrumbNav; public iDrop(final IDROPCore idropCore) { @@ -155,15 +154,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, System.exit(0); } - // add breadcrumb navigation button - btnBreadCrumbNav = new BasicArrowButton(SwingConstants.SOUTH); - btnBreadCrumbNav.addActionListener(new java.awt.event.ActionListener() { - @Override - public void actionPerformed(final java.awt.event.ActionEvent evt) { - btnBreadCrumbNavActionPerformed(evt); - } - }); - pnlBreadCrumbNav.add(btnBreadCrumbNav); + } @@ -1330,6 +1321,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, jPopupMenu1 = new javax.swing.JPopupMenu(); pnlMain = new javax.swing.JPanel(); pnlMainToolbarIcons = new javax.swing.JPanel(); + btnMainToolbarTree = new javax.swing.JButton(); btnMainToolbarDownload = new javax.swing.JButton(); btnMainToolbarUpload = new javax.swing.JButton(); btnMainToolbarRefresh = new javax.swing.JButton(); @@ -1396,6 +1388,24 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, pnlMainToolbarIcons.setPreferredSize(new java.awt.Dimension(1121, 120)); pnlMainToolbarIcons.setLayout(new java.awt.GridBagLayout()); + btnMainToolbarTree.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_tree.png"))); // NOI18N + btnMainToolbarTree.setMnemonic('t'); + btnMainToolbarTree.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarTree.text")); // NOI18N + btnMainToolbarTree.setToolTipText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarTree.toolTipText")); // NOI18N + btnMainToolbarTree.setBorder(null); + btnMainToolbarTree.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnMainToolbarTree.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + btnMainToolbarTree.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnMainToolbarTreeActionPerformed(evt); + } + }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.ipadx = 2; + pnlMainToolbarIcons.add(btnMainToolbarTree, gridBagConstraints); + btnMainToolbarDownload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_download.png"))); // NOI18N btnMainToolbarDownload.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarDownload.text")); // NOI18N btnMainToolbarDownload.setBorder(null); @@ -1407,7 +1417,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; + gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarDownload, gridBagConstraints); @@ -1423,7 +1433,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 2; + gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarUpload, gridBagConstraints); @@ -1450,9 +1460,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, btnMainToolbarTools.setBorder(null); btnMainToolbarTools.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnMainToolbarTools.setMargin(null); - btnMainToolbarTools.setMaximumSize(null); - btnMainToolbarTools.setMinimumSize(null); - btnMainToolbarTools.setPreferredSize(null); btnMainToolbarTools.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnMainToolbarTools.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1460,7 +1467,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 9; + gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarTools, gridBagConstraints); @@ -1472,6 +1479,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 2; pnlMainToolbarIcons.add(jSeparator1, gridBagConstraints); btnMainToolbarCopy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_replicate.png"))); // NOI18N @@ -1486,7 +1494,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 4; + gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarCopy, gridBagConstraints); @@ -1504,7 +1512,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 5; + gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarDelete, gridBagConstraints); @@ -1521,7 +1529,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 6; + gridBagConstraints.gridx = 7; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarInfo, gridBagConstraints); @@ -1531,7 +1539,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, jSeparator3.setMinimumSize(new java.awt.Dimension(34, 60)); jSeparator3.setPreferredSize(new java.awt.Dimension(34, 60)); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 7; + gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 1; pnlMainToolbarIcons.add(jSeparator3, gridBagConstraints); @@ -1540,9 +1548,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, btnMainToolbarSync.setBorder(null); btnMainToolbarSync.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnMainToolbarSync.setMargin(null); - btnMainToolbarSync.setMaximumSize(null); - btnMainToolbarSync.setMinimumSize(null); - btnMainToolbarSync.setPreferredSize(null); btnMainToolbarSync.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnMainToolbarSync.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1550,7 +1555,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 10; + gridBagConstraints.gridx = 11; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 2; pnlMainToolbarIcons.add(btnMainToolbarSync, gridBagConstraints); @@ -1560,9 +1565,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, btnMainToolbarSettings.setBorder(null); btnMainToolbarSettings.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnMainToolbarSettings.setMargin(null); - btnMainToolbarSettings.setMaximumSize(null); - btnMainToolbarSettings.setMinimumSize(null); - btnMainToolbarSettings.setPreferredSize(null); btnMainToolbarSettings.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnMainToolbarSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1570,7 +1572,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 11; + gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 1; pnlMainToolbarIcons.add(btnMainToolbarSettings, gridBagConstraints); @@ -1585,7 +1587,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } }); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 11; + gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; @@ -1597,7 +1599,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, txtMainToolbarSearchTerms.setToolTipText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.txtMainToolbarSearchTerms.toolTipText")); // NOI18N txtMainToolbarSearchTerms.setMinimumSize(new java.awt.Dimension(100, 20)); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 12; + gridBagConstraints.gridx = 13; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; pnlMainToolbarIcons.add(txtMainToolbarSearchTerms, gridBagConstraints); @@ -1870,6 +1872,13 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, toolsDialog.setVisible(true); }//GEN-LAST:event_btnMainToolbarToolsActionPerformed + private void btnMainToolbarTreeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMainToolbarTreeActionPerformed + BreadCrumbNavigationPopup popup = new BreadCrumbNavigationPopup(this, + lblBreadCrumb.getText()); + java.awt.Point p = btnMainToolbarTree.getLocation(); + popup.show(pnlBreadCrumbNav, p.x, p.y + btnMainToolbarTree.getHeight()); + }//GEN-LAST:event_btnMainToolbarTreeActionPerformed + private void btnMainToolbarSettingsActionPerformed( final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnMainToolbarSettingsActionPerformed IDROPConfigurationPanel idropConfigurationPanel = new IDROPConfigurationPanel( @@ -1960,16 +1969,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, } - private void btnBreadCrumbNavActionPerformed( - final java.awt.event.ActionEvent evt) { - - BreadCrumbNavigationPopup popup = new BreadCrumbNavigationPopup(this, - lblBreadCrumb.getText()); - java.awt.Point p = btnBreadCrumbNav.getLocation(); - popup.show(pnlBreadCrumbNav, p.x, p.y + btnBreadCrumbNav.getHeight()); - - }// GEN-LAST:event_btnMainToolbarUploadActionPerformed - private void btnMainToolbarInfoActionPerformed( final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnMainToolbarInfoActionPerformed IRODSInfoDialog irodsInfoDialog = new IRODSInfoDialog(this, true, @@ -2049,6 +2048,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, private javax.swing.JButton btnMainToolbarSettings; private javax.swing.JButton btnMainToolbarSync; private javax.swing.JButton btnMainToolbarTools; + private javax.swing.JButton btnMainToolbarTree; private javax.swing.JButton btnMainToolbarUpload; private javax.swing.JButton btnShowTransferManager; private javax.swing.JComboBox cbIrodsResource; diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java index 42b28bb..5a04535 100644 --- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java +++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java @@ -1,5 +1,5 @@ package org.irods.jargon.idrop.desktop.systraygui.utils; public final class Version { public static String VERSION="2.0.1-SNAPSHOT"; - public static String BUILD_TIME="20130603-1956"; + public static String BUILD_TIME="20130604-0951"; } diff --git a/idrop-swing/src/main/resources/Thumbs.db b/idrop-swing/src/main/resources/Thumbs.db Binary files differindex 87878dd..c96c9b4 100644 --- a/idrop-swing/src/main/resources/Thumbs.db +++ b/idrop-swing/src/main/resources/Thumbs.db diff --git a/idrop-swing/src/main/resources/icon_tree.png b/idrop-swing/src/main/resources/icon_tree.png Binary files differnew file mode 100644 index 0000000..18dd7bf --- /dev/null +++ b/idrop-swing/src/main/resources/icon_tree.png diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties index 256d63c..5a524bc 100644 --- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties +++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties @@ -346,3 +346,5 @@ DiffViewDialog.lblLocalFileChecksumLbl.text=Local File Checksum: DiffViewDialog.lblLocalFileChecksum.text=localfilechecksum DiffViewDialog.lblIrodsFileChecksumLbl.text=iRODS File Checksum: DiffViewDialog.lblIrodsFileChecksum.text=irodsfilechecksum +iDrop.btnMainToolbarTree.text=Tree +iDrop.btnMainToolbarTree.toolTipText=Adjust the tree root |