summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael_conway@unc.edu>2013-05-28 15:29:40 (GMT)
committer mconway <michael_conway@unc.edu>2013-05-28 15:29:40 (GMT)
commit1637eae271099005fb9d7547ac75bbefc669b630 (patch)
treefddb8d53516af6a17c9ade2a16d2328768bca865
parentff876c7fa81fa11e8e1ddb2e37913ab32f614961 (diff)
downloadQCG-Data-1637eae271099005fb9d7547ac75bbefc669b630.zip
QCG-Data-1637eae271099005fb9d7547ac75bbefc669b630.tar.gz
QCG-Data-1637eae271099005fb9d7547ac75bbefc669b630.tar.bz2
[#1441] add diff view to idrop
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form35
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java63
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.form83
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.java172
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/UploadDialog.java22
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form32
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java37
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/MessageUtil.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffViewData.java39
-rw-r--r--idrop-swing/src/main/resources/Thumbs.dbbin0 -> 25600 bytes
-rw-r--r--idrop-swing/src/main/resources/icon_diff.pngbin0 -> 3349 bytes
-rw-r--r--idrop-swing/src/main/resources/icon_tools.pngbin0 -> 842 bytes
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties7
14 files changed, 466 insertions, 28 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form
new file mode 100644
index 0000000..f53240c
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java
new file mode 100644
index 0000000..da836e5
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java
@@ -0,0 +1,63 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.DiffViewData;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author Mike
+ */
+public class DiffViewDialog extends javax.swing.JDialog {
+
+ private final iDrop idropGui;
+ private DiffViewData diffViewData;
+ public static org.slf4j.Logger log = LoggerFactory
+ .getLogger(ToolsDialog.class);
+
+ public DiffViewDialog(final iDrop parent, final boolean modal, final DiffViewData diffViewData) {
+ super(parent, modal);
+ initComponents();
+ idropGui = parent;
+ this.diffViewData = diffViewData;
+ initialzeDiffView();
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGap(0, 400, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGap(0, 300, Short.MAX_VALUE)
+ );
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ // End of variables declaration//GEN-END:variables
+
+ /**
+ * Initialize the components for the diff view
+ */
+ private void initialzeDiffView() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.form
new file mode 100644
index 0000000..ed30c00
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.form
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="modalityType" type="java.awt.Dialog$ModalityType" editor="org.netbeans.modules.form.editors.EnumEditor">
+ <Value id="APPLICATION_MODAL"/>
+ </Property>
+ <Property name="name" type="java.lang.String" value="ToolsDialog" noResource="true"/>
+ <Property name="resizable" type="boolean" value="false"/>
+ <Property name="type" type="java.awt.Window$Type" editor="org.netbeans.modules.form.editors.EnumEditor">
+ <Value id="POPUP"/>
+ </Property>
+ </Properties>
+ <AccessibilityProperties>
+ <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="ToolsDialog.AccessibleContext.accessibleName" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="ToolsDialog.AccessibleContext.accessibleDescription" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="AccessibleContext.accessibleParent" type="javax.accessibility.Accessible" editor="org.netbeans.modules.form.ComponentChooserEditor">
+ <ComponentRef name="Form"/>
+ </Property>
+ </AccessibilityProperties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,73,0,0,0,-78"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
+ <Property name="alignment" type="int" value="0"/>
+ <Property name="horizontalGap" type="int" value="0"/>
+ <Property name="verticalGap" type="int" value="0"/>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlButtons">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnToolbarDiff">
+ <Properties>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/icon_diff.png"/>
+ </Property>
+ <Property name="mnemonic" type="int" value="68"/>
+ <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="ToolsDialog.btnToolbarDiff.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </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="ToolsDialog.btnToolbarDiff.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </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="btnToolbarDiffActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="2" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
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
new file mode 100644
index 0000000..a76adb5
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ToolsDialog.java
@@ -0,0 +1,172 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import java.io.File;
+import javax.swing.ListSelectionModel;
+import javax.swing.tree.TreePath;
+import org.irods.jargon.core.exception.JargonException;
+import org.irods.jargon.core.pub.io.IRODSFile;
+import org.irods.jargon.datautils.tree.FileTreeDiffUtility;
+import org.irods.jargon.datautils.tree.FileTreeDiffUtilityImpl;
+import org.irods.jargon.datautils.tree.FileTreeModel;
+import org.irods.jargon.idrop.desktop.systraygui.services.IRODSFileService;
+import org.irods.jargon.idrop.desktop.systraygui.utils.MessageUtil;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSNode;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSOutlineModel;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.LocalFileNode;
+import org.irods.jargon.idrop.exceptions.IdropException;
+import org.openide.util.Exceptions;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author Mike
+ */
+public class ToolsDialog extends javax.swing.JDialog {
+
+ private final iDrop idropGui;
+ public static org.slf4j.Logger log = LoggerFactory
+ .getLogger(ToolsDialog.class);
+
+ public ToolsDialog(final iDrop parent, final boolean modal) {
+ super(parent, modal);
+ initComponents();
+ idropGui = parent;
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ pnlButtons = new javax.swing.JPanel();
+ btnToolbarDiff = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
+ setName("ToolsDialog"); // NOI18N
+ setResizable(false);
+ setType(java.awt.Window.Type.POPUP);
+ getContentPane().setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0));
+
+ pnlButtons.setLayout(new java.awt.GridBagLayout());
+
+ btnToolbarDiff.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_diff.png"))); // NOI18N
+ btnToolbarDiff.setMnemonic('D');
+ btnToolbarDiff.setText(org.openide.util.NbBundle.getMessage(ToolsDialog.class, "ToolsDialog.btnToolbarDiff.text")); // NOI18N
+ btnToolbarDiff.setToolTipText(org.openide.util.NbBundle.getMessage(ToolsDialog.class, "ToolsDialog.btnToolbarDiff.toolTipText")); // NOI18N
+ btnToolbarDiff.setBorder(null);
+ btnToolbarDiff.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnToolbarDiff.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnToolbarDiff.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnToolbarDiffActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.ipadx = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlButtons.add(btnToolbarDiff, gridBagConstraints);
+
+ getContentPane().add(pnlButtons);
+
+ getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ToolsDialog.class, "ToolsDialog.AccessibleContext.accessibleName")); // NOI18N
+ getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ToolsDialog.class, "ToolsDialog.AccessibleContext.accessibleDescription")); // NOI18N
+ getAccessibleContext().setAccessibleParent(this);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnToolbarDiffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnToolbarDiffActionPerformed
+ log.info("diff action performed");
+ // look for selected local and iRODS files
+
+ TreePath localPath = idropGui.getFileTree().getSelectionPath();
+ if (localPath == null) {
+ MessageUtil.showError(this, "A local path needs to be selected to do a diff", MessageUtil.ERROR_MESSAGE);
+ this.dispose();
+ }
+
+ LocalFileNode selectedFileNode = (LocalFileNode) idropGui.getFileTree()
+ .getSelectionPath().getLastPathComponent();
+ File targetPath = (File) selectedFileNode.getUserObject();
+ String localAbsPath = targetPath.getAbsolutePath();
+ File localFile = new File(localAbsPath);
+
+ // look for iRODS absolute path for the right hand side of the diff
+
+ IRODSFileService irodsFS = null;
+ try {
+ irodsFS = new IRODSFileService(idropGui.getiDropCore()
+ .getIrodsAccount(), idropGui.getiDropCore()
+ .getIrodsFileSystem());
+ } catch (Exception ex) {
+
+ log.error("cannot create irods file service", ex);
+ MessageUtil.showError(this, "Cannot create iRODS file Service, see exception log", MessageUtil.ERROR_MESSAGE);
+ this.dispose();
+ }
+
+ String irodsAbsPath = "";
+ IRODSOutlineModel irodsFileSystemModel = (IRODSOutlineModel) idropGui.getIrodsTree()
+ .getModel();
+ ListSelectionModel selectionModel = idropGui.getIrodsTree().getSelectionModel();
+ int idx = selectionModel.getLeadSelectionIndex();
+ IRODSFile ifile = null;
+ // make sure there is a selected node
+ if (idx >= 0) {
+
+ try {
+ IRODSNode selectedNode = (IRODSNode) irodsFileSystemModel
+ .getValueAt(idx, 0);
+ ifile = irodsFS.getIRODSFileForPath(selectedNode.getFullPath());
+
+ // rule out "/" and choose parent if file is not a directory
+ String path = ifile.getAbsolutePath();
+ if (ifile.isFile()) {
+ path = ifile.getParent();
+ }
+ if ((path != null) && (!path.equals("/"))) {
+ irodsAbsPath = path;
+ }
+ } catch (IdropException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ } else {
+ MessageUtil.showError(this, "An iRODS path needs to be selected to do a diff", MessageUtil.ERROR_MESSAGE);
+ this.dispose();
+ }
+
+ log.info("local path for diff:{}", localAbsPath);
+ log.info("irods path for diff:{}", irodsAbsPath);
+ this.dispose();
+
+ FileTreeDiffUtility fileTreeDiffUtility = new FileTreeDiffUtilityImpl(idropGui.getiDropCore().getIrodsAccount(),idropGui.getiDropCore().getIRODSAccessObjectFactory());
+ try {
+ FileTreeModel diffModel = fileTreeDiffUtility.generateDiffLocalToIRODS(localFile, irodsAbsPath, 0L, 0L);
+ log.info("diffModel:{}", diffModel);
+ } 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();
+ }
+
+
+
+
+ }//GEN-LAST:event_btnToolbarDiffActionPerformed
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnToolbarDiff;
+ private javax.swing.JPanel pnlButtons;
+ // End of variables declaration//GEN-END:variables
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/UploadDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/UploadDialog.java
index ceaad83..eb26728 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/UploadDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/UploadDialog.java
@@ -113,27 +113,7 @@ public class UploadDialog extends javax.swing.JDialog implements
Exceptions.printStackTrace(ex);
}
}
- // else {
- //
- // // next see if can find some put history in the transfer queue
- // // manager and use that target location
- // // next see if can find some get history in the transfer queue
- // try {
- // List<LocalIRODSTransfer> transfers =
- // idropGUI.getiDropCore().getTransferManager().getRecentQueue();
- //
- // // assuming most recent first
- // for (LocalIRODSTransfer transfer: transfers) {
- // if (transfer.getTransferType() == TransferType.PUT) {
- // target = transfer.getIrodsAbsolutePath();
- // break;
- // }
- // }
- // } catch (JargonException ex) {
- // Exceptions.printStackTrace(ex);
- // }
- // }
-
+
txtUploadTarget.setText(target);
}
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 6a06d81..56f1ee4 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
@@ -70,7 +70,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
- <BorderConstraints direction="North"/>
+ <BorderConstraints direction="First"/>
</Constraint>
</Constraints>
@@ -145,6 +145,32 @@
</Constraint>
</Constraints>
</Component>
+ <Component class="javax.swing.JButton" name="btnMainToolbarTools">
+ <Properties>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/icon_tools.png"/>
+ </Property>
+ <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.btnMainToolbarTools.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </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.btnMainToolbarTools.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </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="btnMainToolbarToolsActionPerformed"/>
+ </Events>
+ <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="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.JSeparator" name="jSeparator1">
<Properties>
<Property name="orientation" type="int" value="1"/>
@@ -280,7 +306,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>
@@ -312,7 +338,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>
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 bc89935..14ec96e 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
@@ -1333,6 +1333,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
btnMainToolbarDownload = new javax.swing.JButton();
btnMainToolbarUpload = new javax.swing.JButton();
btnMainToolbarRefresh = new javax.swing.JButton();
+ btnMainToolbarTools = new javax.swing.JButton();
jSeparator1 = new javax.swing.JSeparator();
btnMainToolbarCopy = new javax.swing.JButton();
btnMainToolbarDelete = new javax.swing.JButton();
@@ -1443,6 +1444,23 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
gridBagConstraints.ipadx = 2;
pnlMainToolbarIcons.add(btnMainToolbarRefresh, gridBagConstraints);
+ btnMainToolbarTools.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_tools.png"))); // NOI18N
+ btnMainToolbarTools.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarTools.text")); // NOI18N
+ btnMainToolbarTools.setToolTipText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarTools.toolTipText")); // NOI18N
+ btnMainToolbarTools.setBorder(null);
+ btnMainToolbarTools.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnMainToolbarTools.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnMainToolbarTools.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnMainToolbarToolsActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 7;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.ipadx = 2;
+ pnlMainToolbarIcons.add(btnMainToolbarTools, gridBagConstraints);
+
jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
jSeparator1.setMaximumSize(new java.awt.Dimension(34, 60));
jSeparator1.setMinimumSize(new java.awt.Dimension(34, 60));
@@ -1523,7 +1541,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(btnMainToolbarSync, gridBagConstraints);
@@ -1542,7 +1560,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(btnMainToolbarSettings, gridBagConstraints);
@@ -1595,7 +1613,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
pnlMainToolbarIcons.add(pnlBreadCrumbNav, gridBagConstraints);
- pnlMain.add(pnlMainToolbarIcons, java.awt.BorderLayout.NORTH);
+ pnlMain.add(pnlMainToolbarIcons, java.awt.BorderLayout.PAGE_START);
pnlMainIrodsTree.setBorder(javax.swing.BorderFactory.createEtchedBorder());
pnlMainIrodsTree.setPreferredSize(new java.awt.Dimension(834, 360));
@@ -1831,6 +1849,18 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
getiDropCore().getIrodsAccount().setDefaultStorageResource(newResource);
}//GEN-LAST:event_cbIrodsResourceActionPerformed
+ /**
+ * Show a modal dialog with extended tools
+ * @param evt
+ */
+ private void btnMainToolbarToolsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMainToolbarToolsActionPerformed
+ ToolsDialog toolsDialog = new ToolsDialog(this, true);
+ toolsDialog.setLocation(
+ (int) (this.getLocation().getX() + getWidth() / 2), (int) (this
+ .getLocation().getY() + getHeight() / 2));
+ toolsDialog.setVisible(true);
+ }//GEN-LAST:event_btnMainToolbarToolsActionPerformed
+
private void btnMainToolbarSettingsActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnMainToolbarSettingsActionPerformed
IDROPConfigurationPanel idropConfigurationPanel = new IDROPConfigurationPanel(
@@ -2009,6 +2039,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
private javax.swing.JButton btnMainToolbarSearchFiles;
private javax.swing.JButton btnMainToolbarSettings;
private javax.swing.JButton btnMainToolbarSync;
+ private javax.swing.JButton btnMainToolbarTools;
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/MessageUtil.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/MessageUtil.java
index f0b8f0a..2945e8a 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/MessageUtil.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/MessageUtil.java
@@ -10,6 +10,8 @@ import javax.swing.JOptionPane;
*
*/
public class MessageUtil {
+
+ public static final String ERROR_MESSAGE = "iDrop Error Message";
public static void showError(final Component rootComponent,
final String message, final String title) {
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 0e56203..fee1a38 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="20130528-0831";
+ public static String BUILD_TIME="20130528-1120";
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffViewData.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffViewData.java
new file mode 100644
index 0000000..3f8eae5
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffViewData.java
@@ -0,0 +1,39 @@
+
+package org.irods.jargon.idrop.desktop.systraygui.viscomponents;
+
+import org.irods.jargon.datautils.tree.FileTreeModel;
+
+/**
+ * Data representing a diff view
+ * @author Mike Conway - DICE
+ */
+public class DiffViewData {
+ private String localAbsolutePath;
+ private String irodsAbsolutePath;
+ private FileTreeModel fileTreeModel;
+
+ public String getLocalAbsolutePath() {
+ return localAbsolutePath;
+ }
+
+ public void setLocalAbsolutePath(String localAbsolutePath) {
+ this.localAbsolutePath = localAbsolutePath;
+ }
+
+ public String getIrodsAbsolutePath() {
+ return irodsAbsolutePath;
+ }
+
+ public void setIrodsAbsolutePath(String irodsAbsolutePath) {
+ this.irodsAbsolutePath = irodsAbsolutePath;
+ }
+
+ public FileTreeModel getFileTreeModel() {
+ return fileTreeModel;
+ }
+
+ public void setFileTreeModel(FileTreeModel fileTreeModel) {
+ this.fileTreeModel = fileTreeModel;
+ }
+
+}
diff --git a/idrop-swing/src/main/resources/Thumbs.db b/idrop-swing/src/main/resources/Thumbs.db
new file mode 100644
index 0000000..87878dd
--- /dev/null
+++ b/idrop-swing/src/main/resources/Thumbs.db
Binary files differ
diff --git a/idrop-swing/src/main/resources/icon_diff.png b/idrop-swing/src/main/resources/icon_diff.png
new file mode 100644
index 0000000..11a16f2
--- /dev/null
+++ b/idrop-swing/src/main/resources/icon_diff.png
Binary files differ
diff --git a/idrop-swing/src/main/resources/icon_tools.png b/idrop-swing/src/main/resources/icon_tools.png
new file mode 100644
index 0000000..7da6d3c
--- /dev/null
+++ b/idrop-swing/src/main/resources/icon_tools.png
Binary files differ
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 6d80052..9083b49 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
@@ -308,3 +308,10 @@ iDrop.lblResource.toolTipText=
UploadDialog.lblUploadTargetLocation.text=Upload Target Location:
UploadDialog.btnBrowseUploadTarget.label=Browse
DownloadDialog.lblFilesHeader.text=Files/Collections that will be Downloaded:
+iDrop.btnMainToolbarTools.label=Info
+iDrop.btnMainToolbarTools.text=Tools
+iDrop.btnMainToolbarTools.toolTipText=Various tools for manipulating and viewing files
+ToolsDialog.AccessibleContext.accessibleName=Tools Dialog
+ToolsDialog.AccessibleContext.accessibleDescription=Additional Tools
+ToolsDialog.btnToolbarDiff.toolTipText=Diff a local and an iRODS file or collection
+ToolsDialog.btnToolbarDiff.text=Diff