summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-07-13 16:49:19 (GMT)
committer Mike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-07-13 16:49:19 (GMT)
commitb6117fc67b8933b858551bfcc57170878e9fd0e2 (patch)
tree59682d242d1c675351a22a865705fcb5c2907123
parentef289f802f8768476aa890ceca1829e3ad41aa90 (diff)
downloadQCG-Data-b6117fc67b8933b858551bfcc57170878e9fd0e2.zip
QCG-Data-b6117fc67b8933b858551bfcc57170878e9fd0e2.tar.gz
QCG-Data-b6117fc67b8933b858551bfcc57170878e9fd0e2.tar.bz2
permutations at statup (show gui, show wizard)
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AboutDialog.java135
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.java267
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java269
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteLocalFileDialog.java262
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java83
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java7
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java385
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MessageManager.java19
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetadataViewDialog.java218
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java555
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewIRODSDirectoryDialog.java341
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewLocalDirectoryDialog.java315
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java1915
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueTimerTaskThread.java18
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java536
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameLocalDirectoryDialog.java454
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ReplicationDialog.java256
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java118
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java402
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFSChooserListCellRenderer.java16
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFileChooserDialogLookInComboBoxRender.java12
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java2279
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IRODSFileService.java348
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IconManager.java9
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java3
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java69
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/LocalTransferWorker.java31
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/QueueSchedulerTimerTask.java10
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RefreshQueueManagerTimerTask.java10
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java25
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java19
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/util/MessageUtil.java31
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/ColorHelper.java8
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IDropUtils.java4
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IconHelper.java37
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java53
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java12
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LocalFileUtils.java4
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/TreeUtils.java145
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/FileSystemModel.java32
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSFileSystemModel.java32
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSNode.java50
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java47
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSRowModel.java10
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSSearchTableModel.java23
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTree.java104
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java217
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferable.java16
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/InfoPanelTransferHandler.java137
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsSelectionListenerForBuildingInfoPanel.java103
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsTreeListenerForBuildingInfoPanel.java86
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/LocalFileNode.java5
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/LocalFileSystemModel.java52
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/LocalFileTree.java123
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/LocalTreeTransferHandler.java98
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/MetadataTableModel.java10
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerDetailTableModel.java9
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerMasterTableModel.java17
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.form15
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java334
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/exceptions/IdropAlreadyRunningException.java9
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/exceptions/IdropException.java7
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/exceptions/IdropRuntimeException.java7
-rw-r--r--idrop-swing/src/main/resources/idrop.properties5
-rw-r--r--idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImplTest.java3
66 files changed, 6239 insertions, 4994 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AboutDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AboutDialog.java
index 411e330..f343c7e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AboutDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AboutDialog.java
@@ -1,7 +1,6 @@
/*
* Created on Oct 8, 2010, 7:54:33 AM
*/
-
package org.irods.jargon.idrop.desktop.systraygui;
import java.awt.event.ActionEvent;
@@ -18,62 +17,80 @@ import javax.swing.KeyStroke;
public class AboutDialog extends javax.swing.JDialog {
/** Creates new form AboutDialog */
- public AboutDialog(java.awt.Frame parent, boolean modal) {
+ public AboutDialog(final java.awt.Frame parent, final boolean modal) {
super(parent, modal);
initComponents();
registerKeystrokeListener();
}
/**
- * 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.
+ * 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() {
-
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iDROP - About");
-
- jLabel1.setFont(new java.awt.Font("SansSerif", 1, 18));
- jLabel1.setText("iDROP - the iRODS Cloud Browser");
-
- jLabel2.setText("Version 0.9.0 - alpha");
-
- btnOK.setMnemonic('O');
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKPressed(evt);
- }
- });
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createSequentialGroup().add(51, 51, 51).add(jLabel1).addContainerGap(56, Short.MAX_VALUE))
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- layout.createSequentialGroup().addContainerGap(311, Short.MAX_VALUE).add(btnOK).add(36, 36, 36))
- .add(layout
- .createSequentialGroup()
- .add(128, 128, 128)
- .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 166,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(128, Short.MAX_VALUE)));
- layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup().add(35, 35, 35).add(jLabel1).add(43, 43, 43).add(jLabel2)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(btnOK)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnOKPressed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKPressed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jLabel1 = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDROP - About");
+
+ jLabel1.setFont(new java.awt.Font("SansSerif", 1, 18));
+ jLabel1.setText("iDROP - the iRODS Cloud Browser");
+
+ jLabel2.setText("Version 0.9.0 - alpha");
+
+ btnOK.setMnemonic('O');
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKPressed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
+ getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup().add(51, 51, 51)
+ .add(jLabel1).addContainerGap(56, Short.MAX_VALUE))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ layout.createSequentialGroup()
+ .addContainerGap(311, Short.MAX_VALUE)
+ .add(btnOK).add(36, 36, 36))
+ .add(layout
+ .createSequentialGroup()
+ .add(128, 128, 128)
+ .add(jLabel2,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 166,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(128, Short.MAX_VALUE)));
+ layout.setVerticalGroup(layout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ layout.createSequentialGroup()
+ .add(35, 35, 35)
+ .add(jLabel1)
+ .add(43, 43, 43)
+ .add(jLabel2)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(btnOK)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnOKPressed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKPressed
disposeOfAbout();
}// GEN-LAST:event_btnOKPressed
@@ -86,24 +103,24 @@ public class AboutDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
disposeOfAbout();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnOK;
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnOK;
-
- private javax.swing.JLabel jLabel1;
-
- private javax.swing.JLabel jLabel2;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.java
index 61a01cb..e7f6e04 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.java
@@ -26,109 +26,117 @@ import org.slf4j.LoggerFactory;
public class ChangePasswordDialog extends javax.swing.JDialog {
private final iDrop idrop;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(ChangePasswordDialog.class);
/** Creates new form PreferencesDialog */
- public ChangePasswordDialog(final iDrop idrop, boolean modal) {
+ public ChangePasswordDialog(final iDrop idrop, final boolean modal) {
super(idrop, modal);
this.idrop = idrop;
initComponents();
}
/**
- * 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.
+ * 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;
-
- tabPreferences = new javax.swing.JTabbedPane();
- pnlPasswords = new javax.swing.JPanel();
- lblCurrentAccountLabel = new javax.swing.JLabel();
- lblCurrentAccount = new javax.swing.JLabel();
- lblNewPassword = new javax.swing.JLabel();
- passwdNewPassword = new javax.swing.JPasswordField();
- lblConfirmPassword = new javax.swing.JLabel();
- passwdConfirmPassword = new javax.swing.JPasswordField();
- btnUpdatePassword = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iDrop - Preferences");
- setAlwaysOnTop(true);
- setMinimumSize(new java.awt.Dimension(551, 400));
-
- tabPreferences.addChangeListener(new javax.swing.event.ChangeListener() {
- @Override
- public void stateChanged(javax.swing.event.ChangeEvent evt) {
- tabPreferencesStateChanged(evt);
- }
- });
-
- pnlPasswords.setLayout(new java.awt.GridBagLayout());
-
- lblCurrentAccountLabel.setText("Current account:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlPasswords.add(lblCurrentAccountLabel, gridBagConstraints);
-
- lblCurrentAccount.setText("XXXX");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlPasswords.add(lblCurrentAccount, gridBagConstraints);
-
- lblNewPassword.setText("New password:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlPasswords.add(lblNewPassword, gridBagConstraints);
-
- passwdNewPassword.setColumns(15);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlPasswords.add(passwdNewPassword, gridBagConstraints);
-
- lblConfirmPassword.setText("Confirm password:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlPasswords.add(lblConfirmPassword, gridBagConstraints);
-
- passwdConfirmPassword.setColumns(15);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlPasswords.add(passwdConfirmPassword, gridBagConstraints);
-
- btnUpdatePassword.setMnemonic('P');
- btnUpdatePassword.setText("Update Password");
- btnUpdatePassword.setToolTipText("Change the current password to the new values");
- btnUpdatePassword.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnUpdatePasswordActionPerformed(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 4;
- pnlPasswords.add(btnUpdatePassword, gridBagConstraints);
-
- tabPreferences.addTab("Passwords", null, pnlPasswords, "Manage passwords");
-
- getContentPane().add(tabPreferences, java.awt.BorderLayout.CENTER);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void tabPreferencesStateChanged(javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_tabPreferencesStateChanged
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ tabPreferences = new javax.swing.JTabbedPane();
+ pnlPasswords = new javax.swing.JPanel();
+ lblCurrentAccountLabel = new javax.swing.JLabel();
+ lblCurrentAccount = new javax.swing.JLabel();
+ lblNewPassword = new javax.swing.JLabel();
+ passwdNewPassword = new javax.swing.JPasswordField();
+ lblConfirmPassword = new javax.swing.JLabel();
+ passwdConfirmPassword = new javax.swing.JPasswordField();
+ btnUpdatePassword = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDrop - Preferences");
+ setAlwaysOnTop(true);
+ setMinimumSize(new java.awt.Dimension(551, 400));
+
+ tabPreferences
+ .addChangeListener(new javax.swing.event.ChangeListener() {
+ @Override
+ public void stateChanged(
+ final javax.swing.event.ChangeEvent evt) {
+ tabPreferencesStateChanged(evt);
+ }
+ });
+
+ pnlPasswords.setLayout(new java.awt.GridBagLayout());
+
+ lblCurrentAccountLabel.setText("Current account:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlPasswords.add(lblCurrentAccountLabel, gridBagConstraints);
+
+ lblCurrentAccount.setText("XXXX");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlPasswords.add(lblCurrentAccount, gridBagConstraints);
+
+ lblNewPassword.setText("New password:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlPasswords.add(lblNewPassword, gridBagConstraints);
+
+ passwdNewPassword.setColumns(15);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlPasswords.add(passwdNewPassword, gridBagConstraints);
+
+ lblConfirmPassword.setText("Confirm password:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlPasswords.add(lblConfirmPassword, gridBagConstraints);
+
+ passwdConfirmPassword.setColumns(15);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlPasswords.add(passwdConfirmPassword, gridBagConstraints);
+
+ btnUpdatePassword.setMnemonic('P');
+ btnUpdatePassword.setText("Update Password");
+ btnUpdatePassword
+ .setToolTipText("Change the current password to the new values");
+ btnUpdatePassword
+ .addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnUpdatePasswordActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 4;
+ pnlPasswords.add(btnUpdatePassword, gridBagConstraints);
+
+ tabPreferences.addTab("Passwords", null, pnlPasswords,
+ "Manage passwords");
+
+ getContentPane().add(tabPreferences, java.awt.BorderLayout.CENTER);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void tabPreferencesStateChanged(
+ final javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_tabPreferencesStateChanged
// TODO add your handling code here:
log.debug("preferences tab state changed: {}", evt);
if (pnlPasswords.isVisible()) {
@@ -136,7 +144,8 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
}
}// GEN-LAST:event_tabPreferencesStateChanged
- private void btnUpdatePasswordActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdatePasswordActionPerformed
+ private void btnUpdatePasswordActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdatePasswordActionPerformed
log.info("changing password, doing edits first");
initializePasswordColors();
@@ -149,8 +158,10 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
passwdConfirmPassword.setBackground(Color.red);
}
- if (passwdNewPassword.getPassword().length == 0 || passwdConfirmPassword.getPassword().length == 0) {
- JOptionPane.showMessageDialog(idrop, "New or confirm password is missing");
+ if (passwdNewPassword.getPassword().length == 0
+ || passwdConfirmPassword.getPassword().length == 0) {
+ JOptionPane.showMessageDialog(idrop,
+ "New or confirm password is missing");
return;
}
@@ -162,7 +173,8 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
} else {
passwdNewPassword.setBackground(Color.red);
passwdConfirmPassword.setBackground(Color.red);
- JOptionPane.showMessageDialog(idrop, "New and confirm password do not match");
+ JOptionPane.showMessageDialog(idrop,
+ "New and confirm password do not match");
return;
}
@@ -172,26 +184,34 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
IRODSAccount irodsAccount = idrop.getIrodsAccount();
List<LocalIRODSTransfer> recentQueue = idrop.getiDropCore().getTransferManager().getRecentQueue();
for (LocalIRODSTransfer localIRODSTransfer : recentQueue) {
- if (localIRODSTransfer.getTransferHost().equals(irodsAccount.getHost())
- && localIRODSTransfer.getTransferZone().equals(irodsAccount.getZone())
- && localIRODSTransfer.getTransferUserName().equals(irodsAccount.getUserName())) {
- // FIXME: right now, do not differentiate transfers that are comlete, this is a hack right now
- // if (localIRODSTransfer.getTransferState().equals(localIRODSTransfer.TRANSFER_STATE_COMPLETE)) {
+ if (localIRODSTransfer.getTransferHost().equals(
+ irodsAccount.getHost())
+ && localIRODSTransfer.getTransferZone().equals(
+ irodsAccount.getZone())
+ && localIRODSTransfer.getTransferUserName().equals(
+ irodsAccount.getUserName())) {
+ // FIXME: right now, do not differentiate transfers that are
+ // comlete, this is a hack right now
+ // if
+ // (localIRODSTransfer.getTransferState().equals(localIRODSTransfer.TRANSFER_STATE_COMPLETE))
+ // {
// log.info("matched transfer was complete, ignored");
// } else {
- JOptionPane
- .showMessageDialog(this,
- "Transfers for this account are pending, this account can not be changed until completed and purged");
+ JOptionPane.showMessageDialog(
+ this,
+ "Transfers for this account are pending, this account can not be changed until completed and purged");
return;
// }
}
}
- UserAO userAO = idrop.getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory()
- .getUserAO(idrop.getIrodsAccount());
- userAO.changeAUserPasswordByThatUser(irodsAccount.getUserName(), irodsAccount.getPassword(), newPassword);
+ UserAO userAO = idrop.getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory().getUserAO(idrop.getIrodsAccount());
+ userAO.changeAUserPasswordByThatUser(irodsAccount.getUserName(),
+ irodsAccount.getPassword(), newPassword);
log.info("password changed, resetting iRODS Account");
- IRODSAccount newAccount = new IRODSAccount(irodsAccount.getHost(), irodsAccount.getPort(),
- irodsAccount.getUserName(), newPassword, irodsAccount.getHomeDirectory(), irodsAccount.getZone(),
+ IRODSAccount newAccount = new IRODSAccount(irodsAccount.getHost(),
+ irodsAccount.getPort(), irodsAccount.getUserName(),
+ newPassword, irodsAccount.getHomeDirectory(),
+ irodsAccount.getZone(),
irodsAccount.getDefaultStorageResource());
idrop.setIrodsAccount(newAccount);
JOptionPane.showMessageDialog(this, "Password was changed");
@@ -199,9 +219,11 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
passwdConfirmPassword.setText("");
} catch (JargonException ex) {
- Logger.getLogger(ChangePasswordDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(ChangePasswordDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
} finally {
- idrop.getiDropCore().closeIRODSConnection(idrop.getiDropCore().getIrodsAccount());
+ idrop.getiDropCore().closeIRODSConnection(
+ idrop.getiDropCore().getIrodsAccount());
}
}// GEN-LAST:event_btnUpdatePasswordActionPerformed
@@ -215,24 +237,23 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
passwdNewPassword.setBackground(Color.white);
passwdConfirmPassword.setBackground(Color.white);
}
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnUpdatePassword;
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnUpdatePassword;
-
- private javax.swing.JLabel lblConfirmPassword;
+ private javax.swing.JLabel lblConfirmPassword;
- private javax.swing.JLabel lblCurrentAccount;
+ private javax.swing.JLabel lblCurrentAccount;
- private javax.swing.JLabel lblCurrentAccountLabel;
+ private javax.swing.JLabel lblCurrentAccountLabel;
- private javax.swing.JLabel lblNewPassword;
+ private javax.swing.JLabel lblNewPassword;
- private javax.swing.JPasswordField passwdConfirmPassword;
+ private javax.swing.JPasswordField passwdConfirmPassword;
- private javax.swing.JPasswordField passwdNewPassword;
+ private javax.swing.JPasswordField passwdNewPassword;
- private javax.swing.JPanel pnlPasswords;
+ private javax.swing.JPanel pnlPasswords;
- private javax.swing.JTabbedPane tabPreferences;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTabbedPane tabPreferences;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java
index 9bbb448..633fb04 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java
@@ -26,7 +26,6 @@ import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSOutlineModel
import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSTree;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
-import org.openide.util.Exceptions;
import org.slf4j.LoggerFactory;
/**
@@ -42,8 +41,8 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
public static org.slf4j.Logger log = LoggerFactory.getLogger(DeleteIRODSDialog.class);
/** Creates new form NewIRODSDirectoryDialog */
- public DeleteIRODSDialog(final iDrop parent, final boolean modal, final IRODSTree irodsTree,
- final IRODSNode deletedNode) {
+ public DeleteIRODSDialog(final iDrop parent, final boolean modal,
+ final IRODSTree irodsTree, final IRODSNode deletedNode) {
super(parent, modal);
this.idrop = parent;
this.irodsTree = irodsTree;
@@ -64,8 +63,8 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
}
/** Creates new form NewIRODSDirectoryDialog */
- public DeleteIRODSDialog(final iDrop parent, final boolean modal, final IRODSTree irodsTree,
- final List<IRODSNode> deletedNodes) {
+ public DeleteIRODSDialog(final iDrop parent, final boolean modal,
+ final IRODSTree irodsTree, final List<IRODSNode> deletedNodes) {
super(parent, modal);
this.idrop = parent;
this.irodsTree = irodsTree;
@@ -85,154 +84,175 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
try {
processDelete();
} catch (IdropException ex) {
- Logger.getLogger(DeleteIRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(DeleteIRODSDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentFolder = new java.awt.Label();
- scrollFileToDelete = new javax.swing.JScrollPane();
- txtAreaFileToDelete = new javax.swing.JTextArea();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- lblTitle.setText("Please hit OK to delete the following file/folder from iRODS");
- getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
-
- pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
-
- lblCurrentFolder.setText("File/folder to delete:");
-
- txtAreaFileToDelete.setColumns(20);
- txtAreaFileToDelete.setEditable(false);
- txtAreaFileToDelete.setLineWrap(true);
- txtAreaFileToDelete.setRows(5);
- scrollFileToDelete.setViewportView(txtAreaFileToDelete);
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- org.jdesktop.layout.GroupLayout.TRAILING,
- pnlCurrentParentLayout
- .createSequentialGroup()
- .addContainerGap(40, Short.MAX_VALUE)
- .add(lblCurrentFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(scrollFileToDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 413,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap()));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(35, 35, 35)
- .add(lblCurrentFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(22, 22, 22)
- .add(scrollFileToDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- pnlFolderData.add(pnlCurrentParent);
-
- getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
-
- pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlBottom.add(btnCancel);
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlBottom.add(btnOK);
-
- getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentFolder = new java.awt.Label();
+ scrollFileToDelete = new javax.swing.JScrollPane();
+ txtAreaFileToDelete = new javax.swing.JTextArea();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ lblTitle.setText("Please hit OK to delete the following file/folder from iRODS");
+ getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
+
+ pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
+
+ lblCurrentFolder.setText("File/folder to delete:");
+
+ txtAreaFileToDelete.setColumns(20);
+ txtAreaFileToDelete.setEditable(false);
+ txtAreaFileToDelete.setLineWrap(true);
+ txtAreaFileToDelete.setRows(5);
+ scrollFileToDelete.setViewportView(txtAreaFileToDelete);
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlCurrentParentLayout
+ .createSequentialGroup()
+ .addContainerGap(40, Short.MAX_VALUE)
+ .add(lblCurrentFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(scrollFileToDelete,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 413,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap()));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(35, 35, 35)
+ .add(lblCurrentFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(22, 22, 22)
+ .add(scrollFileToDelete,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ pnlFolderData.add(pnlCurrentParent);
+
+ getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
+
+ pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnCancel);
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnOK);
+
+ getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
try {
processDelete();
} catch (IdropException ex) {
- Logger.getLogger(DeleteIRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(DeleteIRODSDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblCurrentFolder;
+ private java.awt.Label lblCurrentFolder;
- private javax.swing.JLabel lblTitle;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JScrollPane scrollFileToDelete;
+ private javax.swing.JScrollPane scrollFileToDelete;
- private javax.swing.JTextArea txtAreaFileToDelete;
+ private javax.swing.JTextArea txtAreaFileToDelete;
- // End of variables declaration//GEN-END:variables
+ // End of variables declaration//GEN-END:variables
private void processDelete() throws IdropException {
log.info("delete folder named:{}", txtAreaFileToDelete.getText());
final DeleteIRODSDialog thisDialog = this;
@@ -247,8 +267,8 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
});
}
- private void deleteASingleFile(final IRODSFileFactory irodsFileFactory, final IRODSNode deletedNode)
- throws IdropException {
+ private void deleteASingleFile(final IRODSFileFactory irodsFileFactory,
+ final IRODSNode deletedNode) throws IdropException {
log.info("node to delete is: {}", deletedNode);
CollectionAndDataObjectListingEntry dataEntry = (CollectionAndDataObjectListingEntry) deletedNode.getUserObject();
@@ -269,7 +289,8 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
fileToDelete.delete();
} catch (JargonException ex) {
- Logger.getLogger(DeleteIRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(DeleteIRODSDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException(ex);
} finally {
idrop.getiDropCore().closeIRODSConnectionForLoggedInAccount();
@@ -284,7 +305,7 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
private DeleteIRODSDialog dialog;
private String message = "";
- DeleteWorker(DeleteIRODSDialog dialog) {
+ DeleteWorker(final DeleteIRODSDialog dialog) {
if (dialog == null) {
throw new IllegalArgumentException("null dialog");
}
@@ -310,7 +331,8 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
}
message = DELETE_SUCCESSFUL;
} catch (Exception ex) {
- Logger.getLogger(NewIRODSDirectoryDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(NewIRODSDirectoryDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
idrop.showIdropException(ex);
message = DELETE_ERRORS;
} finally {
@@ -333,11 +355,12 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
}
}
} catch (IdropException ex) {
- Logger.getLogger(DeleteIRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(DeleteIRODSDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
dialog.dispose();
-
+
}
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteLocalFileDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteLocalFileDialog.java
index 11841e3..5c74758 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteLocalFileDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteLocalFileDialog.java
@@ -44,8 +44,9 @@ public class DeleteLocalFileDialog extends javax.swing.JDialog {
public static org.slf4j.Logger log = LoggerFactory.getLogger(DeleteLocalFileDialog.class);
/** Creates new form to delete a local file */
- public DeleteLocalFileDialog(final iDrop parent, final boolean modal, final String directoryToDelete,
- final LocalFileTree localFileTree, final LocalFileNode deletedNode) {
+ public DeleteLocalFileDialog(final iDrop parent, final boolean modal,
+ final String directoryToDelete, final LocalFileTree localFileTree,
+ final LocalFileNode deletedNode) {
super(parent, modal);
this.idrop = parent;
this.directoryToDelete = directoryToDelete;
@@ -60,7 +61,8 @@ public class DeleteLocalFileDialog extends javax.swing.JDialog {
/** Creates new form to delete a local file */
public DeleteLocalFileDialog(final iDrop parent, final boolean modal,
- final LocalFileTree localFileTree, final List<LocalFileNode> deletedNodes) {
+ final LocalFileTree localFileTree,
+ final List<LocalFileNode> deletedNodes) {
super(parent, modal);
this.idrop = parent;
this.directoryToDelete = null;
@@ -73,143 +75,161 @@ public class DeleteLocalFileDialog extends javax.swing.JDialog {
}
- private void recursiveDelete(File fileToDelete) throws IOException {
+ private void recursiveDelete(final File fileToDelete) throws IOException {
if (fileToDelete.isDirectory()) {
for (File c : fileToDelete.listFiles()) {
recursiveDelete(c);
}
}
if (!fileToDelete.delete()) {
- throw new FileNotFoundException("Failed to delete file: " + fileToDelete);
+ throw new FileNotFoundException("Failed to delete file: "
+ + fileToDelete);
}
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentFolder = new java.awt.Label();
- scrollFileToDelete = new javax.swing.JScrollPane();
- txtAreaFileToDelete = new javax.swing.JTextArea();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iDrop - Delete local file or folder");
-
- lblTitle.setText("Please hit OK to delete the following file/folder from the local file syste");
- getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
-
- pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
-
- lblCurrentFolder.setText("File/folder to delete:");
-
- txtAreaFileToDelete.setColumns(20);
- txtAreaFileToDelete.setEditable(false);
- txtAreaFileToDelete.setLineWrap(true);
- txtAreaFileToDelete.setRows(5);
- scrollFileToDelete.setViewportView(txtAreaFileToDelete);
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- org.jdesktop.layout.GroupLayout.TRAILING,
- pnlCurrentParentLayout
- .createSequentialGroup()
- .addContainerGap(40, Short.MAX_VALUE)
- .add(lblCurrentFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(scrollFileToDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 413,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap()));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(35, 35, 35)
- .add(lblCurrentFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(22, 22, 22)
- .add(scrollFileToDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- pnlFolderData.add(pnlCurrentParent);
-
- getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
-
- pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlBottom.add(btnCancel);
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlBottom.add(btnOK);
-
- getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentFolder = new java.awt.Label();
+ scrollFileToDelete = new javax.swing.JScrollPane();
+ txtAreaFileToDelete = new javax.swing.JTextArea();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDrop - Delete local file or folder");
+
+ lblTitle.setText("Please hit OK to delete the following file/folder from the local file syste");
+ getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
+
+ pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
+
+ lblCurrentFolder.setText("File/folder to delete:");
+
+ txtAreaFileToDelete.setColumns(20);
+ txtAreaFileToDelete.setEditable(false);
+ txtAreaFileToDelete.setLineWrap(true);
+ txtAreaFileToDelete.setRows(5);
+ scrollFileToDelete.setViewportView(txtAreaFileToDelete);
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlCurrentParentLayout
+ .createSequentialGroup()
+ .addContainerGap(40, Short.MAX_VALUE)
+ .add(lblCurrentFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(scrollFileToDelete,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 413,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap()));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(35, 35, 35)
+ .add(lblCurrentFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(22, 22, 22)
+ .add(scrollFileToDelete,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ pnlFolderData.add(pnlCurrentParent);
+
+ getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
+
+ pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnCancel);
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnOK);
+
+ getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
processDelete();
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblCurrentFolder;
+ private java.awt.Label lblCurrentFolder;
- private javax.swing.JLabel lblTitle;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JScrollPane scrollFileToDelete;
+ private javax.swing.JScrollPane scrollFileToDelete;
- private javax.swing.JTextArea txtAreaFileToDelete;
+ private javax.swing.JTextArea txtAreaFileToDelete;
- // End of variables declaration//GEN-END:variables
+ // End of variables declaration//GEN-END:variables
private void processDelete() {
log.info("delete folder named:{}", txtAreaFileToDelete.getText());
@@ -246,11 +266,13 @@ public class DeleteLocalFileDialog extends javax.swing.JDialog {
thisDialog.dispose();
}
- private void deleteSingleNodeOperation(final LocalFileNode localNode) throws IOException {
- TreePath deletedNodePath = new TreePath(localNode);
- LocalFileNode parentNode = (LocalFileNode) localNode.getParent();
+ private void deleteSingleNodeOperation(final LocalFileNode localNode)
+ throws IOException {
+ new TreePath(localNode);
+ localNode.getParent();
File fileToDelete = (File) localNode.getUserObject();
- log.debug("deleting local file:{}", fileToDelete.getAbsolutePath());
+ log.debug("deleting local file:{}",
+ fileToDelete.getAbsolutePath());
recursiveDelete(fileToDelete);
LocalFileSystemModel localFileTreeModel = (LocalFileSystemModel) localFileTree.getModel();
@@ -264,15 +286,17 @@ public class DeleteLocalFileDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
processDelete();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java
index 0c85975..32b99bd 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java
@@ -18,25 +18,19 @@ import org.irods.jargon.transfer.engine.TransferManager;
public class IDROPCore {
private IRODSAccount irodsAccount = null;
-
private IRODSFileSystem irodsFileSystem = null;
public IRODSFileSystem getIrodsFileSystem() {
return irodsFileSystem;
}
- public void setIrodsFileSystem(IRODSFileSystem irodsFileSystem) {
+ public void setIrodsFileSystem(final IRODSFileSystem irodsFileSystem) {
this.irodsFileSystem = irodsFileSystem;
}
-
private IdropConfig idropConfig = null;
-
private TransferManager transferManager = null;
-
private IconManager iconManager = null;
-
private Timer queueTimer = new Timer();
-
private Preferences preferences = Preferences.userRoot();
public IDROPCore() {
@@ -47,7 +41,7 @@ public class IDROPCore {
return irodsAccount;
}
- public void setIrodsAccount(IRODSAccount irodsAccount) {
+ public void setIrodsAccount(final IRODSAccount irodsAccount) {
this.irodsAccount = irodsAccount;
}
@@ -55,7 +49,7 @@ public class IDROPCore {
return idropConfig;
}
- public void setIdropConfig(IdropConfig idropConfig) {
+ public void setIdropConfig(final IdropConfig idropConfig) {
this.idropConfig = idropConfig;
}
@@ -63,7 +57,7 @@ public class IDROPCore {
return transferManager;
}
- public void setTransferManager(TransferManager transferManager) {
+ public void setTransferManager(final TransferManager transferManager) {
this.transferManager = transferManager;
}
@@ -71,7 +65,7 @@ public class IDROPCore {
return iconManager;
}
- public void setIconManager(IconManager iconManager) {
+ public void setIconManager(final IconManager iconManager) {
this.iconManager = iconManager;
}
@@ -79,7 +73,7 @@ public class IDROPCore {
return queueTimer;
}
- public void setQueueTimer(Timer queueTimer) {
+ public void setQueueTimer(final Timer queueTimer) {
this.queueTimer = queueTimer;
}
@@ -89,54 +83,64 @@ public class IDROPCore {
}
@Deprecated
- public void setPreferences(Preferences preferences) {
+ public void setPreferences(final Preferences preferences) {
this.preferences = preferences;
}
/**
- * Handy method that delegates the process of getting an <code>IRODSAccessObjectFactory</code>.
+ * Handy method that delegates the process of getting an
+ * <code>IRODSAccessObjectFactory</code>.
*
* @return {@link IRODSAccessObjectFactory}
*/
public IRODSAccessObjectFactory getIRODSAccessObjectFactory() {
if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
}
try {
return irodsFileSystem.getIRODSAccessObjectFactory();
} catch (JargonException ex) {
- Logger.getLogger(IDROPCore.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("exception getting IRODSAccessObjectFactory");
+ Logger.getLogger(IDROPCore.class.getName()).log(Level.SEVERE, null,
+ ex);
+ throw new IdropRuntimeException(
+ "exception getting IRODSAccessObjectFactory");
}
}
/**
- * Method to close any iRODS connections in the current thread. This delegates to the <code>IRODSFileSystem</code>.
+ * Method to close any iRODS connections in the current thread. This
+ * delegates to the <code>IRODSFileSystem</code>.
*/
public void closeAllIRODSConnections() {
if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
}
irodsFileSystem.closeAndEatExceptions();
}
/**
- * Method to close iRODS connection denoted by the logged in <code>IRODSAccount</code>.
+ * Method to close iRODS connection denoted by the logged in
+ * <code>IRODSAccount</code>.
*/
public void closeIRODSConnectionForLoggedInAccount() {
if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
}
irodsFileSystem.closeAndEatExceptions(irodsAccount);
}
/**
- * Method to close iRODS connection denoted by the given <code>IRODSAccount</code> in the current thread. This
- * delegates to the <code>IRODSFileSystem</code>.
+ * Method to close iRODS connection denoted by the given
+ * <code>IRODSAccount</code> in the current thread. This delegates to the
+ * <code>IRODSFileSystem</code>.
*/
public void closeIRODSConnection(final IRODSAccount irodsAccount) {
if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
}
irodsFileSystem.closeAndEatExceptions(irodsAccount);
}
@@ -144,20 +148,25 @@ public class IDROPCore {
/**
* Get the <code>IRODSFileFactory</code> for the given account
*
- * @return {@link IRODSFileFactory} associated with the account currently logged in
+ * @return {@link IRODSFileFactory} associated with the account currently
+ * logged in
*/
public IRODSFileFactory getIRODSFileFactory(final IRODSAccount irodsAccount) {
if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
}
if (irodsAccount == null) {
- throw new IdropRuntimeException("No IRODSAccount set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSAccount set, cannot obtain the IRODSAccessObjectFactory");
}
try {
return irodsFileSystem.getIRODSFileFactory(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IDROPCore.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("Exception getting iRODS file factory", ex);
+ Logger.getLogger(IDROPCore.class.getName()).log(Level.SEVERE, null,
+ ex);
+ throw new IdropRuntimeException(
+ "Exception getting iRODS file factory", ex);
}
}
@@ -165,22 +174,26 @@ public class IDROPCore {
/**
* Get the <code>IRODSFileFactory</code> for the current logged-in account.
*
- * @return {@link IRODSFileFactory} associated with the account currently logged in
+ * @return {@link IRODSFileFactory} associated with the account currently
+ * logged in
*/
public IRODSFileFactory getIRODSFileFactoryForLoggedInAccount() {
if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
}
if (irodsAccount == null) {
- throw new IdropRuntimeException("No IRODSAccount set, cannot obtain the IRODSAccessObjectFactory");
+ throw new IdropRuntimeException(
+ "No IRODSAccount set, cannot obtain the IRODSAccessObjectFactory");
}
try {
return irodsFileSystem.getIRODSFileFactory(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IDROPCore.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("Exception getting iRODS file factory", ex);
+ Logger.getLogger(IDROPCore.class.getName()).log(Level.SEVERE, null,
+ ex);
+ throw new IdropRuntimeException(
+ "Exception getting iRODS file factory", ex);
}
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java
index ffd787d..a42ebc5 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java
@@ -21,19 +21,14 @@ public class IDROPSplashWindow extends JWindow {
*
*/
private static final long serialVersionUID = 1L;
-
private final org.slf4j.Logger log = LoggerFactory.getLogger(IDROPSplashWindow.class);
-
private ImageIcon splashImage = new ImageIcon(IDROPSplashWindow.class.getClassLoader().getResource(
"org/irods/jargon/idrop/desktop/images/iDrop.png"));
-
private JLabel jlblImage = new JLabel();
-
private JProgressBar jProgressBar1 = new JProgressBar();
-
private iDrop iDrop;
- public IDROPSplashWindow(iDrop iDrop) {
+ public IDROPSplashWindow(final iDrop iDrop) {
super(iDrop);
this.iDrop = iDrop;
try {
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
index 61e926a..e15c17b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
@@ -11,12 +11,10 @@ import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.KeyStroke;
-//import org.apache.commons.lang.StringUtils;
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.pub.IRODSFileSystem;
import org.irods.jargon.core.pub.UserAO;
-import org.irods.jargon.core.pub.domain.User;
import org.irods.jargon.idrop.desktop.systraygui.utils.IdropPropertiesHelper;
import org.slf4j.LoggerFactory;
@@ -30,24 +28,17 @@ public class LoginDialog extends JDialog {
*
*/
private static final long serialVersionUID = 1L;
-
private static final String PREF_LOGIN_HOST = "login.host";
-
private static final String PREF_LOGIN_ZONE = "login.zone";
-
private static final String PREF_LOGIN_RESOURCE = "login.resource";
-
private static final String PREF_LOGIN_USERNAME = "login.username";
-
private iDrop iDrop = null;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(LoginDialog.class);
- public LoginDialog(iDrop iDrop) {
+ public LoginDialog(final iDrop iDrop) {
super(iDrop, true);
this.iDrop = iDrop;
initComponents();
-
if (iDrop.getiDropCore().getIdropConfig().isLoginPreset()) {
loginUsingPreset();
@@ -59,7 +50,8 @@ public class LoginDialog extends JDialog {
}
- private void loginNormally(org.irods.jargon.idrop.desktop.systraygui.iDrop iDrop) {
+ private void loginNormally(
+ final org.irods.jargon.idrop.desktop.systraygui.iDrop iDrop) {
// predispose based on preferences
String host = iDrop.getiDropCore().getPreferences().get(PREF_LOGIN_HOST, null);
if (host == null || host.isEmpty()) {
@@ -101,7 +93,8 @@ public class LoginDialog extends JDialog {
* @throws NumberFormatException
*/
private boolean processLogin() throws NumberFormatException {
- // validate various inputs based on whether a full login, or a uid only login is indicated
+ // validate various inputs based on whether a full login, or a uid only
+ // login is indicated
if (!iDrop.getiDropCore().getIdropConfig().isLoginPreset()) {
txtHost.setBackground(Color.white);
txtPort.setBackground(Color.white);
@@ -140,77 +133,81 @@ public class LoginDialog extends JDialog {
// validated, now try to log in
if (iDrop.getiDropCore().getIdropConfig().isLoginPreset()) {
log.debug("creating account with presets");
- String presetHost = iDrop.getiDropCore().getIdropConfig().getIdropProperties()
- .getProperty(IdropPropertiesHelper.LOGIN_PRESET_HOST);
+ String presetHost = iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_HOST);
log.info("presetHost:{}", presetHost);
- int presetPort = Integer.parseInt(iDrop.getiDropCore().getIdropConfig().getIdropProperties()
- .getProperty(IdropPropertiesHelper.LOGIN_PRESET_PORT));
+ int presetPort = Integer.parseInt(iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_PORT));
log.info("presetPort:{}", presetPort);
- String presetZone = iDrop.getiDropCore().getIdropConfig().getIdropProperties()
- .getProperty(IdropPropertiesHelper.LOGIN_PRESET_ZONE);
+ String presetZone = iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_ZONE);
log.info("presetZone:{}", presetZone);
- String presetResource = iDrop.getiDropCore().getIdropConfig().getIdropProperties()
- .getProperty(IdropPropertiesHelper.LOGIN_PRESET_RESOURCE);
+ String presetResource = iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(
+ IdropPropertiesHelper.LOGIN_PRESET_RESOURCE);
log.info("presetResource:{}", presetResource);
sb.append('/');
sb.append(presetZone);
sb.append("/home/");
sb.append(txtUserName.getText());
- irodsAccount = IRODSAccount.instance(presetHost, presetPort, txtUserName.getText(),
- new String(password.getPassword()), sb.toString(), presetZone, presetResource);
+ irodsAccount = IRODSAccount.instance(presetHost, presetPort,
+ txtUserName.getText(),
+ new String(password.getPassword()), sb.toString(),
+ presetZone, presetResource);
} else {
sb.append('/');
sb.append(txtZone.getText());
sb.append("/home/");
sb.append(txtUserName.getText());
- irodsAccount = IRODSAccount.instance(txtHost.getText(), Integer.parseInt(txtPort.getText()),
- txtUserName.getText(), new String(password.getPassword()), sb.toString(), txtZone.getText(),
- txtResource.getText());
+ irodsAccount = IRODSAccount.instance(txtHost.getText(),
+ Integer.parseInt(txtPort.getText()),
+ txtUserName.getText(),
+ new String(password.getPassword()), sb.toString(),
+ txtZone.getText(), txtResource.getText());
}
} catch (JargonException ex) {
- Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,
+ null, ex);
iDrop.showIdropException(ex);
return true;
}
- // I figure at this point, it's safe to set the preferences...note that we are not caching password
+ // I figure at this point, it's safe to set the preferences...note that
+ // we are not caching password
iDrop.getiDropCore().getPreferences().put(PREF_LOGIN_HOST, txtHost.getText());
iDrop.getiDropCore().getPreferences().put(PREF_LOGIN_ZONE, txtZone.getText());
iDrop.getiDropCore().getPreferences().put(PREF_LOGIN_RESOURCE, txtResource.getText());
iDrop.getiDropCore().getPreferences().put(PREF_LOGIN_USERNAME, txtUserName.getText());
IRODSFileSystem irodsFileSystem = null;
+
try {
- irodsFileSystem = IRODSFileSystem.instance();
+ irodsFileSystem = iDrop.getiDropCore().getIrodsFileSystem();
final UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
- final User loggedInUser = userAO.findByName(txtUserName.getText());
+ userAO.findByName(txtUserName.getText());
iDrop.setIrodsAccount(irodsAccount);
this.dispose();
} catch (JargonException ex) {
if (ex.getMessage().indexOf("Connection refused") > -1) {
- Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,
+ null, ex);
iDrop.showMessageFromOperation("Cannot connect to the server, is it down?");
return true;
} else if (ex.getMessage().indexOf("Connection reset") > -1) {
- Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,
+ null, ex);
iDrop.showMessageFromOperation("Cannot connect to the server, is it down?");
return true;
} else if (ex.getMessage().indexOf("io exception opening socket") > -1) {
- Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,
+ null, ex);
iDrop.showMessageFromOperation("Cannot connect to the server, is it down?");
return true;
} else {
- Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,
+ null, ex);
iDrop.showMessageFromOperation("login error - unable to log in, or invalid user id");
return true;
}
} finally {
if (irodsFileSystem != null) {
- try {
- irodsFileSystem.close();
- } catch (JargonException ex) {
- Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);
- }
+ irodsFileSystem.closeAndEatExceptions();
}
}
return false;
@@ -221,190 +218,196 @@ public class LoginDialog extends JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
+
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
processLogin();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
/**
- * 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.
+ * 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;
-
- pnlLoginInfo = new javax.swing.JPanel();
- lblHost = new javax.swing.JLabel();
- txtHost = new javax.swing.JTextField();
- lblPort = new javax.swing.JLabel();
- txtPort = new javax.swing.JTextField();
- lblZone = new javax.swing.JLabel();
- txtZone = new javax.swing.JTextField();
- lblResource = new javax.swing.JLabel();
- txtResource = new javax.swing.JTextField();
- lblUserName = new javax.swing.JLabel();
- txtUserName = new javax.swing.JTextField();
- lblPassword = new javax.swing.JLabel();
- password = new javax.swing.JPasswordField();
- pnlToolbar = new javax.swing.JPanel();
- btnOK = new javax.swing.JButton();
- btnCancel = new javax.swing.JButton();
- lblLogin = new javax.swing.JLabel();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- pnlLoginInfo.setLayout(new java.awt.GridBagLayout());
-
- lblHost.setText("Host:");
- pnlLoginInfo.add(lblHost, new java.awt.GridBagConstraints());
-
- txtHost.setColumns(30);
- pnlLoginInfo.add(txtHost, new java.awt.GridBagConstraints());
-
- lblPort.setText("Port:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- pnlLoginInfo.add(lblPort, gridBagConstraints);
-
- txtPort.setColumns(8);
- txtPort.setText("1247");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(txtPort, gridBagConstraints);
-
- lblZone.setText("Zone:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- pnlLoginInfo.add(lblZone, gridBagConstraints);
-
- txtZone.setColumns(30);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 2;
- pnlLoginInfo.add(txtZone, gridBagConstraints);
-
- lblResource.setText("Resource:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
- pnlLoginInfo.add(lblResource, gridBagConstraints);
-
- txtResource.setColumns(30);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 3;
- pnlLoginInfo.add(txtResource, gridBagConstraints);
-
- lblUserName.setText("User Name:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 4;
- pnlLoginInfo.add(lblUserName, gridBagConstraints);
-
- txtUserName.setColumns(30);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 4;
- pnlLoginInfo.add(txtUserName, gridBagConstraints);
-
- lblPassword.setText("Password:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 5;
- pnlLoginInfo.add(lblPassword, gridBagConstraints);
-
- password.setColumns(30);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(password, gridBagConstraints);
-
- this.getContentPane().add(pnlLoginInfo, java.awt.BorderLayout.CENTER);
-
- pnlToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 2, 5));
-
- btnOK.setMnemonic('o');
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlToolbar.add(btnOK);
-
- btnCancel.setMnemonic('c');
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlToolbar.add(btnCancel);
-
- this.getContentPane().add(pnlToolbar, java.awt.BorderLayout.SOUTH);
-
- lblLogin.setText("Please log in to your iDrop data grid");
- this.getContentPane().add(lblLogin, java.awt.BorderLayout.PAGE_START);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ pnlLoginInfo = new javax.swing.JPanel();
+ lblHost = new javax.swing.JLabel();
+ txtHost = new javax.swing.JTextField();
+ lblPort = new javax.swing.JLabel();
+ txtPort = new javax.swing.JTextField();
+ lblZone = new javax.swing.JLabel();
+ txtZone = new javax.swing.JTextField();
+ lblResource = new javax.swing.JLabel();
+ txtResource = new javax.swing.JTextField();
+ lblUserName = new javax.swing.JLabel();
+ txtUserName = new javax.swing.JTextField();
+ lblPassword = new javax.swing.JLabel();
+ password = new javax.swing.JPasswordField();
+ pnlToolbar = new javax.swing.JPanel();
+ btnOK = new javax.swing.JButton();
+ btnCancel = new javax.swing.JButton();
+ lblLogin = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ pnlLoginInfo.setLayout(new java.awt.GridBagLayout());
+
+ lblHost.setText("Host:");
+ pnlLoginInfo.add(lblHost, new java.awt.GridBagConstraints());
+
+ txtHost.setColumns(30);
+ pnlLoginInfo.add(txtHost, new java.awt.GridBagConstraints());
+
+ lblPort.setText("Port:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ pnlLoginInfo.add(lblPort, gridBagConstraints);
+
+ txtPort.setColumns(8);
+ txtPort.setText("1247");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(txtPort, gridBagConstraints);
+
+ lblZone.setText("Zone:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ pnlLoginInfo.add(lblZone, gridBagConstraints);
+
+ txtZone.setColumns(30);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ pnlLoginInfo.add(txtZone, gridBagConstraints);
+
+ lblResource.setText("Resource:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ pnlLoginInfo.add(lblResource, gridBagConstraints);
+
+ txtResource.setColumns(30);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 3;
+ pnlLoginInfo.add(txtResource, gridBagConstraints);
+
+ lblUserName.setText("User Name:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ pnlLoginInfo.add(lblUserName, gridBagConstraints);
+
+ txtUserName.setColumns(30);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 4;
+ pnlLoginInfo.add(txtUserName, gridBagConstraints);
+
+ lblPassword.setText("Password:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ pnlLoginInfo.add(lblPassword, gridBagConstraints);
+
+ password.setColumns(30);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(password, gridBagConstraints);
+
+ this.getContentPane().add(pnlLoginInfo, java.awt.BorderLayout.CENTER);
+
+ pnlToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT,
+ 2, 5));
+
+ btnOK.setMnemonic('o');
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlToolbar.add(btnOK);
+
+ btnCancel.setMnemonic('c');
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlToolbar.add(btnCancel);
+
+ this.getContentPane().add(pnlToolbar, java.awt.BorderLayout.SOUTH);
+
+ lblLogin.setText("Please log in to your iDrop data grid");
+ this.getContentPane().add(lblLogin, java.awt.BorderLayout.PAGE_START);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
processLogin();
}// GEN-LAST:event_btnOKActionPerformed
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
System.exit(0);
}// GEN-LAST:event_btnCancelActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private javax.swing.JLabel lblHost;
+ private javax.swing.JLabel lblHost;
- private javax.swing.JLabel lblLogin;
+ private javax.swing.JLabel lblLogin;
- private javax.swing.JLabel lblPassword;
+ private javax.swing.JLabel lblPassword;
- private javax.swing.JLabel lblPort;
+ private javax.swing.JLabel lblPort;
- private javax.swing.JLabel lblResource;
+ private javax.swing.JLabel lblResource;
- private javax.swing.JLabel lblUserName;
+ private javax.swing.JLabel lblUserName;
- private javax.swing.JLabel lblZone;
+ private javax.swing.JLabel lblZone;
- private javax.swing.JPasswordField password;
+ private javax.swing.JPasswordField password;
- private javax.swing.JPanel pnlLoginInfo;
+ private javax.swing.JPanel pnlLoginInfo;
- private javax.swing.JPanel pnlToolbar;
+ private javax.swing.JPanel pnlToolbar;
- private javax.swing.JTextField txtHost;
+ private javax.swing.JTextField txtHost;
- private javax.swing.JTextField txtPort;
+ private javax.swing.JTextField txtPort;
- private javax.swing.JTextField txtResource;
+ private javax.swing.JTextField txtResource;
- private javax.swing.JTextField txtUserName;
+ private javax.swing.JTextField txtUserName;
- private javax.swing.JTextField txtZone;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTextField txtZone;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MessageManager.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MessageManager.java
index b9b933e..a7ead32 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MessageManager.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MessageManager.java
@@ -13,16 +13,21 @@ public class MessageManager {
public static final String TITLE_MESSAGE = "iDrop Message";
- public static void showError(Component rootComponent, String message, String title) {
- JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.ERROR_MESSAGE);
+ public static void showError(final Component rootComponent,
+ final String message, final String title) {
+ JOptionPane.showMessageDialog(rootComponent, message, title,
+ JOptionPane.ERROR_MESSAGE);
}
- public static void showWarning(Component rootComponent, String message, String title) {
- JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.WARNING_MESSAGE);
+ public static void showWarning(final Component rootComponent,
+ final String message, final String title) {
+ JOptionPane.showMessageDialog(rootComponent, message, title,
+ JOptionPane.WARNING_MESSAGE);
}
- public static void showMessage(Component rootComponent, String message, String title) {
- JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.INFORMATION_MESSAGE);
+ public static void showMessage(final Component rootComponent,
+ final String message, final String title) {
+ JOptionPane.showMessageDialog(rootComponent, message, title,
+ JOptionPane.INFORMATION_MESSAGE);
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetadataViewDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetadataViewDialog.java
index 522817d..cd0910f 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetadataViewDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetadataViewDialog.java
@@ -24,17 +24,14 @@ import org.irods.jargon.idrop.exceptions.IdropException;
public class MetadataViewDialog extends javax.swing.JDialog {
private final iDrop idropGui;
-
private final IRODSAccount irodsAccount;
-
private final String irodsAbsolutePath;
-
private final String fileName;
-
private final boolean collection;
/** Creates new form MetadataViewDialog */
- public MetadataViewDialog(final iDrop idropGui, final IRODSAccount irodsAccount, final String absolutePath) {
+ public MetadataViewDialog(final iDrop idropGui,
+ final IRODSAccount irodsAccount, final String absolutePath) {
super(idropGui, true);
this.idropGui = idropGui;
this.irodsAccount = irodsAccount;
@@ -46,7 +43,8 @@ public class MetadataViewDialog extends javax.swing.JDialog {
}
/** Creates new form MetadataViewDialog */
- public MetadataViewDialog(final iDrop idropGui, final IRODSAccount irodsAccount, final String absolutePath,
+ public MetadataViewDialog(final iDrop idropGui,
+ final IRODSAccount irodsAccount, final String absolutePath,
final String fileName) {
super(idropGui, true);
this.idropGui = idropGui;
@@ -59,90 +57,104 @@ public class MetadataViewDialog extends javax.swing.JDialog {
}
/**
- * 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.
+ * 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() {
-
- pnlTop = new javax.swing.JPanel();
- lblAbsolutePath = new javax.swing.JLabel();
- pnlCenter = new javax.swing.JPanel();
- scrollMetadata = new javax.swing.JScrollPane();
- tableMetadata = new javax.swing.JTable();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Metadata View");
-
- lblAbsolutePath.setText("test");
-
- org.jdesktop.layout.GroupLayout pnlTopLayout = new org.jdesktop.layout.GroupLayout(pnlTop);
- pnlTop.setLayout(pnlTopLayout);
- pnlTopLayout.setHorizontalGroup(pnlTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTopLayout.createSequentialGroup().addContainerGap()
- .add(lblAbsolutePath, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 596, Short.MAX_VALUE)
- .addContainerGap()));
- pnlTopLayout.setVerticalGroup(pnlTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTopLayout
- .createSequentialGroup()
- .add(10, 10, 10)
- .add(lblAbsolutePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- getContentPane().add(pnlTop, java.awt.BorderLayout.NORTH);
-
- pnlCenter.setLayout(new java.awt.GridLayout());
-
- scrollMetadata.setViewportView(null);
-
- tableMetadata.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { { null, null, null, null },
- { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] {
- "Title 1", "Title 2", "Title 3", "Title 4" }));
- tableMetadata.setMaximumSize(new java.awt.Dimension(2147483647, 32000));
- tableMetadata.setPreferredSize(new java.awt.Dimension(700, 64));
- tableMetadata.setSize(new java.awt.Dimension(700, 200));
- scrollMetadata.setViewportView(tableMetadata);
-
- pnlCenter.add(scrollMetadata);
-
- getContentPane().add(pnlCenter, java.awt.BorderLayout.CENTER);
-
- pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlBottom.add(btnCancel);
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlBottom.add(btnOK);
-
- getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ pnlTop = new javax.swing.JPanel();
+ lblAbsolutePath = new javax.swing.JLabel();
+ pnlCenter = new javax.swing.JPanel();
+ scrollMetadata = new javax.swing.JScrollPane();
+ tableMetadata = new javax.swing.JTable();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("Metadata View");
+
+ lblAbsolutePath.setText("test");
+
+ org.jdesktop.layout.GroupLayout pnlTopLayout = new org.jdesktop.layout.GroupLayout(
+ pnlTop);
+ pnlTop.setLayout(pnlTopLayout);
+ pnlTopLayout.setHorizontalGroup(pnlTopLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlTopLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(lblAbsolutePath,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 596, Short.MAX_VALUE).addContainerGap()));
+ pnlTopLayout.setVerticalGroup(pnlTopLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlTopLayout
+ .createSequentialGroup()
+ .add(10, 10, 10)
+ .add(lblAbsolutePath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 33,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ getContentPane().add(pnlTop, java.awt.BorderLayout.NORTH);
+
+ pnlCenter.setLayout(new java.awt.GridLayout());
+
+ scrollMetadata.setViewportView(null);
+
+ tableMetadata.setModel(new javax.swing.table.DefaultTableModel(
+ new Object[][] { { null, null, null, null },
+ { null, null, null, null }, { null, null, null, null },
+ { null, null, null, null } }, new String[] { "Title 1",
+ "Title 2", "Title 3", "Title 4" }));
+ tableMetadata.setMaximumSize(new java.awt.Dimension(2147483647, 32000));
+ tableMetadata.setPreferredSize(new java.awt.Dimension(700, 64));
+ tableMetadata.setSize(new java.awt.Dimension(700, 200));
+ scrollMetadata.setViewportView(tableMetadata);
+
+ pnlCenter.add(scrollMetadata);
+
+ getContentPane().add(pnlCenter, java.awt.BorderLayout.CENTER);
+
+ pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnCancel);
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnOK);
+
+ getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
this.dispose();
}// GEN-LAST:event_btnOKActionPerformed
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
@@ -152,44 +164,46 @@ public class MetadataViewDialog extends javax.swing.JDialog {
@Override
public void run() {
try {
- IRODSFileService irodsFileService = new IRODSFileService(irodsAccount, idropGui.getiDropCore()
- .getIrodsFileSystem());
+ IRODSFileService irodsFileService = new IRODSFileService(
+ irodsAccount, idropGui.getiDropCore().getIrodsFileSystem());
MetadataTableModel metadataTableModel;
if (collection) {
lblAbsolutePath.setText(irodsAbsolutePath);
- metadataTableModel = new MetadataTableModel(irodsFileService
- .getMetadataForCollection(irodsAbsolutePath));
+ metadataTableModel = new MetadataTableModel(
+ irodsFileService.getMetadataForCollection(irodsAbsolutePath));
} else {
- lblAbsolutePath.setText(irodsAbsolutePath + "/" + fileName);
- metadataTableModel = new MetadataTableModel(irodsFileService.getMetadataForDataObject(
+ lblAbsolutePath.setText(irodsAbsolutePath + "/"
+ + fileName);
+ metadataTableModel = new MetadataTableModel(
+ irodsFileService.getMetadataForDataObject(
irodsAbsolutePath, fileName));
}
tableMetadata.setModel(metadataTableModel);
tableMetadata.validate();
} catch (IdropException ex) {
- Logger.getLogger(MetadataViewDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(MetadataViewDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
idropGui.showIdropException(ex);
}
}
});
}
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnCancel;
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
-
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private javax.swing.JLabel lblAbsolutePath;
+ private javax.swing.JLabel lblAbsolutePath;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlCenter;
+ private javax.swing.JPanel pnlCenter;
- private javax.swing.JPanel pnlTop;
+ private javax.swing.JPanel pnlTop;
- private javax.swing.JScrollPane scrollMetadata;
+ private javax.swing.JScrollPane scrollMetadata;
- private javax.swing.JTable tableMetadata;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTable tableMetadata;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java
index d691805..1f51d9b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java
@@ -31,32 +31,26 @@ import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
import org.slf4j.LoggerFactory;
/**
- * Dialog to confirm and process the move of a file to a new iRODS location (phymove gesture)
+ * Dialog to confirm and process the move of a file to a new iRODS location
+ * (phymove gesture)
*
* @author mikeconway
*/
public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
private final iDrop idrop;
-
private final IRODSTree stagingViewTree;
-
private final IRODSOutlineModel irodsFileSystemModel;
-
private final IRODSNode targetNode;
-
private final String targetAbsolutePath;
-
private final IRODSFile sourceFile;
-
private final List<IRODSFile> sourceFiles;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(MoveOrCopyiRODSDialog.class);
-
private final boolean isCopy;
- public MoveOrCopyiRODSDialog(final iDrop parent, final boolean modal, final IRODSNode targetNode,
- final IRODSTree stagingViewTree, final IRODSFile sourceFile, final String targetAbsolutePath,
+ public MoveOrCopyiRODSDialog(final iDrop parent, final boolean modal,
+ final IRODSNode targetNode, final IRODSTree stagingViewTree,
+ final IRODSFile sourceFile, final String targetAbsolutePath,
final boolean isCopy) {
super(parent, modal);
this.idrop = parent;
@@ -70,8 +64,9 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
initializeDialog();
}
- public MoveOrCopyiRODSDialog(final iDrop parent, final boolean modal, final IRODSNode targetNode,
- final IRODSTree stagingViewTree, final List<IRODSFile> sourceFiles, final String targetAbsolutePath,
+ public MoveOrCopyiRODSDialog(final iDrop parent, final boolean modal,
+ final IRODSNode targetNode, final IRODSTree stagingViewTree,
+ final List<IRODSFile> sourceFiles, final String targetAbsolutePath,
final boolean isCopy) {
super(parent, modal);
this.idrop = parent;
@@ -104,212 +99,267 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentParent = new java.awt.Label();
- lblNewDiretoryName = new java.awt.Label();
- scrollCurrentParent = new javax.swing.JScrollPane();
- txtCurrentParent = new javax.swing.JTextArea();
- scrollNewLocation = new javax.swing.JScrollPane();
- txtNewLocation = new javax.swing.JTextArea();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iRODS Move File - Confirmation Dialog");
- setName("NewParentDialog"); // NOI18N
-
- lblTitle.setText("Confirm the move of the iRODS File to a new collection");
-
- lblCurrentParent.setText("Current location:");
-
- lblNewDiretoryName.setText("New location:");
-
- txtCurrentParent.setColumns(20);
- txtCurrentParent.setEditable(false);
- txtCurrentParent.setRows(5);
- txtCurrentParent.setWrapStyleWord(true);
- txtCurrentParent.setFocusable(false);
- scrollCurrentParent.setViewportView(txtCurrentParent);
-
- txtNewLocation.setColumns(20);
- txtNewLocation.setEditable(false);
- txtNewLocation.setRows(5);
- txtNewLocation.setWrapStyleWord(true);
- txtNewLocation.setFocusable(false);
- scrollNewLocation.setViewportView(txtNewLocation);
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(44, 44, 44)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(20, 20, 20)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(scrollNewLocation, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 531,
- Short.MAX_VALUE))
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(scrollCurrentParent, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 531,
- Short.MAX_VALUE))).addContainerGap()));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(51, 51, 51)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(scrollCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(scrollNewLocation, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)).add(21, 21, 21)));
-
- lblNewDiretoryName.getAccessibleContext().setAccessibleName("New directory name:");
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
-
- org.jdesktop.layout.GroupLayout pnlBottomLayout = new org.jdesktop.layout.GroupLayout(pnlBottom);
- pnlBottom.setLayout(pnlBottomLayout);
- pnlBottomLayout.setHorizontalGroup(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlBottomLayout.createSequentialGroup().add(451, 451, 451).add(btnCancel)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnOK).add(4, 4, 4)));
- pnlBottomLayout.setVerticalGroup(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlBottomLayout
- .createSequentialGroup()
- .add(5, 5, 5)
- .add(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(btnCancel).add(btnOK))));
-
- org.jdesktop.layout.GroupLayout pnlFolderDataLayout = new org.jdesktop.layout.GroupLayout(pnlFolderData);
- pnlFolderData.setLayout(pnlFolderDataLayout);
- pnlFolderDataLayout.setHorizontalGroup(pnlFolderDataLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlFolderDataLayout
- .createSequentialGroup()
- .add(pnlCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(61, Short.MAX_VALUE))
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlFolderDataLayout
- .createSequentialGroup()
- .addContainerGap(134, Short.MAX_VALUE)
- .add(pnlBottom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap()));
- pnlFolderDataLayout.setVerticalGroup(pnlFolderDataLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlFolderDataLayout
- .createSequentialGroup()
- .add(pnlCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(pnlBottom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblTitle, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 622,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(pnlFolderData, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
- layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(lblTitle)
- .add(pnlFolderData, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentParent = new java.awt.Label();
+ lblNewDiretoryName = new java.awt.Label();
+ scrollCurrentParent = new javax.swing.JScrollPane();
+ txtCurrentParent = new javax.swing.JTextArea();
+ scrollNewLocation = new javax.swing.JScrollPane();
+ txtNewLocation = new javax.swing.JTextArea();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iRODS Move File - Confirmation Dialog");
+ setName("NewParentDialog"); // NOI18N
+
+ lblTitle.setText("Confirm the move of the iRODS File to a new collection");
+
+ lblCurrentParent.setText("Current location:");
+
+ lblNewDiretoryName.setText("New location:");
+
+ txtCurrentParent.setColumns(20);
+ txtCurrentParent.setEditable(false);
+ txtCurrentParent.setRows(5);
+ txtCurrentParent.setWrapStyleWord(true);
+ txtCurrentParent.setFocusable(false);
+ scrollCurrentParent.setViewportView(txtCurrentParent);
+
+ txtNewLocation.setColumns(20);
+ txtNewLocation.setEditable(false);
+ txtNewLocation.setRows(5);
+ txtNewLocation.setWrapStyleWord(true);
+ txtNewLocation.setFocusable(false);
+ scrollNewLocation.setViewportView(txtNewLocation);
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(44, 44, 44)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(20, 20, 20)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(scrollNewLocation,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 531, Short.MAX_VALUE))
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(scrollCurrentParent,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 531, Short.MAX_VALUE)))
+ .addContainerGap()));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(51, 51, 51)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(scrollCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(scrollNewLocation,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(21, 21, 21)));
+
+ lblNewDiretoryName.getAccessibleContext().setAccessibleName(
+ "New directory name:");
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout pnlBottomLayout = new org.jdesktop.layout.GroupLayout(
+ pnlBottom);
+ pnlBottom.setLayout(pnlBottomLayout);
+ pnlBottomLayout.setHorizontalGroup(pnlBottomLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlBottomLayout
+ .createSequentialGroup()
+ .add(451, 451, 451)
+ .add(btnCancel)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(btnOK).add(4, 4, 4)));
+ pnlBottomLayout
+ .setVerticalGroup(pnlBottomLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlBottomLayout
+ .createSequentialGroup()
+ .add(5, 5, 5)
+ .add(pnlBottomLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(btnCancel).add(btnOK))));
+
+ org.jdesktop.layout.GroupLayout pnlFolderDataLayout = new org.jdesktop.layout.GroupLayout(
+ pnlFolderData);
+ pnlFolderData.setLayout(pnlFolderDataLayout);
+ pnlFolderDataLayout
+ .setHorizontalGroup(pnlFolderDataLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlFolderDataLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(61, Short.MAX_VALUE))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlFolderDataLayout
+ .createSequentialGroup()
+ .addContainerGap(134, Short.MAX_VALUE)
+ .add(pnlBottom,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap()));
+ pnlFolderDataLayout.setVerticalGroup(pnlFolderDataLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlFolderDataLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(pnlBottom,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
+ getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblTitle, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 622, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(pnlFolderData,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
+ layout.setVerticalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createSequentialGroup()
+ .add(lblTitle)
+ .add(pnlFolderData,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
processMoveOrCopy();
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblCurrentParent;
+ private java.awt.Label lblCurrentParent;
- private java.awt.Label lblNewDiretoryName;
+ private java.awt.Label lblNewDiretoryName;
- private javax.swing.JLabel lblTitle;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JScrollPane scrollCurrentParent;
+ private javax.swing.JScrollPane scrollCurrentParent;
- private javax.swing.JScrollPane scrollNewLocation;
+ private javax.swing.JScrollPane scrollNewLocation;
- private javax.swing.JTextArea txtCurrentParent;
+ private javax.swing.JTextArea txtCurrentParent;
- private javax.swing.JTextArea txtNewLocation;
+ private javax.swing.JTextArea txtNewLocation;
- // End of variables declaration//GEN-END:variables
+ // End of variables declaration//GEN-END:variables
private void processMoveOrCopy() {
- // add the new folder to irods, add to the tree, and scroll the tree into view
+ // add the new folder to irods, add to the tree, and scroll the tree
+ // into view
final MoveOrCopyiRODSDialog thisDialog = this;
log.info("processing move or copy");
java.awt.EventQueue.invokeLater(new Runnable() {
@@ -322,10 +372,11 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
DataTransferOperations dataTransferOperations;
try {
- dataTransferOperations = idrop.getiDropCore().getIRODSAccessObjectFactory()
- .getDataTransferOperations(idrop.getIrodsAccount());
+ dataTransferOperations = idrop.getiDropCore().getIRODSAccessObjectFactory().getDataTransferOperations(
+ idrop.getIrodsAccount());
} catch (Exception e) {
- idrop.getiDropCore().closeIRODSConnection(idrop.getIrodsAccount());
+ idrop.getiDropCore().closeIRODSConnection(
+ idrop.getIrodsAccount());
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
throw new IdropRuntimeException(e);
}
@@ -333,18 +384,26 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
List<IRODSFile> filesThatHadOverwriteError = new ArrayList<IRODSFile>();
if (sourceFile != null) {
- log.info("processing the move/copy for one file:{}", sourceFile);
+ log.info("processing the move/copy for one file:{}",
+ sourceFile);
try {
if (isCopy) {
- processACopyOfAnIndividualFile(dataTransferOperations, sourceFile, targetAbsolutePath);
+ processACopyOfAnIndividualFile(
+ dataTransferOperations, sourceFile,
+ targetAbsolutePath);
} else {
- processAMoveOfAnIndividualFile(dataTransferOperations, sourceFile, targetAbsolutePath);
+ processAMoveOfAnIndividualFile(
+ dataTransferOperations, sourceFile,
+ targetAbsolutePath);
}
} catch (JargonFileOrCollAlreadyExistsException ex) {
- Logger.getLogger(MoveOrCopyiRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(
+ MoveOrCopyiRODSDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
filesThatHadOverwriteError.add(sourceFile);
} catch (JargonException je) {
- if (je.getMessage().indexOf("-834000") > -1 || je.getMessage().indexOf("-833000") > -1) {
+ if (je.getMessage().indexOf("-834000") > -1
+ || je.getMessage().indexOf("-833000") > -1) {
filesThatHadOverwriteError.add(sourceFile);
} else {
throw new IdropException(je);
@@ -355,18 +414,22 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
for (IRODSFile sourceFileEntry : sourceFiles) {
try {
if (isCopy) {
- processACopyOfAnIndividualFile(dataTransferOperations, sourceFileEntry,
- targetAbsolutePath);
+ processACopyOfAnIndividualFile(
+ dataTransferOperations,
+ sourceFileEntry, targetAbsolutePath);
} else {
- processAMoveOfAnIndividualFile(dataTransferOperations, sourceFileEntry,
- targetAbsolutePath);
+ processAMoveOfAnIndividualFile(
+ dataTransferOperations,
+ sourceFileEntry, targetAbsolutePath);
}
} catch (JargonFileOrCollAlreadyExistsException ex) {
// FIXME: fix in jargon core to differentiate!
- Logger.getLogger(MoveOrCopyiRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(
+ MoveOrCopyiRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
filesThatHadOverwriteError.add(sourceFile);
} catch (JargonException je) {
- if (je.getMessage().indexOf("-834000") > -1 || je.getMessage().indexOf("-833000") > -1) {
+ if (je.getMessage().indexOf("-834000") > -1
+ || je.getMessage().indexOf("-833000") > -1) {
filesThatHadOverwriteError.add(sourceFile);
} else {
throw new IdropException(je);
@@ -388,43 +451,49 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
thisDialog.dispose();
} catch (IdropException ex) {
- Logger.getLogger(IRODSTree.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSTree.class.getName()).log(
+ Level.SEVERE, null, ex);
idrop.showIdropException(ex);
return;
} finally {
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- idrop.getiDropCore().closeIRODSConnection(idrop.getIrodsAccount());
+ idrop.getiDropCore().closeIRODSConnection(
+ idrop.getIrodsAccount());
}
}
});
}
- private void processAMoveOfAnIndividualFile(final DataTransferOperations dataTransferOperations,
- final IRODSFile sourceFile, final String targetAbsolutePath) throws JargonFileOrCollAlreadyExistsException,
- IdropException {
+ private void processAMoveOfAnIndividualFile(
+ final DataTransferOperations dataTransferOperations,
+ final IRODSFile sourceFile, final String targetAbsolutePath)
+ throws JargonFileOrCollAlreadyExistsException, IdropException {
try {
if (sourceFile.isFile()) {
log.debug("source file is a file, do a move");
- dataTransferOperations.move(sourceFile.getAbsolutePath(), targetAbsolutePath);
+ dataTransferOperations.move(sourceFile.getAbsolutePath(),
+ targetAbsolutePath);
- IRODSFile targetFile = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount()
- .instanceIRODSFile(targetAbsolutePath);
+ IRODSFile targetFile = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount().instanceIRODSFile(targetAbsolutePath);
String targetPathForNotify = null;
if (targetFile.isDirectory()) {
- targetPathForNotify = targetFile.getAbsolutePath() + "/" + sourceFile.getName();
+ targetPathForNotify = targetFile.getAbsolutePath() + "/"
+ + sourceFile.getName();
} else {
targetPathForNotify = targetFile.getAbsolutePath();
}
- irodsFileSystemModel.notifyFileShouldBeAdded(stagingViewTree, targetPathForNotify);
+ irodsFileSystemModel.notifyFileShouldBeAdded(stagingViewTree,
+ targetPathForNotify);
} else {
log.debug("source file is a collection, reparent it");
- dataTransferOperations
- .moveTheSourceCollectionUnderneathTheTargetCollectionUsingSourceParentCollectionName(
- sourceFile.getAbsolutePath(), targetAbsolutePath);
- irodsFileSystemModel.notifyFileShouldBeAdded(stagingViewTree, targetAbsolutePath);
+ dataTransferOperations.moveTheSourceCollectionUnderneathTheTargetCollectionUsingSourceParentCollectionName(
+ sourceFile.getAbsolutePath(),
+ targetAbsolutePath);
+ irodsFileSystemModel.notifyFileShouldBeAdded(stagingViewTree,
+ targetAbsolutePath);
}
} catch (JargonFileOrCollAlreadyExistsException fcae) {
throw fcae;
@@ -432,8 +501,8 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
throw new IdropException(je);
}
- TreePath sourceNodePath = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree,
- sourceFile.getAbsolutePath());
+ TreePath sourceNodePath = TreeUtils.buildTreePathForIrodsAbsolutePath(
+ stagingViewTree, sourceFile.getAbsolutePath());
if (sourceNodePath == null) {
log.info("could not find tree path for source node, ignore");
return;
@@ -442,20 +511,24 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
irodsFileSystemModel.notifyFileShouldBeRemoved(sourceNode);
}
- private void processACopyOfAnIndividualFile(DataTransferOperations dataTransferOperations, IRODSFile sourceFile,
- String targetAbsolutePath) throws IdropException {
+ private void processACopyOfAnIndividualFile(
+ final DataTransferOperations dataTransferOperations,
+ final IRODSFile sourceFile, final String targetAbsolutePath)
+ throws IdropException {
try {
- idrop.getiDropCore()
- .getTransferManager()
- .enqueueACopy(sourceFile.getAbsolutePath(), sourceFile.getResource(), targetAbsolutePath,
- idrop.getiDropCore().getIrodsAccount());
+ idrop.getiDropCore().getTransferManager().enqueueACopy(sourceFile.getAbsolutePath(),
+ sourceFile.getResource(), targetAbsolutePath,
+ idrop.getiDropCore().getIrodsAccount());
} catch (JargonException ex) {
- Logger.getLogger(MoveOrCopyiRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("unable to copy file due to JargonException", ex);
+ Logger.getLogger(MoveOrCopyiRODSDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException(
+ "unable to copy file due to JargonException", ex);
}
- // notifications are done at completion of transfer using status callbacks
+ // notifications are done at completion of transfer using status
+ // callbacks
}
/**
@@ -463,15 +536,17 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
processMoveOrCopy();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewIRODSDirectoryDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewIRODSDirectoryDialog.java
index 2991a8c..1223395 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewIRODSDirectoryDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewIRODSDirectoryDialog.java
@@ -1,7 +1,4 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
+
/*
* NewIRODSDirectoryDialog.java
@@ -26,7 +23,6 @@ import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
import org.irods.jargon.idrop.desktop.systraygui.services.IRODSFileService;
import org.irods.jargon.idrop.desktop.systraygui.utils.TreeUtils;
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.IRODSTree;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
@@ -40,26 +36,23 @@ import org.slf4j.LoggerFactory;
public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
private final iDrop idrop;
-
private String parentDirectory = "";
-
private final IRODSTree stagingViewTree;
-
private final IRODSNode parentNode;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(NewIRODSDirectoryDialog.class);
public String getParentDirectory() {
return parentDirectory;
}
- public void setParentDirectory(String parentDirectory) {
+ public void setParentDirectory(final String parentDirectory) {
this.parentDirectory = parentDirectory;
}
/** Creates new form NewIRODSDirectoryDialog */
- public NewIRODSDirectoryDialog(final iDrop parent, final boolean modal, final String parentDirectory,
- final IRODSTree stagingViewTree, final IRODSNode parentNode) {
+ public NewIRODSDirectoryDialog(final iDrop parent, final boolean modal,
+ final String parentDirectory, final IRODSTree stagingViewTree,
+ final IRODSNode parentNode) {
super(parent, modal);
this.idrop = parent;
this.parentDirectory = parentDirectory;
@@ -72,159 +65,183 @@ public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentParent = new java.awt.Label();
- scrollCurrentParent = new javax.swing.JScrollPane();
- txtAreaCurrentParent = new javax.swing.JTextArea();
- lblNewDiretoryName = new java.awt.Label();
- txtNewFolder = new javax.swing.JTextField();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Create New Folder Dialog");
- setName("NewParentDialog"); // NOI18N
-
- lblTitle.setText("Please enter a name for the new folder");
- getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
-
- pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
-
- lblCurrentParent.setText("Current parent directory:");
-
- txtAreaCurrentParent.setColumns(20);
- txtAreaCurrentParent.setEditable(false);
- txtAreaCurrentParent.setLineWrap(true);
- txtAreaCurrentParent.setRows(5);
- txtAreaCurrentParent.setFocusable(false);
- scrollCurrentParent.setViewportView(txtAreaCurrentParent);
-
- lblNewDiretoryName.setText("New folder name:");
-
- txtNewFolder.setToolTipText("A name for the new folder underneath the displayed parent");
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- org.jdesktop.layout.GroupLayout.TRAILING,
- pnlCurrentParentLayout
- .createSequentialGroup()
- .addContainerGap(20, Short.MAX_VALUE)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(txtNewFolder)
- .add(scrollCurrentParent, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 413,
- Short.MAX_VALUE)).addContainerGap()));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(58, 58, 58)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(scrollCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(txtNewFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(68, Short.MAX_VALUE)));
-
- lblNewDiretoryName.getAccessibleContext().setAccessibleName("New directory name:");
-
- pnlFolderData.add(pnlCurrentParent);
-
- getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
-
- pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlBottom.add(btnCancel);
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlBottom.add(btnOK);
-
- getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentParent = new java.awt.Label();
+ scrollCurrentParent = new javax.swing.JScrollPane();
+ txtAreaCurrentParent = new javax.swing.JTextArea();
+ lblNewDiretoryName = new java.awt.Label();
+ txtNewFolder = new javax.swing.JTextField();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("Create New Folder Dialog");
+ setName("NewParentDialog"); // NOI18N
+
+ lblTitle.setText("Please enter a name for the new folder");
+ getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
+
+ pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
+
+ lblCurrentParent.setText("Current parent directory:");
+
+ txtAreaCurrentParent.setColumns(20);
+ txtAreaCurrentParent.setEditable(false);
+ txtAreaCurrentParent.setLineWrap(true);
+ txtAreaCurrentParent.setRows(5);
+ txtAreaCurrentParent.setFocusable(false);
+ scrollCurrentParent.setViewportView(txtAreaCurrentParent);
+
+ lblNewDiretoryName.setText("New folder name:");
+
+ txtNewFolder
+ .setToolTipText("A name for the new folder underneath the displayed parent");
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlCurrentParentLayout
+ .createSequentialGroup()
+ .addContainerGap(20, Short.MAX_VALUE)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING,
+ false)
+ .add(txtNewFolder)
+ .add(scrollCurrentParent,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 413, Short.MAX_VALUE))
+ .addContainerGap()));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(58, 58, 58)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(scrollCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(txtNewFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(68, Short.MAX_VALUE)));
+
+ lblNewDiretoryName.getAccessibleContext().setAccessibleName(
+ "New directory name:");
+
+ pnlFolderData.add(pnlCurrentParent);
+
+ getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
+
+ pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnCancel);
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnOK);
+
+ getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
processNew();
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
-
- private javax.swing.JButton btnCancel;
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnCancel;
- private java.awt.Label lblCurrentParent;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblNewDiretoryName;
+ private java.awt.Label lblCurrentParent;
- private javax.swing.JLabel lblTitle;
+ private java.awt.Label lblNewDiretoryName;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JScrollPane scrollCurrentParent;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JTextArea txtAreaCurrentParent;
+ private javax.swing.JScrollPane scrollCurrentParent;
- private javax.swing.JTextField txtNewFolder;
+ private javax.swing.JTextArea txtAreaCurrentParent;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTextField txtNewFolder;
+ // End of variables declaration//GEN-END:variables
private void processNew() {
- // add the new folder to irods, add to the tree, and scroll the tree into view
+ // add the new folder to irods, add to the tree, and scroll the tree
+ // into view
if (txtNewFolder.getText().isEmpty()) {
txtNewFolder.setBackground(Color.red);
@@ -239,15 +256,17 @@ public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
@Override
public void run() {
try {
- log.info("adding new folder named:{}", txtNewFolder.getText());
+ log.info("adding new folder named:{}",
+ txtNewFolder.getText());
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
IRODSFileService irodsFileService;
try {
- irodsFileService = new IRODSFileService(idrop.getIrodsAccount(), idrop.getiDropCore()
- .getIrodsFileSystem());
+ irodsFileService = new IRODSFileService(idrop.getIrodsAccount(), idrop.getiDropCore().getIrodsFileSystem());
} catch (IdropException ex) {
- Logger.getLogger(NewIRODSDirectoryDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(
+ NewIRODSDirectoryDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
} finally {
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
@@ -262,10 +281,11 @@ public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
boolean created = irodsFileService.createNewFolder(newDirPath);
- IRODSOutlineModel irodsOutlineModel = (IRODSOutlineModel) stagingViewTree.getModel();
+ stagingViewTree.getModel();
if (!created) {
- log.info("could not create new folder in:{}", newDirPath);
+ log.info("could not create new folder in:{}",
+ newDirPath);
idrop.showMessageFromOperation("directory could not be created");
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
return;
@@ -276,8 +296,7 @@ public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
entry.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.COLLECTION);
entry.setParentPath(parentDirectory);
entry.setPathOrName(newDirPath);
- IRODSNode newNode = new IRODSNode(entry, idrop.getIrodsAccount(), idrop.getiDropCore()
- .getIrodsFileSystem(), idrop.getIrodsTree());
+ IRODSNode newNode = new IRODSNode(entry, idrop.getIrodsAccount(), idrop.getiDropCore().getIrodsFileSystem(), idrop.getIrodsTree());
log.info("inserting node at 0");
if (parentNode.isCached()) {
parentNode.insert(newNode, parentNode.getChildCount());
@@ -286,12 +305,14 @@ public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
}
try {
- TreePath path = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree,
- entry.getParentPath());
+ TreePath path = TreeUtils.buildTreePathForIrodsAbsolutePath(
+ stagingViewTree, entry.getParentPath());
stagingViewTree.collapsePath(path);
stagingViewTree.expandPath(path);
} catch (IdropException ex) {
- Logger.getLogger(NewIRODSDirectoryDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(
+ NewIRODSDirectoryDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
idrop.showIdropException(ex);
} finally {
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
@@ -313,15 +334,17 @@ public class NewIRODSDirectoryDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
processNew();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewLocalDirectoryDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewLocalDirectoryDialog.java
index c0b9324..6a60f30 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewLocalDirectoryDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/NewLocalDirectoryDialog.java
@@ -26,26 +26,23 @@ import org.slf4j.LoggerFactory;
public class NewLocalDirectoryDialog extends javax.swing.JDialog {
private final iDrop idrop;
-
private String parentDirectory = "";
-
private final LocalFileTree localFileTree;
-
private final LocalFileNode parentNode;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(NewLocalDirectoryDialog.class);
public String getParentDirectory() {
return parentDirectory;
}
- public void setParentDirectory(String parentDirectory) {
+ public void setParentDirectory(final String parentDirectory) {
this.parentDirectory = parentDirectory;
}
/** Creates new form NewIRODSDirectoryDialog */
- public NewLocalDirectoryDialog(final iDrop parent, final boolean modal, final String parentDirectory,
- final LocalFileTree localFileTree, final LocalFileNode parentNode) {
+ public NewLocalDirectoryDialog(final iDrop parent, final boolean modal,
+ final String parentDirectory, final LocalFileTree localFileTree,
+ final LocalFileNode parentNode) {
super(parent, modal);
this.idrop = parent;
this.parentDirectory = parentDirectory;
@@ -58,159 +55,183 @@ public class NewLocalDirectoryDialog extends javax.swing.JDialog {
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentParent = new java.awt.Label();
- scrollCurrentParent = new javax.swing.JScrollPane();
- txtAreaCurrentParent = new javax.swing.JTextArea();
- lblNewDiretoryName = new java.awt.Label();
- txtNewFolder = new javax.swing.JTextField();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Create New Folder Dialog");
- setName("NewParentDialog"); // NOI18N
-
- lblTitle.setText("Please enter a name for the new folder");
- getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
-
- pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
-
- lblCurrentParent.setText("Current parent directory:");
-
- txtAreaCurrentParent.setColumns(20);
- txtAreaCurrentParent.setEditable(false);
- txtAreaCurrentParent.setLineWrap(true);
- txtAreaCurrentParent.setRows(5);
- txtAreaCurrentParent.setFocusable(false);
- scrollCurrentParent.setViewportView(txtAreaCurrentParent);
-
- lblNewDiretoryName.setText("New folder name:");
-
- txtNewFolder.setToolTipText("A name for the new folder underneath the displayed parent");
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- org.jdesktop.layout.GroupLayout.TRAILING,
- pnlCurrentParentLayout
- .createSequentialGroup()
- .addContainerGap(20, Short.MAX_VALUE)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(txtNewFolder)
- .add(scrollCurrentParent, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 413,
- Short.MAX_VALUE)).addContainerGap()));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(58, 58, 58)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(scrollCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(txtNewFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(68, Short.MAX_VALUE)));
-
- lblNewDiretoryName.getAccessibleContext().setAccessibleName("New directory name:");
-
- pnlFolderData.add(pnlCurrentParent);
-
- getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
-
- pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlBottom.add(btnCancel);
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlBottom.add(btnOK);
-
- getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentParent = new java.awt.Label();
+ scrollCurrentParent = new javax.swing.JScrollPane();
+ txtAreaCurrentParent = new javax.swing.JTextArea();
+ lblNewDiretoryName = new java.awt.Label();
+ txtNewFolder = new javax.swing.JTextField();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("Create New Folder Dialog");
+ setName("NewParentDialog"); // NOI18N
+
+ lblTitle.setText("Please enter a name for the new folder");
+ getContentPane().add(lblTitle, java.awt.BorderLayout.NORTH);
+
+ pnlFolderData.setLayout(new java.awt.GridLayout(0, 1));
+
+ lblCurrentParent.setText("Current parent directory:");
+
+ txtAreaCurrentParent.setColumns(20);
+ txtAreaCurrentParent.setEditable(false);
+ txtAreaCurrentParent.setLineWrap(true);
+ txtAreaCurrentParent.setRows(5);
+ txtAreaCurrentParent.setFocusable(false);
+ scrollCurrentParent.setViewportView(txtAreaCurrentParent);
+
+ lblNewDiretoryName.setText("New folder name:");
+
+ txtNewFolder
+ .setToolTipText("A name for the new folder underneath the displayed parent");
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlCurrentParentLayout
+ .createSequentialGroup()
+ .addContainerGap(20, Short.MAX_VALUE)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING,
+ false)
+ .add(txtNewFolder)
+ .add(scrollCurrentParent,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 413, Short.MAX_VALUE))
+ .addContainerGap()));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(58, 58, 58)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(scrollCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(txtNewFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(68, Short.MAX_VALUE)));
+
+ lblNewDiretoryName.getAccessibleContext().setAccessibleName(
+ "New directory name:");
+
+ pnlFolderData.add(pnlCurrentParent);
+
+ getContentPane().add(pnlFolderData, java.awt.BorderLayout.CENTER);
+
+ pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnCancel);
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnOK);
+
+ getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
processNew();
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
-
- private javax.swing.JButton btnCancel;
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnCancel;
- private java.awt.Label lblCurrentParent;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblNewDiretoryName;
+ private java.awt.Label lblCurrentParent;
- private javax.swing.JLabel lblTitle;
+ private java.awt.Label lblNewDiretoryName;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JScrollPane scrollCurrentParent;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JTextArea txtAreaCurrentParent;
+ private javax.swing.JScrollPane scrollCurrentParent;
- private javax.swing.JTextField txtNewFolder;
+ private javax.swing.JTextArea txtAreaCurrentParent;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTextField txtNewFolder;
+ // End of variables declaration//GEN-END:variables
private void processNew() {
- // add the new folder to irods, add to the tree, and scroll the tree into view
+ // add the new folder to irods, add to the tree, and scroll the tree
+ // into view
if (txtNewFolder.getText().isEmpty()) {
txtNewFolder.setBackground(Color.red);
@@ -240,7 +261,8 @@ public class NewLocalDirectoryDialog extends javax.swing.JDialog {
boolean created = newDir.mkdirs();
if (!created) {
- log.info("could not create new folder in:{}", newDirPath);
+ log.info("could not create new folder in:{}",
+ newDirPath);
idrop.showMessageFromOperation("directory could not be created");
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
return;
@@ -250,7 +272,8 @@ public class NewLocalDirectoryDialog extends javax.swing.JDialog {
LocalFileNode newLocalNode = new LocalFileNode(newDir);
LocalFileSystemModel localFileSystemModel = (LocalFileSystemModel) localFileTree.getModel();
if (parentNode.isCached()) {
- localFileSystemModel.insertNodeInto(newLocalNode, parentNode, parentNode.getChildCount());
+ localFileSystemModel.insertNodeInto(newLocalNode,
+ parentNode, parentNode.getChildCount());
} else {
parentNode.lazyLoadOfChildrenOfThisNode();
}
@@ -277,15 +300,17 @@ public class NewLocalDirectoryDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
processNew();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form
index 9bc346c..08c8faf 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form
@@ -443,7 +443,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="9" max="-2" attributes="0"/>
<Component id="pnlProgress" min="-2" pref="1016" max="-2" attributes="1"/>
- <EmptySpace max="32767" attributes="0"/>
+ <EmptySpace pref="111" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java
index cbaf3cc..f17bdf2 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java
@@ -31,7 +31,8 @@ import org.slf4j.LoggerFactory;
*
* @author mikeconway
*/
-public class QueueManagerDialog extends javax.swing.JDialog implements ListSelectionListener {
+public class QueueManagerDialog extends javax.swing.JDialog implements
+ ListSelectionListener {
private static final long serialVersionUID = 1L;
@@ -39,39 +40,34 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
RECENT, ERROR, WARNING, CURRENT
}
-
private final TransferManager transferManager;
-
private ViewType viewType = null;
-
private iDrop iDropParent = null;
-
private RefreshQueueManagerTimerTask refreshQueueManagerTimerTask = null;
-
private Timer refreshQueueTimer = null;
-
private LocalIRODSTransfer selectedMasterTableObject = null;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(QueueManagerDialog.class);
- private int showResubmitConfirm(LocalIRODSTransfer selectedTransfer) {
+ private int showResubmitConfirm(final LocalIRODSTransfer selectedTransfer) {
StringBuilder sb = new StringBuilder();
sb.append("Would you like to resubmit this transfer? \n ");
sb.append(selectedTransfer.toString());
// default icon, custom title
- int n = JOptionPane.showConfirmDialog(this, sb.toString(), "Resubmit Confirmaiton", JOptionPane.YES_NO_OPTION);
+ int n = JOptionPane.showConfirmDialog(this, sb.toString(),
+ "Resubmit Confirmaiton", JOptionPane.YES_NO_OPTION);
return n;
}
- private int showCancelConfirm(LocalIRODSTransfer selectedTransfer) {
+ private int showCancelConfirm(final LocalIRODSTransfer selectedTransfer) {
StringBuilder sb = new StringBuilder();
sb.append("Would you like to cancel this transfer? \n ");
sb.append(selectedTransfer.toString());
// default icon, custom title
- int n = JOptionPane.showConfirmDialog(this, sb.toString(), "Cancel Confirmaiton", JOptionPane.YES_NO_OPTION);
+ int n = JOptionPane.showConfirmDialog(this, sb.toString(),
+ "Cancel Confirmaiton", JOptionPane.YES_NO_OPTION);
return n;
}
@@ -80,7 +76,7 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
return viewType;
}
- public synchronized void setViewType(ViewType viewType) {
+ public synchronized void setViewType(final ViewType viewType) {
if (viewType != this.getViewType()) {
selectedMasterTableObject = null;
}
@@ -88,7 +84,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}
/** Creates new form QueueManagerDialog */
- public QueueManagerDialog(final iDrop iDropParent, final TransferManager transferManager, final ViewType viewType)
+ public QueueManagerDialog(final iDrop iDropParent,
+ final TransferManager transferManager, final ViewType viewType)
throws IdropException {
super((JFrame) null, true);
@@ -109,7 +106,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
btnCancelSelected.setEnabled(false);
btnResubmitSelected.setEnabled(false);
btnRestartSelected.setEnabled(false);
- jTableMaster.setModel(new QueueManagerMasterTableModel(new ArrayList<LocalIRODSTransfer>()));
+ jTableMaster.setModel(new QueueManagerMasterTableModel(
+ new ArrayList<LocalIRODSTransfer>()));
jTableMaster.getSelectionModel().addListSelectionListener(this);
jTableDetails.setVisible(false);
pnlTransferInfo.setVisible(false);
@@ -119,759 +117,996 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}
/**
- * 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.
+ * 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() {
-
- btnGroupDetailsDisplay = new javax.swing.ButtonGroup();
- pnlTop = new javax.swing.JPanel();
- lblHeader = new javax.swing.JLabel();
- toolbarQueueManagement = new javax.swing.JToolBar();
- jSeparator2 = new javax.swing.JToolBar.Separator();
- btnPurgeAll = new javax.swing.JButton();
- btnPurgeSuccessful = new javax.swing.JButton();
- jSeparator1 = new javax.swing.JToolBar.Separator();
- btnDeleteSelected = new javax.swing.JButton();
- btnCancelSelected = new javax.swing.JButton();
- btnRestartSelected = new javax.swing.JButton();
- btnResubmitSelected = new javax.swing.JButton();
- jSeparator3 = new javax.swing.JToolBar.Separator();
- btnRefreshView = new javax.swing.JButton();
- toggleAutoRefresh = new javax.swing.JToggleButton();
- pnlCenter = new javax.swing.JPanel();
- splitQueueTableMasterAndDetail = new javax.swing.JSplitPane();
- jScrollPaneMaster = new javax.swing.JScrollPane();
- jTableMaster = new javax.swing.JTable();
- tabDetails = new javax.swing.JTabbedPane();
- pnlTransferDetailsSummary = new javax.swing.JPanel();
- pnlTransferInfo = new javax.swing.JPanel();
- lblTransferStatusLabel = new javax.swing.JLabel();
- lblTransferStatus = new javax.swing.JLabel();
- lblErrorStatusLabel = new javax.swing.JLabel();
- lblErrorStatus = new javax.swing.JLabel();
- lblTransferDateLabel = new javax.swing.JLabel();
- lblSourcePathLabel = new javax.swing.JLabel();
- lblTargetPathLabel = new javax.swing.JLabel();
- lblLastGoodPathLabel = new javax.swing.JLabel();
- jScrollPaneSourcePath = new javax.swing.JScrollPane();
- txtSourcePath = new javax.swing.JTextArea();
- jScrollPaneTargetPath = new javax.swing.JScrollPane();
- txtTargetPath = new javax.swing.JTextArea();
- jScrollPane1 = new javax.swing.JScrollPane();
- txtLastGoodPath = new javax.swing.JTextArea();
- lblTransferTypeLabel = new javax.swing.JLabel();
- lblTransferType = new javax.swing.JLabel();
- lblTransferDate = new javax.swing.JLabel();
- pnlErrorMessage = new javax.swing.JPanel();
- scrollErrorMessage = new javax.swing.JScrollPane();
- txtAreaErrorMessage = new javax.swing.JTextArea();
- jLabel1 = new javax.swing.JLabel();
- pnlProgress = new javax.swing.JPanel();
- lblTransferred = new javax.swing.JLabel();
- lblCountSoFar = new javax.swing.JLabel();
- lblTransferredOutOf = new javax.swing.JLabel();
- lblCountOutOf = new javax.swing.JLabel();
- progressBarQueueDetails = new javax.swing.JProgressBar();
- lblResourceLabel = new javax.swing.JLabel();
- lblResource = new javax.swing.JLabel();
- pnlTrnasferDetailsTable = new javax.swing.JPanel();
- jScrollPaneDetails = new javax.swing.JScrollPane();
- jTableDetails = new javax.swing.JTable();
- pnlViewRadio = new javax.swing.JPanel();
- radioShowAll = new javax.swing.JRadioButton();
- radioShowError = new javax.swing.JRadioButton();
- jMenuBar1 = new javax.swing.JMenuBar();
- jMenu1 = new javax.swing.JMenu();
- jMenu2 = new javax.swing.JMenu();
- jMenuView = new javax.swing.JMenu();
- jMenuCurrent = new javax.swing.JMenuItem();
- jMenuRecent = new javax.swing.JMenuItem();
- jMenuError = new javax.swing.JMenuItem();
- jMenuWarning = new javax.swing.JMenuItem();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iDrop Transfer Client");
- setBounds(new java.awt.Rectangle(0, 22, 900, 1000));
- setMinimumSize(new java.awt.Dimension(900, 800));
- setResizable(false);
-
- lblHeader.setText("Most Recent iDrop Transfers");
-
- toolbarQueueManagement.setRollover(true);
- toolbarQueueManagement.add(jSeparator2);
-
- btnPurgeAll.setText("Purge All");
- btnPurgeAll.setToolTipText("Purge all complete and enqueued transfers");
- btnPurgeAll.setFocusable(false);
- btnPurgeAll.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnPurgeAll.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnPurgeAll.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnPurgeAllActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnPurgeAll);
-
- btnPurgeSuccessful.setText("Purge Successful");
- btnPurgeSuccessful.setToolTipText("Purge all completed, successful transfers");
- btnPurgeSuccessful.setFocusable(false);
- btnPurgeSuccessful.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnPurgeSuccessful.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnPurgeSuccessful.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnPurgeSuccessfulActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnPurgeSuccessful);
- toolbarQueueManagement.add(jSeparator1);
-
- btnDeleteSelected.setText("Delete Selected");
- btnDeleteSelected.setToolTipText("Delete the selected transfer");
- btnDeleteSelected.setFocusable(false);
- btnDeleteSelected.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnDeleteSelected.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnDeleteSelected.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnDeleteSelectedActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnDeleteSelected);
-
- btnCancelSelected.setText("Cancel Selected");
- btnCancelSelected.setToolTipText("Cancel the selected transfer");
- btnCancelSelected.setFocusable(false);
- btnCancelSelected.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnCancelSelected.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnCancelSelected.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelSelectedActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnCancelSelected);
-
- btnRestartSelected.setText("Restart selected transfer");
- btnRestartSelected.setToolTipText("Restart the selected transfer from the current checkpoint");
- btnRestartSelected.setFocusable(false);
- btnRestartSelected.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnRestartSelected.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnRestartSelected.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnRestartSelectedActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnRestartSelected);
-
- btnResubmitSelected.setText("Resubmit Selected");
- btnResubmitSelected.setToolTipText("Resubmit the selected transfer with no restart");
- btnResubmitSelected.setFocusable(false);
- btnResubmitSelected.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnResubmitSelected.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnResubmitSelected.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnResubmitSelectedActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnResubmitSelected);
- toolbarQueueManagement.add(jSeparator3);
-
- btnRefreshView.setText("Refresh View");
- btnRefreshView.setFocusable(false);
- btnRefreshView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnRefreshView.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnRefreshView.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnRefreshViewActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(btnRefreshView);
-
- toggleAutoRefresh.setText("Auto Refresh View");
- toggleAutoRefresh.setFocusable(false);
- toggleAutoRefresh.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- toggleAutoRefresh.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- toggleAutoRefresh.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- toggleAutoRefreshActionPerformed(evt);
- }
- });
- toolbarQueueManagement.add(toggleAutoRefresh);
-
- org.jdesktop.layout.GroupLayout pnlTopLayout = new org.jdesktop.layout.GroupLayout(pnlTop);
- pnlTop.setLayout(pnlTopLayout);
- pnlTopLayout.setHorizontalGroup(pnlTopLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblHeader, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1115,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(toolbarQueueManagement, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1115,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
- pnlTopLayout.setVerticalGroup(pnlTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTopLayout
- .createSequentialGroup()
- .add(lblHeader)
- .add(toolbarQueueManagement, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
-
- pnlCenter.setMinimumSize(new java.awt.Dimension(800, 200));
-
- splitQueueTableMasterAndDetail.setDividerLocation(200);
- splitQueueTableMasterAndDetail.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
- splitQueueTableMasterAndDetail.setName("splitQueueMasterAndDetail"); // NOI18N
- splitQueueTableMasterAndDetail.setOneTouchExpandable(true);
-
- jScrollPaneMaster.setPreferredSize(new java.awt.Dimension(454, 300));
- jScrollPaneMaster.setRequestFocusEnabled(false);
-
- jTableMaster.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { { null, null, null, null },
- { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] {
- "Title 1", "Title 2", "Title 3", "Title 4" }));
- jTableMaster.setAutoCreateRowSorter(true);
- jTableMaster.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
- jScrollPaneMaster.setViewportView(jTableMaster);
-
- splitQueueTableMasterAndDetail.setLeftComponent(jScrollPaneMaster);
-
- pnlTransferDetailsSummary.setMinimumSize(new java.awt.Dimension(800, 400));
- pnlTransferDetailsSummary.setPreferredSize(new java.awt.Dimension(0, 0));
-
- pnlTransferInfo.setMinimumSize(new java.awt.Dimension(800, 600));
- pnlTransferInfo.setPreferredSize(new java.awt.Dimension(904, 285));
-
- lblTransferStatusLabel.setText("Transfer Status:");
-
- lblTransferStatus.setText("jLabel1");
-
- lblErrorStatusLabel.setText("Error Status:");
-
- lblErrorStatus.setText("jLabel1");
-
- lblTransferDateLabel.setText("Transfer Date:");
-
- lblSourcePathLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
- lblSourcePathLabel.setText("Source Path:");
- lblSourcePathLabel.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
-
- lblTargetPathLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
- lblTargetPathLabel.setText("Destination Path:");
-
- lblLastGoodPathLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
- lblLastGoodPathLabel.setText("Last successful transfer:");
-
- jScrollPaneSourcePath.setMinimumSize(new java.awt.Dimension(100, 20));
-
- txtSourcePath.setColumns(60);
- txtSourcePath.setEditable(false);
- txtSourcePath.setLineWrap(true);
- txtSourcePath.setRows(2);
- txtSourcePath.setMinimumSize(new java.awt.Dimension(100, 20));
- txtSourcePath.setSize(new java.awt.Dimension(100, 20));
- jScrollPaneSourcePath.setViewportView(txtSourcePath);
-
- jScrollPaneTargetPath.setMinimumSize(new java.awt.Dimension(100, 20));
-
- txtTargetPath.setColumns(60);
- txtTargetPath.setEditable(false);
- txtTargetPath.setLineWrap(true);
- txtTargetPath.setRows(2);
- txtTargetPath.setWrapStyleWord(true);
- txtTargetPath.setSize(new java.awt.Dimension(100, 20));
- jScrollPaneTargetPath.setViewportView(txtTargetPath);
-
- txtLastGoodPath.setColumns(40);
- txtLastGoodPath.setEditable(false);
- txtLastGoodPath.setRows(2);
- jScrollPane1.setViewportView(txtLastGoodPath);
-
- lblTransferTypeLabel.setText("Transfer Type:");
-
- lblTransferType.setText("type");
-
- lblTransferDate.setText("jLabel1");
-
- scrollErrorMessage.setMinimumSize(new java.awt.Dimension(400, 40));
-
- txtAreaErrorMessage.setColumns(60);
- txtAreaErrorMessage.setEditable(false);
- txtAreaErrorMessage.setRows(2);
- scrollErrorMessage.setViewportView(txtAreaErrorMessage);
-
- jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
- jLabel1.setText("Error messages:");
-
- org.jdesktop.layout.GroupLayout pnlErrorMessageLayout = new org.jdesktop.layout.GroupLayout(pnlErrorMessage);
- pnlErrorMessage.setLayout(pnlErrorMessageLayout);
- pnlErrorMessageLayout.setHorizontalGroup(pnlErrorMessageLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlErrorMessageLayout
- .createSequentialGroup()
- .add(69, 69, 69)
- .add(jLabel1)
- .add(42, 42, 42)
- .add(scrollErrorMessage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 667,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(126, Short.MAX_VALUE)));
- pnlErrorMessageLayout.setVerticalGroup(pnlErrorMessageLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlErrorMessageLayout
- .createSequentialGroup()
- .addContainerGap(24, Short.MAX_VALUE)
- .add(pnlErrorMessageLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlErrorMessageLayout
- .createSequentialGroup()
- .add(scrollErrorMessage,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap())
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlErrorMessageLayout.createSequentialGroup().add(jLabel1).add(29, 29, 29)))));
-
- pnlProgress.setBackground(javax.swing.UIManager.getDefaults().getColor("TabbedPane.shadow"));
-
- lblTransferred.setText("Transferred ");
-
- lblCountSoFar.setText("0");
-
- lblTransferredOutOf.setText("out of ");
-
- lblCountOutOf.setText("0");
-
- org.jdesktop.layout.GroupLayout pnlProgressLayout = new org.jdesktop.layout.GroupLayout(pnlProgress);
- pnlProgress.setLayout(pnlProgressLayout);
- pnlProgressLayout.setHorizontalGroup(pnlProgressLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlProgressLayout
- .createSequentialGroup()
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(lblTransferred)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(lblCountSoFar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 96,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(27, 27, 27)
- .add(lblTransferredOutOf)
- .add(18, 18, 18)
- .add(lblCountOutOf, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 96,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(648, 648, 648))
- .add(pnlProgressLayout
- .createSequentialGroup()
- .addContainerGap()
- .add(progressBarQueueDetails, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 901,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap()));
- pnlProgressLayout.setVerticalGroup(pnlProgressLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlProgressLayout
- .createSequentialGroup()
- .addContainerGap()
- .add(pnlProgressLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblTransferred).add(lblTransferredOutOf).add(lblCountOutOf).add(lblCountSoFar))
- .add(18, 18, 18)
- .add(progressBarQueueDetails, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- lblResourceLabel.setText("Resource:");
-
- lblResource.setText("jLabel1");
-
- org.jdesktop.layout.GroupLayout pnlTransferInfoLayout = new org.jdesktop.layout.GroupLayout(pnlTransferInfo);
- pnlTransferInfo.setLayout(pnlTransferInfoLayout);
- pnlTransferInfoLayout.setHorizontalGroup(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlTransferInfoLayout
- .createSequentialGroup()
- .add(88, 88, 88)
- .add(lblTransferStatusLabel,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 112,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED)
- .add(lblTransferStatus,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 177,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(88, 88, 88).add(lblErrorStatusLabel))
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .add(99, 99, 99)
- .add(lblTransferTypeLabel)
- .add(18, 18, 18)
- .add(lblTransferType,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 119,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE).add(lblResourceLabel)))
- .add(18, 18, 18)
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .add(lblErrorStatus,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 181,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(31, 31, 31)
- .add(lblTransferDateLabel)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(lblTransferDate,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 163,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(lblResource, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 181,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .add(58, 58, 58)
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(lblLastGoodPathLabel,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 164,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblTargetPathLabel,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 142,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblSourcePathLabel,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 99,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(jScrollPane1)
- .add(jScrollPaneTargetPath, 0, 0, Short.MAX_VALUE)
- .add(jScrollPaneSourcePath,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 669,
- Short.MAX_VALUE))))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlTransferInfoLayout
- .createSequentialGroup()
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(pnlErrorMessage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(112, 112, 112))
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .add(9, 9, 9)
- .add(pnlProgress, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1016,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- pnlTransferInfoLayout.setVerticalGroup(pnlTransferInfoLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTransferInfoLayout
- .createSequentialGroup()
- .addContainerGap()
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblTransferStatusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblTransferStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblErrorStatusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblErrorStatus)
- .add(lblTransferDateLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblTransferDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblTransferTypeLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblTransferType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblResourceLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(lblResource))
- .add(pnlTransferInfoLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(org.jdesktop.layout.GroupLayout.LEADING,
- pnlTransferInfoLayout
- .createSequentialGroup()
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jScrollPaneSourcePath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 48,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jScrollPaneTargetPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(pnlTransferInfoLayout
- .createSequentialGroup()
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(lblSourcePathLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(lblTargetPathLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(lblLastGoodPathLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .add(32, 32, 32)
- .add(pnlProgress, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 85,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(pnlErrorMessage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- org.jdesktop.layout.GroupLayout pnlTransferDetailsSummaryLayout = new org.jdesktop.layout.GroupLayout(
- pnlTransferDetailsSummary);
- pnlTransferDetailsSummary.setLayout(pnlTransferDetailsSummaryLayout);
- pnlTransferDetailsSummaryLayout.setHorizontalGroup(pnlTransferDetailsSummaryLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTransferDetailsSummaryLayout.createSequentialGroup().add(36, 36, 36)
- .add(pnlTransferInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1034, Short.MAX_VALUE)
- .addContainerGap()));
- pnlTransferDetailsSummaryLayout.setVerticalGroup(pnlTransferDetailsSummaryLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTransferDetailsSummaryLayout
- .createSequentialGroup()
- .addContainerGap()
- .add(pnlTransferInfo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 481,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- tabDetails.addTab("TransferSummary", null, pnlTransferDetailsSummary,
- "Summary information about the selected transfer");
-
- jScrollPaneDetails.setPreferredSize(new java.awt.Dimension(454, 200));
-
- jTableDetails.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { { null, null, null, null },
- { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] {
- "Title 1", "Title 2", "Title 3", "Title 4" }));
- jTableDetails.setAutoCreateRowSorter(true);
- jTableDetails.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
- jScrollPaneDetails.setViewportView(jTableDetails);
-
- btnGroupDetailsDisplay.add(radioShowAll);
- radioShowAll.setText("Show all items");
- radioShowAll.setToolTipText("List all transfer items in detail");
- radioShowAll.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- radioShowAllActionPerformed(evt);
- }
- });
-
- btnGroupDetailsDisplay.add(radioShowError);
- radioShowError.setSelected(true);
- radioShowError.setText("Show error items only");
- radioShowError.setToolTipText("Show only transfer items that were in error");
- radioShowError.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- radioShowErrorActionPerformed(evt);
- }
- });
-
- org.jdesktop.layout.GroupLayout pnlViewRadioLayout = new org.jdesktop.layout.GroupLayout(pnlViewRadio);
- pnlViewRadio.setLayout(pnlViewRadioLayout);
- pnlViewRadioLayout.setHorizontalGroup(pnlViewRadioLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlViewRadioLayout.createSequentialGroup().add(9, 9, 9).add(radioShowAll).add(5, 5, 5)
- .add(radioShowError)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- pnlViewRadioLayout.setVerticalGroup(pnlViewRadioLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlViewRadioLayout
- .createSequentialGroup()
- .add(5, 5, 5)
- .add(pnlViewRadioLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(radioShowAll).add(radioShowError))));
-
- org.jdesktop.layout.GroupLayout pnlTrnasferDetailsTableLayout = new org.jdesktop.layout.GroupLayout(
- pnlTrnasferDetailsTable);
- pnlTrnasferDetailsTable.setLayout(pnlTrnasferDetailsTableLayout);
- pnlTrnasferDetailsTableLayout.setHorizontalGroup(pnlTrnasferDetailsTableLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlTrnasferDetailsTableLayout
- .createSequentialGroup()
- .addContainerGap(401, Short.MAX_VALUE)
- .add(pnlViewRadio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(367, 367, 367))
- .add(pnlTrnasferDetailsTableLayout.createSequentialGroup().add(20, 20, 20)
- .add(jScrollPaneDetails, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1070, Short.MAX_VALUE)));
- pnlTrnasferDetailsTableLayout.setVerticalGroup(pnlTrnasferDetailsTableLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlTrnasferDetailsTableLayout
- .createSequentialGroup()
- .add(22, 22, 22)
- .add(pnlViewRadio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 43,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(18, 18, 18)
- .add(jScrollPaneDetails, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 451,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- tabDetails.addTab("Transfer Details", pnlTrnasferDetailsTable);
-
- splitQueueTableMasterAndDetail.setRightComponent(tabDetails);
-
- org.jdesktop.layout.GroupLayout pnlCenterLayout = new org.jdesktop.layout.GroupLayout(pnlCenter);
- pnlCenter.setLayout(pnlCenterLayout);
- pnlCenterLayout.setHorizontalGroup(pnlCenterLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlCenterLayout
- .createSequentialGroup()
- .addContainerGap()
- .add(splitQueueTableMasterAndDetail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1115,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(33, Short.MAX_VALUE)));
- pnlCenterLayout.setVerticalGroup(pnlCenterLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlCenterLayout
- .createSequentialGroup()
- .addContainerGap()
- .add(splitQueueTableMasterAndDetail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 766,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- jMenu1.setText("File");
- jMenuBar1.add(jMenu1);
-
- jMenu2.setText("Edit");
- jMenuBar1.add(jMenu2);
-
- jMenuView.setText("View");
-
- jMenuCurrent.setMnemonic('C');
- jMenuCurrent.setText("Current");
- jMenuCurrent.setToolTipText("Show the queue of transfers waiting to process");
- jMenuCurrent.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jMenuCurrentActionPerformed(evt);
- }
- });
- jMenuView.add(jMenuCurrent);
-
- jMenuRecent.setMnemonic('R');
- jMenuRecent.setText("Recent");
- jMenuRecent.setToolTipText("Show the last transfers in the queue");
- jMenuRecent.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jMenuRecentActionPerformed(evt);
- }
- });
- jMenuView.add(jMenuRecent);
-
- jMenuError.setMnemonic('E');
- jMenuError.setText("Error");
- jMenuError.setToolTipText("Show transfers that had an error");
- jMenuError.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jMenuErrorActionPerformed(evt);
- }
- });
- jMenuView.add(jMenuError);
-
- jMenuWarning.setMnemonic('W');
- jMenuWarning.setText("Warning");
- jMenuWarning.setToolTipText("Show transfers that had a warning.");
- jMenuWarning.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jMenuWarningActionPerformed(evt);
- }
- });
- jMenuView.add(jMenuWarning);
-
- jMenuBar1.add(jMenuView);
-
- setJMenuBar(jMenuBar1);
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlTop, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(layout
- .createSequentialGroup()
- .add(20, 20, 20)
- .add(pnlCenter, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
- layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(pnlTop, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCenter, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap()));
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void radioShowAllActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radioShowAllActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ btnGroupDetailsDisplay = new javax.swing.ButtonGroup();
+ pnlTop = new javax.swing.JPanel();
+ lblHeader = new javax.swing.JLabel();
+ toolbarQueueManagement = new javax.swing.JToolBar();
+ jSeparator2 = new javax.swing.JToolBar.Separator();
+ btnPurgeAll = new javax.swing.JButton();
+ btnPurgeSuccessful = new javax.swing.JButton();
+ jSeparator1 = new javax.swing.JToolBar.Separator();
+ btnDeleteSelected = new javax.swing.JButton();
+ btnCancelSelected = new javax.swing.JButton();
+ btnRestartSelected = new javax.swing.JButton();
+ btnResubmitSelected = new javax.swing.JButton();
+ jSeparator3 = new javax.swing.JToolBar.Separator();
+ btnRefreshView = new javax.swing.JButton();
+ toggleAutoRefresh = new javax.swing.JToggleButton();
+ pnlCenter = new javax.swing.JPanel();
+ splitQueueTableMasterAndDetail = new javax.swing.JSplitPane();
+ jScrollPaneMaster = new javax.swing.JScrollPane();
+ jTableMaster = new javax.swing.JTable();
+ tabDetails = new javax.swing.JTabbedPane();
+ pnlTransferDetailsSummary = new javax.swing.JPanel();
+ pnlTransferInfo = new javax.swing.JPanel();
+ lblTransferStatusLabel = new javax.swing.JLabel();
+ lblTransferStatus = new javax.swing.JLabel();
+ lblErrorStatusLabel = new javax.swing.JLabel();
+ lblErrorStatus = new javax.swing.JLabel();
+ lblTransferDateLabel = new javax.swing.JLabel();
+ lblSourcePathLabel = new javax.swing.JLabel();
+ lblTargetPathLabel = new javax.swing.JLabel();
+ lblLastGoodPathLabel = new javax.swing.JLabel();
+ jScrollPaneSourcePath = new javax.swing.JScrollPane();
+ txtSourcePath = new javax.swing.JTextArea();
+ jScrollPaneTargetPath = new javax.swing.JScrollPane();
+ txtTargetPath = new javax.swing.JTextArea();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ txtLastGoodPath = new javax.swing.JTextArea();
+ lblTransferTypeLabel = new javax.swing.JLabel();
+ lblTransferType = new javax.swing.JLabel();
+ lblTransferDate = new javax.swing.JLabel();
+ pnlErrorMessage = new javax.swing.JPanel();
+ scrollErrorMessage = new javax.swing.JScrollPane();
+ txtAreaErrorMessage = new javax.swing.JTextArea();
+ jLabel1 = new javax.swing.JLabel();
+ pnlProgress = new javax.swing.JPanel();
+ lblTransferred = new javax.swing.JLabel();
+ lblCountSoFar = new javax.swing.JLabel();
+ lblTransferredOutOf = new javax.swing.JLabel();
+ lblCountOutOf = new javax.swing.JLabel();
+ progressBarQueueDetails = new javax.swing.JProgressBar();
+ lblResourceLabel = new javax.swing.JLabel();
+ lblResource = new javax.swing.JLabel();
+ pnlTrnasferDetailsTable = new javax.swing.JPanel();
+ jScrollPaneDetails = new javax.swing.JScrollPane();
+ jTableDetails = new javax.swing.JTable();
+ pnlViewRadio = new javax.swing.JPanel();
+ radioShowAll = new javax.swing.JRadioButton();
+ radioShowError = new javax.swing.JRadioButton();
+ jMenuBar1 = new javax.swing.JMenuBar();
+ jMenu1 = new javax.swing.JMenu();
+ jMenu2 = new javax.swing.JMenu();
+ jMenuView = new javax.swing.JMenu();
+ jMenuCurrent = new javax.swing.JMenuItem();
+ jMenuRecent = new javax.swing.JMenuItem();
+ jMenuError = new javax.swing.JMenuItem();
+ jMenuWarning = new javax.swing.JMenuItem();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDrop Transfer Client");
+ setBounds(new java.awt.Rectangle(0, 22, 900, 1000));
+ setMinimumSize(new java.awt.Dimension(900, 800));
+ setResizable(false);
+
+ lblHeader.setText("Most Recent iDrop Transfers");
+
+ toolbarQueueManagement.setRollover(true);
+ toolbarQueueManagement.add(jSeparator2);
+
+ btnPurgeAll.setText("Purge All");
+ btnPurgeAll.setToolTipText("Purge all complete and enqueued transfers");
+ btnPurgeAll.setFocusable(false);
+ btnPurgeAll
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnPurgeAll.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnPurgeAll.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnPurgeAllActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnPurgeAll);
+
+ btnPurgeSuccessful.setText("Purge Successful");
+ btnPurgeSuccessful
+ .setToolTipText("Purge all completed, successful transfers");
+ btnPurgeSuccessful.setFocusable(false);
+ btnPurgeSuccessful
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnPurgeSuccessful
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnPurgeSuccessful
+ .addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnPurgeSuccessfulActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnPurgeSuccessful);
+ toolbarQueueManagement.add(jSeparator1);
+
+ btnDeleteSelected.setText("Delete Selected");
+ btnDeleteSelected.setToolTipText("Delete the selected transfer");
+ btnDeleteSelected.setFocusable(false);
+ btnDeleteSelected
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnDeleteSelected
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnDeleteSelected
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnDeleteSelectedActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnDeleteSelected);
+
+ btnCancelSelected.setText("Cancel Selected");
+ btnCancelSelected.setToolTipText("Cancel the selected transfer");
+ btnCancelSelected.setFocusable(false);
+ btnCancelSelected
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnCancelSelected
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnCancelSelected
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnCancelSelectedActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnCancelSelected);
+
+ btnRestartSelected.setText("Restart selected transfer");
+ btnRestartSelected
+ .setToolTipText("Restart the selected transfer from the current checkpoint");
+ btnRestartSelected.setFocusable(false);
+ btnRestartSelected
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnRestartSelected
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnRestartSelected
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnRestartSelectedActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnRestartSelected);
+
+ btnResubmitSelected.setText("Resubmit Selected");
+ btnResubmitSelected
+ .setToolTipText("Resubmit the selected transfer with no restart");
+ btnResubmitSelected.setFocusable(false);
+ btnResubmitSelected
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnResubmitSelected
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnResubmitSelected
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnResubmitSelectedActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnResubmitSelected);
+ toolbarQueueManagement.add(jSeparator3);
+
+ btnRefreshView.setText("Refresh View");
+ btnRefreshView.setFocusable(false);
+ btnRefreshView
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnRefreshView
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnRefreshView.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnRefreshViewActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(btnRefreshView);
+
+ toggleAutoRefresh.setText("Auto Refresh View");
+ toggleAutoRefresh.setFocusable(false);
+ toggleAutoRefresh
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ toggleAutoRefresh
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ toggleAutoRefresh
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ toggleAutoRefreshActionPerformed(evt);
+ }
+ });
+ toolbarQueueManagement.add(toggleAutoRefresh);
+
+ org.jdesktop.layout.GroupLayout pnlTopLayout = new org.jdesktop.layout.GroupLayout(
+ pnlTop);
+ pnlTop.setLayout(pnlTopLayout);
+ pnlTopLayout.setHorizontalGroup(pnlTopLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblHeader, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 1115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(toolbarQueueManagement,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1115,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
+ pnlTopLayout
+ .setVerticalGroup(pnlTopLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTopLayout
+ .createSequentialGroup()
+ .add(lblHeader)
+ .add(toolbarQueueManagement,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+
+ pnlCenter.setMinimumSize(new java.awt.Dimension(800, 200));
+
+ splitQueueTableMasterAndDetail.setDividerLocation(200);
+ splitQueueTableMasterAndDetail
+ .setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
+ splitQueueTableMasterAndDetail.setName("splitQueueMasterAndDetail"); // NOI18N
+ splitQueueTableMasterAndDetail.setOneTouchExpandable(true);
+
+ jScrollPaneMaster.setPreferredSize(new java.awt.Dimension(454, 300));
+ jScrollPaneMaster.setRequestFocusEnabled(false);
+
+ jTableMaster.setModel(new javax.swing.table.DefaultTableModel(
+ new Object[][] { { null, null, null, null },
+ { null, null, null, null }, { null, null, null, null },
+ { null, null, null, null } }, new String[] { "Title 1",
+ "Title 2", "Title 3", "Title 4" }));
+ jTableMaster.setAutoCreateRowSorter(true);
+ jTableMaster
+ .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+ jScrollPaneMaster.setViewportView(jTableMaster);
+
+ splitQueueTableMasterAndDetail.setLeftComponent(jScrollPaneMaster);
+
+ pnlTransferDetailsSummary.setMinimumSize(new java.awt.Dimension(800,
+ 400));
+ pnlTransferDetailsSummary
+ .setPreferredSize(new java.awt.Dimension(0, 0));
+
+ pnlTransferInfo.setMinimumSize(new java.awt.Dimension(800, 600));
+ pnlTransferInfo.setPreferredSize(new java.awt.Dimension(904, 285));
+
+ lblTransferStatusLabel.setText("Transfer Status:");
+
+ lblTransferStatus.setText("jLabel1");
+
+ lblErrorStatusLabel.setText("Error Status:");
+
+ lblErrorStatus.setText("jLabel1");
+
+ lblTransferDateLabel.setText("Transfer Date:");
+
+ lblSourcePathLabel
+ .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+ lblSourcePathLabel.setText("Source Path:");
+ lblSourcePathLabel
+ .setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+
+ lblTargetPathLabel
+ .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+ lblTargetPathLabel.setText("Destination Path:");
+
+ lblLastGoodPathLabel
+ .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+ lblLastGoodPathLabel.setText("Last successful transfer:");
+
+ jScrollPaneSourcePath.setMinimumSize(new java.awt.Dimension(100, 20));
+
+ txtSourcePath.setColumns(60);
+ txtSourcePath.setEditable(false);
+ txtSourcePath.setLineWrap(true);
+ txtSourcePath.setRows(2);
+ txtSourcePath.setMinimumSize(new java.awt.Dimension(100, 20));
+ txtSourcePath.setSize(new java.awt.Dimension(100, 20));
+ jScrollPaneSourcePath.setViewportView(txtSourcePath);
+
+ jScrollPaneTargetPath.setMinimumSize(new java.awt.Dimension(100, 20));
+
+ txtTargetPath.setColumns(60);
+ txtTargetPath.setEditable(false);
+ txtTargetPath.setLineWrap(true);
+ txtTargetPath.setRows(2);
+ txtTargetPath.setWrapStyleWord(true);
+ txtTargetPath.setSize(new java.awt.Dimension(100, 20));
+ jScrollPaneTargetPath.setViewportView(txtTargetPath);
+
+ txtLastGoodPath.setColumns(40);
+ txtLastGoodPath.setEditable(false);
+ txtLastGoodPath.setRows(2);
+ jScrollPane1.setViewportView(txtLastGoodPath);
+
+ lblTransferTypeLabel.setText("Transfer Type:");
+
+ lblTransferType.setText("type");
+
+ lblTransferDate.setText("jLabel1");
+
+ scrollErrorMessage.setMinimumSize(new java.awt.Dimension(400, 40));
+
+ txtAreaErrorMessage.setColumns(60);
+ txtAreaErrorMessage.setEditable(false);
+ txtAreaErrorMessage.setRows(2);
+ scrollErrorMessage.setViewportView(txtAreaErrorMessage);
+
+ jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+ jLabel1.setText("Error messages:");
+
+ org.jdesktop.layout.GroupLayout pnlErrorMessageLayout = new org.jdesktop.layout.GroupLayout(
+ pnlErrorMessage);
+ pnlErrorMessage.setLayout(pnlErrorMessageLayout);
+ pnlErrorMessageLayout.setHorizontalGroup(pnlErrorMessageLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlErrorMessageLayout
+ .createSequentialGroup()
+ .add(69, 69, 69)
+ .add(jLabel1)
+ .add(42, 42, 42)
+ .add(scrollErrorMessage,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 667,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(126, Short.MAX_VALUE)));
+ pnlErrorMessageLayout
+ .setVerticalGroup(pnlErrorMessageLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlErrorMessageLayout
+ .createSequentialGroup()
+ .addContainerGap(24, Short.MAX_VALUE)
+ .add(pnlErrorMessageLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlErrorMessageLayout
+ .createSequentialGroup()
+ .add(scrollErrorMessage,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 72,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap())
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlErrorMessageLayout
+ .createSequentialGroup()
+ .add(jLabel1)
+ .add(29, 29, 29)))));
+
+ pnlProgress.setBackground(javax.swing.UIManager.getDefaults().getColor(
+ "TabbedPane.shadow"));
+
+ lblTransferred.setText("Transferred ");
+
+ lblCountSoFar.setText("0");
+
+ lblTransferredOutOf.setText("out of ");
+
+ lblCountOutOf.setText("0");
+
+ org.jdesktop.layout.GroupLayout pnlProgressLayout = new org.jdesktop.layout.GroupLayout(
+ pnlProgress);
+ pnlProgress.setLayout(pnlProgressLayout);
+ pnlProgressLayout.setHorizontalGroup(pnlProgressLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlProgressLayout
+ .createSequentialGroup()
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)
+ .add(lblTransferred)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(lblCountSoFar,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 96,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(27, 27, 27)
+ .add(lblTransferredOutOf)
+ .add(18, 18, 18)
+ .add(lblCountOutOf,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 96,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(648, 648, 648))
+ .add(pnlProgressLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(progressBarQueueDetails,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 901,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap()));
+ pnlProgressLayout
+ .setVerticalGroup(pnlProgressLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlProgressLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(pnlProgressLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(lblTransferred)
+ .add(lblTransferredOutOf)
+ .add(lblCountOutOf).add(lblCountSoFar))
+ .add(18, 18, 18)
+ .add(progressBarQueueDetails,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ lblResourceLabel.setText("Resource:");
+
+ lblResource.setText("jLabel1");
+
+ org.jdesktop.layout.GroupLayout pnlTransferInfoLayout = new org.jdesktop.layout.GroupLayout(
+ pnlTransferInfo);
+ pnlTransferInfo.setLayout(pnlTransferInfoLayout);
+ pnlTransferInfoLayout
+ .setHorizontalGroup(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING,
+ false)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(88,
+ 88,
+ 88)
+ .add(lblTransferStatusLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 112,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(lblTransferStatus,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 177,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(88,
+ 88,
+ 88)
+ .add(lblErrorStatusLabel))
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(99, 99, 99)
+ .add(lblTransferTypeLabel)
+ .add(18, 18, 18)
+ .add(lblTransferType,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 119,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)
+ .add(lblResourceLabel)))
+ .add(18, 18, 18)
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(lblErrorStatus,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 181,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(31, 31, 31)
+ .add(lblTransferDateLabel)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(lblTransferDate,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 163,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(lblResource,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 181,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(58, 58, 58)
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(lblLastGoodPathLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 164,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblTargetPathLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 142,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblSourcePathLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 99,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING,
+ false)
+ .add(jScrollPane1)
+ .add(jScrollPaneTargetPath,
+ 0, 0,
+ Short.MAX_VALUE)
+ .add(jScrollPaneSourcePath,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 669,
+ Short.MAX_VALUE))))
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlTransferInfoLayout
+ .createSequentialGroup()
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)
+ .add(pnlErrorMessage,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(112, 112, 112))
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .add(9, 9, 9)
+ .add(pnlProgress,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 1016,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ pnlTransferInfoLayout
+ .setVerticalGroup(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(lblTransferStatusLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblTransferStatus,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblErrorStatusLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblErrorStatus)
+ .add(lblTransferDateLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblTransferDate,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 26,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(lblTransferTypeLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblTransferType,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblResourceLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 21,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblResource))
+ .add(pnlTransferInfoLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(org.jdesktop.layout.GroupLayout.LEADING,
+ pnlTransferInfoLayout
+ .createSequentialGroup()
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPaneSourcePath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 48,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPaneTargetPath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 46,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPane1,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 46,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(pnlTransferInfoLayout
+ .createSequentialGroup()
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(lblSourcePathLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 42,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(lblTargetPathLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 40,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(lblLastGoodPathLabel,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 35,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .add(32, 32, 32)
+ .add(pnlProgress,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 85,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(pnlErrorMessage,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ org.jdesktop.layout.GroupLayout pnlTransferDetailsSummaryLayout = new org.jdesktop.layout.GroupLayout(
+ pnlTransferDetailsSummary);
+ pnlTransferDetailsSummary.setLayout(pnlTransferDetailsSummaryLayout);
+ pnlTransferDetailsSummaryLayout
+ .setHorizontalGroup(pnlTransferDetailsSummaryLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTransferDetailsSummaryLayout
+ .createSequentialGroup()
+ .add(36, 36, 36)
+ .add(pnlTransferInfo,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 1034, Short.MAX_VALUE)
+ .addContainerGap()));
+ pnlTransferDetailsSummaryLayout
+ .setVerticalGroup(pnlTransferDetailsSummaryLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTransferDetailsSummaryLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(pnlTransferInfo,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 481,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ tabDetails.addTab("TransferSummary", null, pnlTransferDetailsSummary,
+ "Summary information about the selected transfer");
+
+ jScrollPaneDetails.setPreferredSize(new java.awt.Dimension(454, 200));
+
+ jTableDetails.setModel(new javax.swing.table.DefaultTableModel(
+ new Object[][] { { null, null, null, null },
+ { null, null, null, null }, { null, null, null, null },
+ { null, null, null, null } }, new String[] { "Title 1",
+ "Title 2", "Title 3", "Title 4" }));
+ jTableDetails.setAutoCreateRowSorter(true);
+ jTableDetails
+ .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+ jScrollPaneDetails.setViewportView(jTableDetails);
+
+ btnGroupDetailsDisplay.add(radioShowAll);
+ radioShowAll.setText("Show all items");
+ radioShowAll.setToolTipText("List all transfer items in detail");
+ radioShowAll.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ radioShowAllActionPerformed(evt);
+ }
+ });
+
+ btnGroupDetailsDisplay.add(radioShowError);
+ radioShowError.setSelected(true);
+ radioShowError.setText("Show error items only");
+ radioShowError
+ .setToolTipText("Show only transfer items that were in error");
+ radioShowError.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ radioShowErrorActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout pnlViewRadioLayout = new org.jdesktop.layout.GroupLayout(
+ pnlViewRadio);
+ pnlViewRadio.setLayout(pnlViewRadioLayout);
+ pnlViewRadioLayout.setHorizontalGroup(pnlViewRadioLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlViewRadioLayout
+ .createSequentialGroup()
+ .add(9, 9, 9)
+ .add(radioShowAll)
+ .add(5, 5, 5)
+ .add(radioShowError)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ pnlViewRadioLayout
+ .setVerticalGroup(pnlViewRadioLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlViewRadioLayout
+ .createSequentialGroup()
+ .add(5, 5, 5)
+ .add(pnlViewRadioLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(radioShowAll).add(radioShowError))));
+
+ org.jdesktop.layout.GroupLayout pnlTrnasferDetailsTableLayout = new org.jdesktop.layout.GroupLayout(
+ pnlTrnasferDetailsTable);
+ pnlTrnasferDetailsTable.setLayout(pnlTrnasferDetailsTableLayout);
+ pnlTrnasferDetailsTableLayout
+ .setHorizontalGroup(pnlTrnasferDetailsTableLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlTrnasferDetailsTableLayout
+ .createSequentialGroup()
+ .addContainerGap(401, Short.MAX_VALUE)
+ .add(pnlViewRadio,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(367, 367, 367))
+ .add(pnlTrnasferDetailsTableLayout
+ .createSequentialGroup()
+ .add(20, 20, 20)
+ .add(jScrollPaneDetails,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 1070, Short.MAX_VALUE)));
+ pnlTrnasferDetailsTableLayout
+ .setVerticalGroup(pnlTrnasferDetailsTableLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTrnasferDetailsTableLayout
+ .createSequentialGroup()
+ .add(22, 22, 22)
+ .add(pnlViewRadio,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 43,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(18, 18, 18)
+ .add(jScrollPaneDetails,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 451,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ tabDetails.addTab("Transfer Details", pnlTrnasferDetailsTable);
+
+ splitQueueTableMasterAndDetail.setRightComponent(tabDetails);
+
+ org.jdesktop.layout.GroupLayout pnlCenterLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCenter);
+ pnlCenter.setLayout(pnlCenterLayout);
+ pnlCenterLayout.setHorizontalGroup(pnlCenterLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlCenterLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(splitQueueTableMasterAndDetail,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 1115,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(33, Short.MAX_VALUE)));
+ pnlCenterLayout.setVerticalGroup(pnlCenterLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlCenterLayout
+ .createSequentialGroup()
+ .addContainerGap()
+ .add(splitQueueTableMasterAndDetail,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 766,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ jMenu1.setText("File");
+ jMenuBar1.add(jMenu1);
+
+ jMenu2.setText("Edit");
+ jMenuBar1.add(jMenu2);
+
+ jMenuView.setText("View");
+
+ jMenuCurrent.setMnemonic('C');
+ jMenuCurrent.setText("Current");
+ jMenuCurrent
+ .setToolTipText("Show the queue of transfers waiting to process");
+ jMenuCurrent.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ jMenuCurrentActionPerformed(evt);
+ }
+ });
+ jMenuView.add(jMenuCurrent);
+
+ jMenuRecent.setMnemonic('R');
+ jMenuRecent.setText("Recent");
+ jMenuRecent.setToolTipText("Show the last transfers in the queue");
+ jMenuRecent.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ jMenuRecentActionPerformed(evt);
+ }
+ });
+ jMenuView.add(jMenuRecent);
+
+ jMenuError.setMnemonic('E');
+ jMenuError.setText("Error");
+ jMenuError.setToolTipText("Show transfers that had an error");
+ jMenuError.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ jMenuErrorActionPerformed(evt);
+ }
+ });
+ jMenuView.add(jMenuError);
+
+ jMenuWarning.setMnemonic('W');
+ jMenuWarning.setText("Warning");
+ jMenuWarning.setToolTipText("Show transfers that had a warning.");
+ jMenuWarning.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ jMenuWarningActionPerformed(evt);
+ }
+ });
+ jMenuView.add(jMenuWarning);
+
+ jMenuBar1.add(jMenuView);
+
+ setJMenuBar(jMenuBar1);
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
+ getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlTop, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(layout
+ .createSequentialGroup()
+ .add(20, 20, 20)
+ .add(pnlCenter,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+ layout.setVerticalGroup(layout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ layout.createSequentialGroup()
+ .add(pnlTop,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCenter,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap()));
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void radioShowAllActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radioShowAllActionPerformed
if (radioShowAll.isSelected()) {
adjustDetails();
}
}// GEN-LAST:event_radioShowAllActionPerformed
- private void radioShowErrorActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radioShowErrorActionPerformed
+ private void radioShowErrorActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radioShowErrorActionPerformed
if (radioShowError.isSelected()) {
adjustDetails();
}
}// GEN-LAST:event_radioShowErrorActionPerformed
- private void jMenuCurrentActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuCurrentActionPerformed
+ private void jMenuCurrentActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuCurrentActionPerformed
refreshTableView(QueueManagerDialog.ViewType.CURRENT);
}// GEN-LAST:event_jMenuCurrentActionPerformed
- private void jMenuRecentActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuRecentActionPerformed
+ private void jMenuRecentActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuRecentActionPerformed
refreshTableView(QueueManagerDialog.ViewType.RECENT);
}// GEN-LAST:event_jMenuRecentActionPerformed
- private void jMenuErrorActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuErrorActionPerformed
+ private void jMenuErrorActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuErrorActionPerformed
refreshTableView(QueueManagerDialog.ViewType.ERROR);
}// GEN-LAST:event_jMenuErrorActionPerformed
- private void jMenuWarningActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuWarningActionPerformed
+ private void jMenuWarningActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuWarningActionPerformed
refreshTableView(QueueManagerDialog.ViewType.WARNING);
}// GEN-LAST:event_jMenuWarningActionPerformed
- private void btnPurgeAllActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnPurgeAllActionPerformed
+ private void btnPurgeAllActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnPurgeAllActionPerformed
try {
iDropParent.getiDropCore().getTransferManager().purgeAllTransfers();
refreshTableView(viewType);
resetDisplayFieldsAndStatus();
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
iDropParent.showIdropException(ex);
}
}// GEN-LAST:event_btnPurgeAllActionPerformed
- private void btnPurgeSuccessfulActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnPurgeSuccessfulActionPerformed
+ private void btnPurgeSuccessfulActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnPurgeSuccessfulActionPerformed
try {
iDropParent.getiDropCore().getTransferManager().purgeSuccessfulTransfers();
refreshTableView(viewType);
resetDisplayFieldsAndStatus();
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
iDropParent.showIdropException(ex);
}
}// GEN-LAST:event_btnPurgeSuccessfulActionPerformed
- private void btnDeleteSelectedActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnDeleteSelectedActionPerformed
+ private void btnDeleteSelectedActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnDeleteSelectedActionPerformed
// TODO add your handling code here:
if (jTableMaster.getSelectedRow() > -1) {
log.info("no row selected");
@@ -889,7 +1124,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}// GEN-LAST:event_btnDeleteSelectedActionPerformed
- private void btnRestartSelectedActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRestartSelectedActionPerformed
+ private void btnRestartSelectedActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRestartSelectedActionPerformed
if (jTableMaster.getSelectedRow() == -1) {
log.info("restart, no transfer selected");
@@ -906,7 +1142,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
try {
transferManager.restartTransfer(selectedTransfer);
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
iDropParent.showIdropException(ex);
}
@@ -915,7 +1152,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}// GEN-LAST:event_btnRestartSelectedActionPerformed
- private void btnResubmitSelectedActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnResubmitSelectedActionPerformed
+ private void btnResubmitSelectedActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnResubmitSelectedActionPerformed
if (jTableMaster.getSelectedRow() == -1) {
log.info("resubmit, no transfer selected");
@@ -932,7 +1170,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
try {
transferManager.resubmitTransfer(selectedTransfer);
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
iDropParent.showIdropException(ex);
}
@@ -942,7 +1181,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}// GEN-LAST:event_btnResubmitSelectedActionPerformed
- private void btnCancelSelectedActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelSelectedActionPerformed
+ private void btnCancelSelectedActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelSelectedActionPerformed
if (jTableMaster.getSelectedRow() == -1) {
log.info("cancel, no transfer selected");
@@ -960,7 +1200,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
transferManager.cancelTransfer(selectedTransfer);
refreshTableView(this.getViewType());
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
iDropParent.showIdropException(ex);
}
@@ -970,11 +1211,13 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}// GEN-LAST:event_btnCancelSelectedActionPerformed
- private void btnRefreshViewActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshViewActionPerformed
+ private void btnRefreshViewActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshViewActionPerformed
refreshTableView(this.getViewType());
}// GEN-LAST:event_btnRefreshViewActionPerformed
- private void toggleAutoRefreshActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleAutoRefreshActionPerformed
+ private void toggleAutoRefreshActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleAutoRefreshActionPerformed
if (toggleAutoRefresh.isSelected()) {
// launch auto refresh thread
@@ -983,9 +1226,11 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
refreshQueueTimer = new Timer();
try {
refreshQueueManagerTimerTask = RefreshQueueManagerTimerTask.instance(this);
- refreshQueueTimer.scheduleAtFixedRate(refreshQueueManagerTimerTask, 0, 10000);
+ refreshQueueTimer.scheduleAtFixedRate(
+ refreshQueueManagerTimerTask, 0, 10000);
} catch (IdropException ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null,
+ ex);
iDropParent.showIdropException(ex);
return;
}
@@ -1001,9 +1246,10 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}// GEN-LAST:event_toggleAutoRefreshActionPerformed
/**
- * Refresh the data in the queue table from the database. This method will automatically maintain the view on
- * whatever the currently selected transfer is. If that transfer is not in the view, it will select the first
- * transfer depicted.
+ * Refresh the data in the queue table from the database. This method will
+ * automatically maintain the view on whatever the currently selected
+ * transfer is. If that transfer is not in the view, it will select the
+ * first transfer depicted.
*
* @param viewType
*/
@@ -1042,7 +1288,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
if (viewType == ViewType.CURRENT) {
try {
transferQueue = transferManager.getCurrentQueue();
- queueManagerDialog.getLblHeader().setText("Current transfer queue");
+ queueManagerDialog.getLblHeader().setText(
+ "Current transfer queue");
} catch (Exception ex) {
Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
@@ -1051,7 +1298,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
} else if (viewType == ViewType.RECENT) {
try {
transferQueue = transferManager.getRecentQueue();
- queueManagerDialog.getLblHeader().setText("Recent transfer activity");
+ queueManagerDialog.getLblHeader().setText(
+ "Recent transfer activity");
} catch (Exception ex) {
Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
@@ -1060,7 +1308,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
} else if (viewType == ViewType.ERROR) {
try {
transferQueue = transferManager.getErrorQueue();
- queueManagerDialog.getLblHeader().setText("Transfer activities with errors");
+ queueManagerDialog.getLblHeader().setText(
+ "Transfer activities with errors");
} catch (Exception ex) {
Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
@@ -1069,7 +1318,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
} else if (viewType == ViewType.WARNING) {
try {
transferQueue = transferManager.getWarningQueue();
- queueManagerDialog.getLblHeader().setText("Transfer activities with warnings");
+ queueManagerDialog.getLblHeader().setText(
+ "Transfer activities with warnings");
} catch (Exception ex) {
Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
@@ -1080,11 +1330,13 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
queueManagerDialog.setViewType(viewType);
if (transferQueue != null) {
- jTableMaster.setModel(new QueueManagerMasterTableModel(transferQueue));
+ jTableMaster.setModel(new QueueManagerMasterTableModel(
+ transferQueue));
int matchingRowForSelected = -1;
if (selectedMasterTableObject != null) {
- // previously selected table, refresh display, first, selecting same row
+ // previously selected table, refresh display, first,
+ // selecting same row
LocalIRODSTransfer transfer;
for (int i = 0; i < jTableMaster.getModel().getRowCount(); i++) {
@@ -1099,7 +1351,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
if (matchingRowForSelected != -1) {
int selectedRowIndex = jTableMaster.convertRowIndexToView(matchingRowForSelected);
if (selectedRowIndex != -1) {
- jTableMaster.setRowSelectionInterval(selectedRowIndex, selectedRowIndex);
+ jTableMaster.setRowSelectionInterval(
+ selectedRowIndex, selectedRowIndex);
}
}
@@ -1115,156 +1368,155 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
});
}
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnCancelSelected;
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancelSelected;
-
- private javax.swing.JButton btnDeleteSelected;
-
- private javax.swing.ButtonGroup btnGroupDetailsDisplay;
+ private javax.swing.JButton btnDeleteSelected;
- private javax.swing.JButton btnPurgeAll;
+ private javax.swing.ButtonGroup btnGroupDetailsDisplay;
- private javax.swing.JButton btnPurgeSuccessful;
+ private javax.swing.JButton btnPurgeAll;
- private javax.swing.JButton btnRefreshView;
+ private javax.swing.JButton btnPurgeSuccessful;
- private javax.swing.JButton btnRestartSelected;
+ private javax.swing.JButton btnRefreshView;
- private javax.swing.JButton btnResubmitSelected;
+ private javax.swing.JButton btnRestartSelected;
- private javax.swing.JLabel jLabel1;
+ private javax.swing.JButton btnResubmitSelected;
- private javax.swing.JMenu jMenu1;
+ private javax.swing.JLabel jLabel1;
- private javax.swing.JMenu jMenu2;
+ private javax.swing.JMenu jMenu1;
- private javax.swing.JMenuBar jMenuBar1;
+ private javax.swing.JMenu jMenu2;
- private javax.swing.JMenuItem jMenuCurrent;
+ private javax.swing.JMenuBar jMenuBar1;
- private javax.swing.JMenuItem jMenuError;
+ private javax.swing.JMenuItem jMenuCurrent;
- private javax.swing.JMenuItem jMenuRecent;
+ private javax.swing.JMenuItem jMenuError;
- private javax.swing.JMenu jMenuView;
+ private javax.swing.JMenuItem jMenuRecent;
- private javax.swing.JMenuItem jMenuWarning;
+ private javax.swing.JMenu jMenuView;
- private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JMenuItem jMenuWarning;
- private javax.swing.JScrollPane jScrollPaneDetails;
+ private javax.swing.JScrollPane jScrollPane1;
- private javax.swing.JScrollPane jScrollPaneMaster;
+ private javax.swing.JScrollPane jScrollPaneDetails;
- private javax.swing.JScrollPane jScrollPaneSourcePath;
+ private javax.swing.JScrollPane jScrollPaneMaster;
- private javax.swing.JScrollPane jScrollPaneTargetPath;
+ private javax.swing.JScrollPane jScrollPaneSourcePath;
- private javax.swing.JToolBar.Separator jSeparator1;
+ private javax.swing.JScrollPane jScrollPaneTargetPath;
- private javax.swing.JToolBar.Separator jSeparator2;
+ private javax.swing.JToolBar.Separator jSeparator1;
- private javax.swing.JToolBar.Separator jSeparator3;
+ private javax.swing.JToolBar.Separator jSeparator2;
- private javax.swing.JTable jTableDetails;
+ private javax.swing.JToolBar.Separator jSeparator3;
- private javax.swing.JTable jTableMaster;
+ private javax.swing.JTable jTableDetails;
- private javax.swing.JLabel lblCountOutOf;
+ private javax.swing.JTable jTableMaster;
- private javax.swing.JLabel lblCountSoFar;
+ private javax.swing.JLabel lblCountOutOf;
- private javax.swing.JLabel lblErrorStatus;
+ private javax.swing.JLabel lblCountSoFar;
- private javax.swing.JLabel lblErrorStatusLabel;
+ private javax.swing.JLabel lblErrorStatus;
- private javax.swing.JLabel lblHeader;
+ private javax.swing.JLabel lblErrorStatusLabel;
- private javax.swing.JLabel lblLastGoodPathLabel;
+ private javax.swing.JLabel lblHeader;
- private javax.swing.JLabel lblResource;
+ private javax.swing.JLabel lblLastGoodPathLabel;
- private javax.swing.JLabel lblResourceLabel;
+ private javax.swing.JLabel lblResource;
- private javax.swing.JLabel lblSourcePathLabel;
+ private javax.swing.JLabel lblResourceLabel;
- private javax.swing.JLabel lblTargetPathLabel;
+ private javax.swing.JLabel lblSourcePathLabel;
- private javax.swing.JLabel lblTransferDate;
+ private javax.swing.JLabel lblTargetPathLabel;
- private javax.swing.JLabel lblTransferDateLabel;
+ private javax.swing.JLabel lblTransferDate;
- private javax.swing.JLabel lblTransferStatus;
+ private javax.swing.JLabel lblTransferDateLabel;
- private javax.swing.JLabel lblTransferStatusLabel;
+ private javax.swing.JLabel lblTransferStatus;
- private javax.swing.JLabel lblTransferType;
+ private javax.swing.JLabel lblTransferStatusLabel;
- private javax.swing.JLabel lblTransferTypeLabel;
+ private javax.swing.JLabel lblTransferType;
- private javax.swing.JLabel lblTransferred;
+ private javax.swing.JLabel lblTransferTypeLabel;
- private javax.swing.JLabel lblTransferredOutOf;
+ private javax.swing.JLabel lblTransferred;
- private javax.swing.JPanel pnlCenter;
+ private javax.swing.JLabel lblTransferredOutOf;
- private javax.swing.JPanel pnlErrorMessage;
+ private javax.swing.JPanel pnlCenter;
- private javax.swing.JPanel pnlProgress;
+ private javax.swing.JPanel pnlErrorMessage;
- private javax.swing.JPanel pnlTop;
+ private javax.swing.JPanel pnlProgress;
- private javax.swing.JPanel pnlTransferDetailsSummary;
+ private javax.swing.JPanel pnlTop;
- private javax.swing.JPanel pnlTransferInfo;
+ private javax.swing.JPanel pnlTransferDetailsSummary;
- private javax.swing.JPanel pnlTrnasferDetailsTable;
+ private javax.swing.JPanel pnlTransferInfo;
- private javax.swing.JPanel pnlViewRadio;
+ private javax.swing.JPanel pnlTrnasferDetailsTable;
- private javax.swing.JProgressBar progressBarQueueDetails;
+ private javax.swing.JPanel pnlViewRadio;
- private javax.swing.JRadioButton radioShowAll;
+ private javax.swing.JProgressBar progressBarQueueDetails;
- private javax.swing.JRadioButton radioShowError;
+ private javax.swing.JRadioButton radioShowAll;
- private javax.swing.JScrollPane scrollErrorMessage;
+ private javax.swing.JRadioButton radioShowError;
- private javax.swing.JSplitPane splitQueueTableMasterAndDetail;
+ private javax.swing.JScrollPane scrollErrorMessage;
- private javax.swing.JTabbedPane tabDetails;
+ private javax.swing.JSplitPane splitQueueTableMasterAndDetail;
- private javax.swing.JToggleButton toggleAutoRefresh;
+ private javax.swing.JTabbedPane tabDetails;
- private javax.swing.JToolBar toolbarQueueManagement;
+ private javax.swing.JToggleButton toggleAutoRefresh;
- private javax.swing.JTextArea txtAreaErrorMessage;
+ private javax.swing.JToolBar toolbarQueueManagement;
- private javax.swing.JTextArea txtLastGoodPath;
+ private javax.swing.JTextArea txtAreaErrorMessage;
- private javax.swing.JTextArea txtSourcePath;
+ private javax.swing.JTextArea txtLastGoodPath;
- private javax.swing.JTextArea txtTargetPath;
+ private javax.swing.JTextArea txtSourcePath;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTextArea txtTargetPath;
+ // End of variables declaration//GEN-END:variables
public JLabel getLblHeader() {
return lblHeader;
}
- public void setLblHeader(JLabel lblHeader) {
+ public void setLblHeader(final JLabel lblHeader) {
this.lblHeader = lblHeader;
}
@Override
- public void valueChanged(ListSelectionEvent e) {
+ public void valueChanged(final ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
- if (e.getFirstIndex() == -1 || e.getLastIndex() == -1 || jTableMaster.getSelectedRow() == -1) {
+ if (e.getFirstIndex() == -1 || e.getLastIndex() == -1
+ || jTableMaster.getSelectedRow() == -1) {
return;
}
@@ -1274,8 +1526,7 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}
private void adjustDetails() {
- final LocalIRODSTransfer localIRODSTransfer = ((QueueManagerMasterTableModel) jTableMaster.getModel())
- .getTransferAtRow(jTableMaster.getSelectedRow());
+ final LocalIRODSTransfer localIRODSTransfer = ((QueueManagerMasterTableModel) jTableMaster.getModel()).getTransferAtRow(jTableMaster.getSelectedRow());
log.info("selected transfer:{}", localIRODSTransfer);
final boolean showAll = radioShowAll.isSelected();
@@ -1290,7 +1541,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
lblErrorStatus.setText(localIRODSTransfer.getTransferStatus().toString());
lblResource.setText(localIRODSTransfer.getTransferResource());
- // set source and target properly based on activity (put, get, etc)
+ // set source and target properly based on activity (put, get,
+ // etc)
switch (localIRODSTransfer.getTransferType()) {
case GET:
txtSourcePath.setText(localIRODSTransfer.getIrodsAbsolutePath());
@@ -1309,7 +1561,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
txtTargetPath.setText(localIRODSTransfer.getIrodsAbsolutePath());
break;
default:
- log.error("unable to build details for transfer with transfer type of:{}",
+ log.error(
+ "unable to build details for transfer with transfer type of:{}",
localIRODSTransfer.getTransferType());
iDropParent.showIdropException(new IdropException(
"unable to build details for this transfer type"));
@@ -1317,7 +1570,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
}
txtLastGoodPath.setText(localIRODSTransfer.getLastSuccessfulPath());
- log.debug("total files transferred:{}", localIRODSTransfer.getTotalFilesTransferredSoFar());
+ log.debug("total files transferred:{}",
+ localIRODSTransfer.getTotalFilesTransferredSoFar());
log.debug("out of: {}", localIRODSTransfer.getTotalFilesCount());
lblCountSoFar.setText(String.valueOf(localIRODSTransfer.getTotalFilesTransferredSoFar()));
lblCountOutOf.setText(String.valueOf(localIRODSTransfer.getTotalFilesCount()));
@@ -1332,22 +1586,24 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
pnlErrorMessage.setVisible(false);
}
- // initialize the detail values via hibernate (they are lazily loaded)
+ // initialize the detail values via hibernate (they are lazily
+ // loaded)
log.info("get the details based on the selected option");
try {
if (showAll) {
log.info("showing all transfers based on radio selection");
- jTableDetails.setModel(new QueueManagerDetailTableModel(transferManager
- .getAllTransferItemsForTransfer(localIRODSTransfer.getId())));
+ jTableDetails.setModel(new QueueManagerDetailTableModel(
+ transferManager.getAllTransferItemsForTransfer(localIRODSTransfer.getId())));
} else {
- jTableDetails.setModel(new QueueManagerDetailTableModel(transferManager
- .getErrorTransferItemsForTransfer(localIRODSTransfer.getId())));
+ jTableDetails.setModel(new QueueManagerDetailTableModel(
+ transferManager.getErrorTransferItemsForTransfer(localIRODSTransfer.getId())));
}
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
iDropParent.showIdropException(ex);
return;
}
@@ -1397,7 +1653,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
sb.append(localIRODSTransfer.toString());
// default icon, custom title
- int n = JOptionPane.showConfirmDialog(this, sb.toString(), "Delete Confirmation", JOptionPane.YES_NO_OPTION);
+ int n = JOptionPane.showConfirmDialog(this, sb.toString(),
+ "Delete Confirmation", JOptionPane.YES_NO_OPTION);
return n;
}
@@ -1409,7 +1666,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
sb.append(localIRODSTransfer.toString());
// default icon, custom title
- int n = JOptionPane.showConfirmDialog(this, sb.toString(), "Restart Confirmation", JOptionPane.YES_NO_OPTION);
+ int n = JOptionPane.showConfirmDialog(this, sb.toString(),
+ "Restart Confirmation", JOptionPane.YES_NO_OPTION);
return n;
}
@@ -1418,7 +1676,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
try {
iDropParent.getiDropCore().getTransferManager().resetStatus();
} catch (Exception ex) {
- Logger.getLogger(QueueManagerDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueManagerDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
// log and continue...not useful to user
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueTimerTaskThread.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueTimerTaskThread.java
index 7f07d2f..c4ea8b6 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueTimerTaskThread.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueTimerTaskThread.java
@@ -7,10 +7,10 @@ import org.slf4j.LoggerFactory;
public class QueueTimerTaskThread extends Thread {
private final org.slf4j.Logger logger = LoggerFactory.getLogger(iDrop.class);
-
private iDrop iDrop;
- public QueueTimerTaskThread(iDrop iDrop) {
+
+ public QueueTimerTaskThread(final iDrop iDrop) {
super();
this.iDrop = iDrop;
}
@@ -18,19 +18,21 @@ public class QueueTimerTaskThread extends Thread {
@Override
public void run() {
- /* A timer task monitors the queue, and can be extended to process things like retrys and file synchronization */
+ /*
+ * A timer task monitors the queue, and can be extended to process
+ * things like retrys and file synchronization
+ */
logger.info("creating timer for queue manager");
try {
- QueueSchedulerTimerTask queueTimerTask = new QueueSchedulerTimerTask(iDrop.getiDropCore()
- .getTransferManager(), iDrop);
- iDrop.getiDropCore().getQueueTimer()
- .scheduleAtFixedRate(queueTimerTask, 1000, QueueSchedulerTimerTask.EVERY_10_MINUTES);
+ QueueSchedulerTimerTask queueTimerTask = new QueueSchedulerTimerTask(
+ iDrop.getiDropCore().getTransferManager(), iDrop);
+ iDrop.getiDropCore().getQueueTimer().scheduleAtFixedRate(queueTimerTask, 1000,
+ QueueSchedulerTimerTask.EVERY_10_MINUTES);
} catch (IdropException ex) {
logger.error(ex.getMessage());
System.exit(1);
}
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java
index e4bacb3..89d3207 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java
@@ -1,7 +1,3 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
/*
* NewIRODSDirectoryDialog.java
@@ -21,10 +17,9 @@ import javax.swing.Action;
import javax.swing.JComponent;
import javax.swing.KeyStroke;
import javax.swing.tree.TreePath;
-import org.irods.jargon.core.exception.JargonException;
+
import org.irods.jargon.core.pub.io.IRODSFile;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
-
import org.irods.jargon.idrop.desktop.systraygui.services.IRODSFileService;
import org.irods.jargon.idrop.desktop.systraygui.utils.TreeUtils;
import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSFileSystemModel;
@@ -33,7 +28,6 @@ import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSOutlineModel
import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSTree;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
-import org.openide.util.Exceptions;
import org.slf4j.LoggerFactory;
/**
@@ -42,7 +36,7 @@ import org.slf4j.LoggerFactory;
* @author mikeconway
*/
public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
-
+
private final iDrop idrop;
private final String currentAbsolutePath;
private final IRODSTree stagingViewTree;
@@ -50,8 +44,9 @@ public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
public static org.slf4j.Logger log = LoggerFactory.getLogger(RenameIRODSDirectoryDialog.class);
/** Creates new form NewIRODSDirectoryDialog */
- public RenameIRODSDirectoryDialog(final iDrop parent, final boolean modal, final String currentAbsolutePath,
- final IRODSTree stagingViewTree, final IRODSNode currentNode) {
+ public RenameIRODSDirectoryDialog(final iDrop parent, final boolean modal,
+ final String currentAbsolutePath, final IRODSTree stagingViewTree,
+ final IRODSNode currentNode) {
super(parent, modal);
this.idrop = parent;
this.currentAbsolutePath = currentAbsolutePath;
@@ -60,245 +55,310 @@ public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
initComponents();
int lastPathPartIdx = currentAbsolutePath.lastIndexOf("/");
if (lastPathPartIdx == -1) {
- String msg = "could not find last path component of absolute path:" + currentAbsolutePath;
+ String msg = "could not find last path component of absolute path:"
+ + currentAbsolutePath;
log.error(msg);
idrop.showIdropException(new IdropException(msg));
return;
}
-
+
String parentAbsPath = currentAbsolutePath.substring(0, lastPathPartIdx);
String currentCollectionOrFileName = currentAbsolutePath.substring(lastPathPartIdx + 1);
-
+
log.debug("computed parent abs path as:{}", parentAbsPath);
- log.debug("computed current file or collection name as:{}", currentCollectionOrFileName);
-
+ log.debug("computed current file or collection name as:{}",
+ currentCollectionOrFileName);
+
txtCurrentFolder.setText(currentCollectionOrFileName);
registerKeystrokeListener();
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentParent = new java.awt.Label();
- lblNewDiretoryName = new java.awt.Label();
- txtCurrentFolder = new javax.swing.JTextField();
- txtNewFolder = new javax.swing.JTextField();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Rename iRODS File or Folder");
- setName("NewParentDialog"); // NOI18N
-
- lblTitle.setText("Please enter a new name for the file or collection");
-
- lblCurrentParent.setText("Current name:");
-
- lblNewDiretoryName.setText("New name:");
-
- txtCurrentFolder.setColumns(50);
- txtCurrentFolder.setEditable(false);
- txtCurrentFolder.setToolTipText("A name for the new folder underneath the displayed parent");
- txtCurrentFolder.setFocusable(false);
-
- txtNewFolder.setColumns(50);
- txtNewFolder.setToolTipText("A name for the new folder underneath the displayed parent");
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
-
- org.jdesktop.layout.GroupLayout pnlBottomLayout = new org.jdesktop.layout.GroupLayout(pnlBottom);
- pnlBottom.setLayout(pnlBottomLayout);
- pnlBottomLayout
- .setHorizontalGroup(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlBottomLayout.createSequentialGroup().add(576, 576, 576).add(btnCancel).add(5, 5, 5)
- .add(btnOK)));
- pnlBottomLayout.setVerticalGroup(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlBottomLayout.createSequentialGroup().add(5, 5, 5).add(btnCancel))
- .add(pnlBottomLayout.createSequentialGroup().add(5, 5, 5).add(btnOK)));
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlCurrentParentLayout
- .createSequentialGroup()
- .addContainerGap(30, Short.MAX_VALUE)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
- .add(txtNewFolder, 0, 0, Short.MAX_VALUE)
- .add(txtCurrentFolder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 421,
- Short.MAX_VALUE)).add(213, 213, 213))
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(pnlBottom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 747,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(58, 58, 58)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(txtCurrentFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(txtNewFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22, Short.MAX_VALUE)
- .add(pnlBottom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
-
- lblNewDiretoryName.getAccessibleContext().setAccessibleName("New directory name:");
-
- org.jdesktop.layout.GroupLayout pnlFolderDataLayout = new org.jdesktop.layout.GroupLayout(pnlFolderData);
- pnlFolderData.setLayout(pnlFolderDataLayout);
- pnlFolderDataLayout.setHorizontalGroup(pnlFolderDataLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlFolderDataLayout
- .createSequentialGroup()
- .add(pnlCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 757,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- pnlFolderDataLayout.setVerticalGroup(pnlFolderDataLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlFolderDataLayout
- .createSequentialGroup()
- .add(pnlCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblTitle, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 747,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(pnlFolderData, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(lblTitle)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlFolderData, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
-
- getAccessibleContext().setAccessibleName("Rename file or folder dialog");
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentParent = new java.awt.Label();
+ lblNewDiretoryName = new java.awt.Label();
+ txtCurrentFolder = new javax.swing.JTextField();
+ txtNewFolder = new javax.swing.JTextField();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("Rename iRODS File or Folder");
+ setName("NewParentDialog"); // NOI18N
+
+ lblTitle.setText("Please enter a new name for the file or collection");
+
+ lblCurrentParent.setText("Current name:");
+
+ lblNewDiretoryName.setText("New name:");
+
+ txtCurrentFolder.setColumns(50);
+ txtCurrentFolder.setEditable(false);
+ txtCurrentFolder
+ .setToolTipText("A name for the new folder underneath the displayed parent");
+ txtCurrentFolder.setFocusable(false);
+
+ txtNewFolder.setColumns(50);
+ txtNewFolder
+ .setToolTipText("A name for the new folder underneath the displayed parent");
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout pnlBottomLayout = new org.jdesktop.layout.GroupLayout(
+ pnlBottom);
+ pnlBottom.setLayout(pnlBottomLayout);
+ pnlBottomLayout.setHorizontalGroup(pnlBottomLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlBottomLayout.createSequentialGroup().add(576, 576, 576)
+ .add(btnCancel).add(5, 5, 5).add(btnOK)));
+ pnlBottomLayout.setVerticalGroup(pnlBottomLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlBottomLayout.createSequentialGroup().add(5, 5, 5)
+ .add(btnCancel))
+ .add(pnlBottomLayout.createSequentialGroup().add(5, 5, 5)
+ .add(btnOK)));
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlCurrentParentLayout
+ .createSequentialGroup()
+ .addContainerGap(30, Short.MAX_VALUE)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING,
+ false)
+ .add(txtNewFolder, 0, 0,
+ Short.MAX_VALUE)
+ .add(txtCurrentFolder,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 421, Short.MAX_VALUE))
+ .add(213, 213, 213))
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(pnlBottom,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 747,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(58, 58, 58)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(txtCurrentFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(txtNewFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED,
+ 22, Short.MAX_VALUE)
+ .add(pnlBottom,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+
+ lblNewDiretoryName.getAccessibleContext().setAccessibleName(
+ "New directory name:");
+
+ org.jdesktop.layout.GroupLayout pnlFolderDataLayout = new org.jdesktop.layout.GroupLayout(
+ pnlFolderData);
+ pnlFolderData.setLayout(pnlFolderDataLayout);
+ pnlFolderDataLayout.setHorizontalGroup(pnlFolderDataLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlFolderDataLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 757,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ pnlFolderDataLayout.setVerticalGroup(pnlFolderDataLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlFolderDataLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
+ getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createSequentialGroup()
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblTitle,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 747,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(pnlFolderData,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ layout.setVerticalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createSequentialGroup()
+ .add(lblTitle)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlFolderData,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+
+ getAccessibleContext()
+ .setAccessibleName("Rename file or folder dialog");
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
doRename();
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblCurrentParent;
+ private java.awt.Label lblCurrentParent;
- private java.awt.Label lblNewDiretoryName;
+ private java.awt.Label lblNewDiretoryName;
- private javax.swing.JLabel lblTitle;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JTextField txtCurrentFolder;
+ private javax.swing.JTextField txtCurrentFolder;
- private javax.swing.JTextField txtNewFolder;
+ private javax.swing.JTextField txtNewFolder;
- // End of variables declaration//GEN-END:variables
+ // End of variables declaration//GEN-END:variables
private void doRename() {
- // add the new folder to irods, add to the tree, and scroll the tree into view
+ // add the new folder to irods, add to the tree, and scroll the tree
+ // into view
if (txtNewFolder.getText().isEmpty()) {
txtNewFolder.setBackground(Color.red);
idrop.showMessageFromOperation("please enter a new file or collection name");
return;
}
-
+
final RenameIRODSDirectoryDialog thisDialog = this;
-
+
java.awt.EventQueue.invokeLater(new Runnable() {
-
+
@Override
public void run() {
log.info("renaming a file named:{}", txtCurrentFolder.getText());
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
-
- IRODSFileService irodsFileService = new IRODSFileService(idrop.getIrodsAccount(), idrop.getiDropCore().getIrodsFileSystem());
+
+ IRODSFileService irodsFileService = new IRODSFileService(
+ idrop.getIrodsAccount(), idrop.getiDropCore().getIrodsFileSystem());
String newPath = irodsFileService.renameIRODSFileOrDirectory(currentAbsolutePath,
txtNewFolder.getText());
-
+
log.debug("New path:{}", newPath);
IRODSOutlineModel irodsOutlineModel = (IRODSOutlineModel) stagingViewTree.getModel();
- // get the parent of the new directory, and force a reload of that parent
+ // get the parent of the new directory, and force a reload
+ // of that parent
String[] dirs = newPath.split("/");
if (dirs.length == 0) {
- throw new IdropRuntimeException("unable to find dir components");
+ throw new IdropRuntimeException(
+ "unable to find dir components");
}
-
+
StringBuilder sb = new StringBuilder();
for (int i = 0; i < dirs.length - 1; i++) {
if (i > 0) {
@@ -306,40 +366,46 @@ public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
}
sb.append(dirs[i]);
}
-
+
String parentOfNewDir = sb.toString();
log.info("parent of new dir:{}", parentOfNewDir);
-
- TreePath pathForOld = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree, currentAbsolutePath);
-
- if (pathForOld == null) {
- log.warn("could not find old path for node:{}, ignoring", currentAbsolutePath);
+
+ TreePath pathForOld = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree,
+ currentAbsolutePath);
+
+ if (pathForOld == null) {
+ log.warn(
+ "could not find old path for node:{}, ignoring",
+ currentAbsolutePath);
+ } else {
+ IRODSFileSystemModel irodsFileSystemModel = irodsOutlineModel.getTreeModel();
+ IRODSNode oldNode = (IRODSNode) pathForOld.getLastPathComponent();
+ CollectionAndDataObjectListingEntry nodesEntry = (CollectionAndDataObjectListingEntry) oldNode.getUserObject();
+ IRODSFile newEntryAsFile = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount().instanceIRODSFile(newPath);
+ if (newEntryAsFile.isDirectory()) {
+ nodesEntry.setParentPath(newEntryAsFile.getParent());
+ nodesEntry.setPathOrName(newEntryAsFile.getAbsolutePath());
} else {
- IRODSFileSystemModel irodsFileSystemModel = irodsOutlineModel.getTreeModel();
- IRODSNode oldNode = (IRODSNode) pathForOld.getLastPathComponent();
- CollectionAndDataObjectListingEntry nodesEntry = (CollectionAndDataObjectListingEntry) oldNode.getUserObject();
- IRODSFile newEntryAsFile = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount().instanceIRODSFile(newPath);
- if (newEntryAsFile.isDirectory()) {
- nodesEntry.setParentPath(newEntryAsFile.getParent());
- nodesEntry.setPathOrName(newEntryAsFile.getAbsolutePath());
- } else {
- nodesEntry.setParentPath(newEntryAsFile.getParent());
- nodesEntry.setPathOrName(newEntryAsFile.getName());
- }
-
- oldNode.setUserObject(nodesEntry);
- irodsFileSystemModel.nodeChanged(oldNode);
-
+ nodesEntry.setParentPath(newEntryAsFile.getParent());
+ nodesEntry.setPathOrName(newEntryAsFile.getName());
}
-
- // TreePath pathForNew = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree, parentOfNewDir);
- // log.debug("computed new path:{}", pathForNew);
- /*IRODSNode targetParentNode = (IRODSNode) pathForNew.getParentPath().getLastPathComponent();
- targetParentNode.forceReloadOfChildrenOfThisNode();
- irodsOutlineModel.reload(targetParentNode);
- stagingViewTree.expandPath(pathForNew);
- * */
+ oldNode.setUserObject(nodesEntry);
+ irodsFileSystemModel.nodeChanged(oldNode);
+
+ }
+
+ // TreePath pathForNew =
+ // TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree,
+ // parentOfNewDir);
+ // log.debug("computed new path:{}", pathForNew);
+ /*
+ * IRODSNode targetParentNode = (IRODSNode)
+ * pathForNew.getParentPath().getLastPathComponent();
+ * targetParentNode.forceReloadOfChildrenOfThisNode();
+ * irodsOutlineModel.reload(targetParentNode);
+ * stagingViewTree.expandPath(pathForNew);
+ */
idrop.showMessageFromOperation("The rename was successful");
@@ -349,7 +415,7 @@ public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
} finally {
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
-
+
thisDialog.dispose();
}
});
@@ -359,16 +425,18 @@ public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
* Register a listener for the enter event, so login can occur.
*/
private void registerKeystrokeListener() {
-
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
-
+
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
doRename();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
-
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameLocalDirectoryDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameLocalDirectoryDialog.java
index 89bce61..03f78ef 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameLocalDirectoryDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameLocalDirectoryDialog.java
@@ -2,7 +2,6 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-
package org.irods.jargon.idrop.desktop.systraygui;
import java.awt.Color;
@@ -25,24 +24,22 @@ import org.irods.jargon.idrop.exceptions.IdropException;
import org.slf4j.LoggerFactory;
/**
- * Dialog to gather a new directory name and perform a rename operation on a local file.
+ * Dialog to gather a new directory name and perform a rename operation on a
+ * local file.
*
* @author mikeconway
*/
public class RenameLocalDirectoryDialog extends javax.swing.JDialog {
private final iDrop idrop;
-
private String currentAbsolutePath = "";
-
private final LocalFileTree localFileTree;
-
private final LocalFileNode currentNode;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(RenameLocalDirectoryDialog.class);
/** Creates new form RenameLocalDirectoryDialog */
- public RenameLocalDirectoryDialog(final iDrop parent, final boolean modal, final String currentAbsolutePath,
+ public RenameLocalDirectoryDialog(final iDrop parent, final boolean modal,
+ final String currentAbsolutePath,
final LocalFileTree localFileTree, final LocalFileNode currentNode) {
super(parent, modal);
this.idrop = parent;
@@ -52,7 +49,8 @@ public class RenameLocalDirectoryDialog extends javax.swing.JDialog {
initComponents();
int lastPathPartIdx = currentAbsolutePath.lastIndexOf("/");
if (lastPathPartIdx == -1) {
- String msg = "could not find last path component of absolute path:" + currentAbsolutePath;
+ String msg = "could not find last path component of absolute path:"
+ + currentAbsolutePath;
log.error(msg);
idrop.showIdropException(new IdropException(msg));
return;
@@ -62,210 +60,272 @@ public class RenameLocalDirectoryDialog extends javax.swing.JDialog {
String currentCollectionOrFileName = currentAbsolutePath.substring(lastPathPartIdx + 1);
log.debug("computed parent abs path as:{}", parentAbsPath);
- log.debug("computed current file or collection name as:{}", currentCollectionOrFileName);
+ log.debug("computed current file or collection name as:{}",
+ currentCollectionOrFileName);
txtCurrentFolder.setText(currentCollectionOrFileName);
registerKeystrokeListener();
}
/**
- * 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.
+ * 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() {
-
- lblTitle = new javax.swing.JLabel();
- pnlFolderData = new javax.swing.JPanel();
- pnlCurrentParent = new javax.swing.JPanel();
- lblCurrentParent = new java.awt.Label();
- lblNewDiretoryName = new java.awt.Label();
- txtCurrentFolder = new javax.swing.JTextField();
- txtNewFolder = new javax.swing.JTextField();
- pnlBottom = new javax.swing.JPanel();
- btnCancel = new javax.swing.JButton();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iDrop - Rename local file or directory");
- setName("NewParentDialog"); // NOI18N
-
- lblTitle.setText("Please enter a new name for the file or collection");
-
- lblCurrentParent.setText("Current name:");
-
- lblNewDiretoryName.setText("New name:");
-
- txtCurrentFolder.setColumns(50);
- txtCurrentFolder.setEditable(false);
- txtCurrentFolder.setToolTipText("A name for the new folder underneath the displayed parent");
- txtCurrentFolder.setFocusable(false);
-
- txtNewFolder.setColumns(50);
- txtNewFolder.setToolTipText("A name for the new folder underneath the displayed parent");
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
-
- org.jdesktop.layout.GroupLayout pnlBottomLayout = new org.jdesktop.layout.GroupLayout(pnlBottom);
- pnlBottom.setLayout(pnlBottomLayout);
- pnlBottomLayout
- .setHorizontalGroup(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlBottomLayout.createSequentialGroup().add(576, 576, 576).add(btnCancel).add(5, 5, 5)
- .add(btnOK)));
- pnlBottomLayout.setVerticalGroup(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlBottomLayout
- .createSequentialGroup()
- .add(5, 5, 5)
- .add(pnlBottomLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(btnCancel).add(btnOK))));
-
- org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(pnlCurrentParent);
- pnlCurrentParent.setLayout(pnlCurrentParentLayout);
- pnlCurrentParentLayout.setHorizontalGroup(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- pnlCurrentParentLayout
- .createSequentialGroup()
- .addContainerGap(30, Short.MAX_VALUE)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
- .add(txtNewFolder, 0, 0, Short.MAX_VALUE)
- .add(txtCurrentFolder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 421,
- Short.MAX_VALUE)).add(213, 213, 213))
- .add(pnlCurrentParentLayout
- .createSequentialGroup()
- .add(pnlBottom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 747,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- pnlCurrentParentLayout.setVerticalGroup(pnlCurrentParentLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlCurrentParentLayout
- .createSequentialGroup()
- .add(58, 58, 58)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(txtCurrentFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlCurrentParentLayout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(txtNewFolder, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(lblNewDiretoryName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22, Short.MAX_VALUE)
- .add(pnlBottom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
-
- lblNewDiretoryName.getAccessibleContext().setAccessibleName("New directory name:");
-
- org.jdesktop.layout.GroupLayout pnlFolderDataLayout = new org.jdesktop.layout.GroupLayout(pnlFolderData);
- pnlFolderData.setLayout(pnlFolderDataLayout);
- pnlFolderDataLayout.setHorizontalGroup(pnlFolderDataLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlFolderDataLayout
- .createSequentialGroup()
- .add(pnlCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 757,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- pnlFolderDataLayout.setVerticalGroup(pnlFolderDataLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- pnlFolderDataLayout
- .createSequentialGroup()
- .add(pnlCurrentParent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(lblTitle, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 747,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(pnlFolderData, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
- layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(lblTitle)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(pnlFolderData, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
-
- getAccessibleContext().setAccessibleName("Rename file or folder dialog");
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblTitle = new javax.swing.JLabel();
+ pnlFolderData = new javax.swing.JPanel();
+ pnlCurrentParent = new javax.swing.JPanel();
+ lblCurrentParent = new java.awt.Label();
+ lblNewDiretoryName = new java.awt.Label();
+ txtCurrentFolder = new javax.swing.JTextField();
+ txtNewFolder = new javax.swing.JTextField();
+ pnlBottom = new javax.swing.JPanel();
+ btnCancel = new javax.swing.JButton();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDrop - Rename local file or directory");
+ setName("NewParentDialog"); // NOI18N
+
+ lblTitle.setText("Please enter a new name for the file or collection");
+
+ lblCurrentParent.setText("Current name:");
+
+ lblNewDiretoryName.setText("New name:");
+
+ txtCurrentFolder.setColumns(50);
+ txtCurrentFolder.setEditable(false);
+ txtCurrentFolder
+ .setToolTipText("A name for the new folder underneath the displayed parent");
+ txtCurrentFolder.setFocusable(false);
+
+ txtNewFolder.setColumns(50);
+ txtNewFolder
+ .setToolTipText("A name for the new folder underneath the displayed parent");
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout pnlBottomLayout = new org.jdesktop.layout.GroupLayout(
+ pnlBottom);
+ pnlBottom.setLayout(pnlBottomLayout);
+ pnlBottomLayout.setHorizontalGroup(pnlBottomLayout.createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING).add(
+ pnlBottomLayout.createSequentialGroup().add(576, 576, 576)
+ .add(btnCancel).add(5, 5, 5).add(btnOK)));
+ pnlBottomLayout
+ .setVerticalGroup(pnlBottomLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlBottomLayout
+ .createSequentialGroup()
+ .add(5, 5, 5)
+ .add(pnlBottomLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(btnCancel).add(btnOK))));
+
+ org.jdesktop.layout.GroupLayout pnlCurrentParentLayout = new org.jdesktop.layout.GroupLayout(
+ pnlCurrentParent);
+ pnlCurrentParent.setLayout(pnlCurrentParentLayout);
+ pnlCurrentParentLayout
+ .setHorizontalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ pnlCurrentParentLayout
+ .createSequentialGroup()
+ .addContainerGap(30, Short.MAX_VALUE)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING,
+ false)
+ .add(txtNewFolder, 0, 0,
+ Short.MAX_VALUE)
+ .add(txtCurrentFolder,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ 421, Short.MAX_VALUE))
+ .add(213, 213, 213))
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(pnlBottom,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 747,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ pnlCurrentParentLayout
+ .setVerticalGroup(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlCurrentParentLayout
+ .createSequentialGroup()
+ .add(58, 58, 58)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(txtCurrentFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlCurrentParentLayout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(txtNewFolder,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(lblNewDiretoryName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED,
+ 22, Short.MAX_VALUE)
+ .add(pnlBottom,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+
+ lblNewDiretoryName.getAccessibleContext().setAccessibleName(
+ "New directory name:");
+
+ org.jdesktop.layout.GroupLayout pnlFolderDataLayout = new org.jdesktop.layout.GroupLayout(
+ pnlFolderData);
+ pnlFolderData.setLayout(pnlFolderDataLayout);
+ pnlFolderDataLayout.setHorizontalGroup(pnlFolderDataLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlFolderDataLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 757,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ pnlFolderDataLayout.setVerticalGroup(pnlFolderDataLayout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(pnlFolderDataLayout
+ .createSequentialGroup()
+ .add(pnlCurrentParent,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
+ getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createSequentialGroup()
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(lblTitle,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 747,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(pnlFolderData,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)));
+ layout.setVerticalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createSequentialGroup()
+ .add(lblTitle)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pnlFolderData,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));
+
+ getAccessibleContext()
+ .setAccessibleName("Rename file or folder dialog");
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
doRename();
}// GEN-LAST:event_btnOKActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private java.awt.Label lblCurrentParent;
+ private java.awt.Label lblCurrentParent;
- private java.awt.Label lblNewDiretoryName;
+ private java.awt.Label lblNewDiretoryName;
- private javax.swing.JLabel lblTitle;
+ private javax.swing.JLabel lblTitle;
- private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlCurrentParent;
+ private javax.swing.JPanel pnlCurrentParent;
- private javax.swing.JPanel pnlFolderData;
+ private javax.swing.JPanel pnlFolderData;
- private javax.swing.JTextField txtCurrentFolder;
+ private javax.swing.JTextField txtCurrentFolder;
- private javax.swing.JTextField txtNewFolder;
-
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTextField txtNewFolder;
+ // End of variables declaration//GEN-END:variables
private void doRename() {
- // add the new folder to irods, add to the tree, and scroll the tree into view
+ // add the new folder to irods, add to the tree, and scroll the tree
+ // into view
if (txtNewFolder.getText().isEmpty()) {
txtNewFolder.setBackground(Color.red);
@@ -283,11 +343,13 @@ public class RenameLocalDirectoryDialog extends javax.swing.JDialog {
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
- TreePath currentNodePath = new TreePath(currentNode);
+ new TreePath(currentNode);
LocalFileNode parentNode = (LocalFileNode) currentNode.getParent();
File fileToRename = (File) currentNode.getUserObject();
- log.debug("reanaming local file:{}", fileToRename.getAbsolutePath());
- File newFile = new File(fileToRename.getParent(), txtNewFolder.getText());
+ log.debug("reanaming local file:{}",
+ fileToRename.getAbsolutePath());
+ File newFile = new File(fileToRename.getParent(),
+ txtNewFolder.getText());
log.debug("new file name is:{}", newFile.getAbsolutePath());
log.debug("renaming now...");
@@ -296,7 +358,8 @@ public class RenameLocalDirectoryDialog extends javax.swing.JDialog {
LocalFileSystemModel localFileTreeModel = (LocalFileSystemModel) localFileTree.getModel();
log.debug("updating tree model, remove old and add new nodes");
// localFileTreeModel.removeNodeFromParent(currentNode);
- // localFileTreeModel.insertNodeInto(parentNode, new LocalFileNode(newFile), 0);
+ // localFileTreeModel.insertNodeInto(parentNode, new
+ // LocalFileNode(newFile), 0);
currentNode.setUserObject(newFile);
localFileTreeModel.reload(parentNode);
@@ -319,16 +382,17 @@ public class RenameLocalDirectoryDialog extends javax.swing.JDialog {
*/
private void registerKeystrokeListener() {
- KeyStroke enter = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0);
+ KeyStroke enter = KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_ENTER, 0);
Action enterAction = new AbstractAction() {
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
doRename();
}
};
- btnOK.registerKeyboardAction(enterAction, enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
+ btnOK.registerKeyboardAction(enterAction, enter,
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ReplicationDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ReplicationDialog.java
index f3ae4f8..4ec9fb5 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ReplicationDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ReplicationDialog.java
@@ -19,27 +19,23 @@ import org.irods.jargon.idrop.exceptions.IdropException;
import org.slf4j.LoggerFactory;
/**
- * Dialog that displays the replication state of data objects, and can enqueue a replication operation on a data object
- * or a collection (recursive).
+ * Dialog that displays the replication state of data objects, and can enqueue a
+ * replication operation on a data object or a collection (recursive).
*
* @author mikeconway
*/
public class ReplicationDialog extends javax.swing.JDialog {
private final iDrop idropParentGui;
-
private final String seriesAbsolutePath;
-
private final String fileName;
-
private final boolean isFile;
-
private List<JCheckBox> boxes = new ArrayList<JCheckBox>();
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(ReplicationDialog.class);
/** Creates new form ReplicationDialog for a collection */
- public ReplicationDialog(iDrop idropParentGui, boolean modal, String seriesAbsolutePath) {
+ public ReplicationDialog(final iDrop idropParentGui, final boolean modal,
+ final String seriesAbsolutePath) {
super(idropParentGui, modal);
initComponents();
this.idropParentGui = idropParentGui;
@@ -51,7 +47,8 @@ public class ReplicationDialog extends javax.swing.JDialog {
}
/** Creates new form ReplicationDialog for a file */
- public ReplicationDialog(iDrop idropParentGui, boolean modal, String fileAbsolutePath, String fileName) {
+ public ReplicationDialog(final iDrop idropParentGui, final boolean modal,
+ final String fileAbsolutePath, final String fileName) {
super(idropParentGui, modal);
initComponents();
this.idropParentGui = idropParentGui;
@@ -63,17 +60,20 @@ public class ReplicationDialog extends javax.swing.JDialog {
}
private List<Resource> buildCurrentResourcesList() throws IdropException {
- // if a file, then see if it's already on the resc, otherwise add a replicate
+ // if a file, then see if it's already on the resc, otherwise add a
+ // replicate
// if this is a file, list current resources for this data object
List<Resource> currentResources = null;
if (isFile) {
IRODSFileService irodsFileService;
try {
- irodsFileService = new IRODSFileService(idropParentGui.getIrodsAccount(), idropParentGui.getiDropCore()
- .getIrodsFileSystem());
- currentResources = irodsFileService.getResourcesForDataObject(seriesAbsolutePath, fileName);
+ irodsFileService = new IRODSFileService(
+ idropParentGui.getIrodsAccount(), idropParentGui.getiDropCore().getIrodsFileSystem());
+ currentResources = irodsFileService.getResourcesForDataObject(
+ seriesAbsolutePath, fileName);
} catch (IdropException ex) {
- Logger.getLogger(ReplicationDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(ReplicationDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException(ex);
}
} else {
@@ -83,98 +83,106 @@ public class ReplicationDialog extends javax.swing.JDialog {
}
/**
- * 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.
+ * 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() {
-
- pnlHeader = new javax.swing.JPanel();
- lblFileName = new javax.swing.JLabel();
- pnlDialogToolbar = new javax.swing.JPanel();
- btnOK = new javax.swing.JButton();
- btnCancel = new javax.swing.JButton();
- pnlOptions = new javax.swing.JPanel();
- scrollReplicationResources = new javax.swing.JScrollPane();
- pnlReplicationResources = new javax.swing.JPanel();
- pnlReplicaionTools = new javax.swing.JPanel();
- btnReplicate = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setMinimumSize(new java.awt.Dimension(400, 300));
-
- pnlHeader.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
-
- lblFileName.setText("jLabel1");
- pnlHeader.add(lblFileName);
-
- getContentPane().add(pnlHeader, java.awt.BorderLayout.NORTH);
-
- btnOK.setText("OK");
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlDialogToolbar.add(btnOK);
-
- btnCancel.setText("Cancel");
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlDialogToolbar.add(btnCancel);
-
- getContentPane().add(pnlDialogToolbar, java.awt.BorderLayout.SOUTH);
-
- pnlOptions.setMinimumSize(new java.awt.Dimension(300, 200));
- pnlOptions.setLayout(new java.awt.BorderLayout());
-
- pnlReplicationResources.setLayout(new java.awt.GridLayout(0, 1));
- scrollReplicationResources.setViewportView(pnlReplicationResources);
-
- pnlOptions.add(scrollReplicationResources, java.awt.BorderLayout.CENTER);
-
- pnlReplicaionTools.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnReplicate.setText("Replicate");
- btnReplicate.setToolTipText("Replicate the given file to selected resources");
- btnReplicate.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnReplicateActionPerformed(evt);
- }
- });
- pnlReplicaionTools.add(btnReplicate);
-
- pnlOptions.add(pnlReplicaionTools, java.awt.BorderLayout.SOUTH);
-
- getContentPane().add(pnlOptions, java.awt.BorderLayout.CENTER);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ pnlHeader = new javax.swing.JPanel();
+ lblFileName = new javax.swing.JLabel();
+ pnlDialogToolbar = new javax.swing.JPanel();
+ btnOK = new javax.swing.JButton();
+ btnCancel = new javax.swing.JButton();
+ pnlOptions = new javax.swing.JPanel();
+ scrollReplicationResources = new javax.swing.JScrollPane();
+ pnlReplicationResources = new javax.swing.JPanel();
+ pnlReplicaionTools = new javax.swing.JPanel();
+ btnReplicate = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setMinimumSize(new java.awt.Dimension(400, 300));
+
+ pnlHeader.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
+
+ lblFileName.setText("jLabel1");
+ pnlHeader.add(lblFileName);
+
+ getContentPane().add(pnlHeader, java.awt.BorderLayout.NORTH);
+
+ btnOK.setText("OK");
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlDialogToolbar.add(btnOK);
+
+ btnCancel.setText("Cancel");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlDialogToolbar.add(btnCancel);
+
+ getContentPane().add(pnlDialogToolbar, java.awt.BorderLayout.SOUTH);
+
+ pnlOptions.setMinimumSize(new java.awt.Dimension(300, 200));
+ pnlOptions.setLayout(new java.awt.BorderLayout());
+
+ pnlReplicationResources.setLayout(new java.awt.GridLayout(0, 1));
+ scrollReplicationResources.setViewportView(pnlReplicationResources);
+
+ pnlOptions
+ .add(scrollReplicationResources, java.awt.BorderLayout.CENTER);
+
+ pnlReplicaionTools.setLayout(new java.awt.FlowLayout(
+ java.awt.FlowLayout.RIGHT));
+
+ btnReplicate.setText("Replicate");
+ btnReplicate
+ .setToolTipText("Replicate the given file to selected resources");
+ btnReplicate.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnReplicateActionPerformed(evt);
+ }
+ });
+ pnlReplicaionTools.add(btnReplicate);
+
+ pnlOptions.add(pnlReplicaionTools, java.awt.BorderLayout.SOUTH);
+
+ getContentPane().add(pnlOptions, java.awt.BorderLayout.CENTER);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnOKActionPerformed
this.dispose();
}// GEN-LAST:event_btnOKActionPerformed
- private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
+ private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
this.dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- private void btnReplicateActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnReplicateActionPerformed
+ private void btnReplicateActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnReplicateActionPerformed
List<Resource> currentResources;
int replicatedCount = 0;
- // build a list of the current resources, if a data object, will be used to decide what to replicate
+ // build a list of the current resources, if a data object, will be used
+ // to decide what to replicate
try {
currentResources = buildCurrentResourcesList();
} catch (IdropException ex) {
- Logger.getLogger(ReplicationDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(ReplicationDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
idropParentGui.showIdropException(ex);
return;
}
@@ -200,20 +208,20 @@ public class ReplicationDialog extends javax.swing.JDialog {
sb.append("/");
sb.append(fileName);
replicatedCount++;
- idropParentGui.getiDropCore().getTransferManager()
- .enqueueAReplicate(sb.toString(), checkBox.getText(), idropParentGui.getIrodsAccount());
+ idropParentGui.getiDropCore().getTransferManager().enqueueAReplicate(sb.toString(),
+ checkBox.getText(),
+ idropParentGui.getIrodsAccount());
} else if (!isFile) {
log.info("this is a collection, do the replication");
replicatedCount++;
- idropParentGui
- .getiDropCore()
- .getTransferManager()
- .enqueueAReplicate(seriesAbsolutePath, checkBox.getText(),
- idropParentGui.getIrodsAccount());
+ idropParentGui.getiDropCore().getTransferManager().enqueueAReplicate(seriesAbsolutePath,
+ checkBox.getText(),
+ idropParentGui.getIrodsAccount());
}
} catch (JargonException ex) {
- Logger.getLogger(ReplicationDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(ReplicationDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
idropParentGui.showIdropException(ex);
return;
}
@@ -228,8 +236,7 @@ public class ReplicationDialog extends javax.swing.JDialog {
@Override
public void run() {
if (replicationsDone > 0) {
- idropParentGui
- .showMessageFromOperation("Replication has been placed into the queue for processing");
+ idropParentGui.showMessageFromOperation("Replication has been placed into the queue for processing");
} else {
idropParentGui.showMessageFromOperation("Nothing to replicate");
@@ -248,23 +255,28 @@ public class ReplicationDialog extends javax.swing.JDialog {
@Override
public void run() {
try {
- IRODSFileService irodsFileService = new IRODSFileService(idropParentGui.getIrodsAccount(),
- idropParentGui.getiDropCore().getIrodsFileSystem());
+ IRODSFileService irodsFileService = new IRODSFileService(
+ idropParentGui.getIrodsAccount(), idropParentGui.getiDropCore().getIrodsFileSystem());
List<Resource> resources = irodsFileService.getResources();
boxes = new ArrayList<JCheckBox>();
- // if this is a file, list current resources for this data object
+ // if this is a file, list current resources for this data
+ // object
List<Resource> currentResources = buildCurrentResourcesList();
for (Resource resource : resources) {
JCheckBox rescBox = new JCheckBox();
rescBox.setText(resource.getName());
- // if this resource is already replicated, a checkbox is initialized for that resource
+ // if this resource is already replicated, a checkbox is
+ // initialized for that resource
for (Resource dataObjectResource : currentResources) {
- if (dataObjectResource.getName().equals(resource.getName())) {
- log.debug("resource already replicates data object:{}", resource);
+ if (dataObjectResource.getName().equals(
+ resource.getName())) {
+ log.debug(
+ "resource already replicates data object:{}",
+ resource);
rescBox.setSelected(true);
break;
}
@@ -280,7 +292,8 @@ public class ReplicationDialog extends javax.swing.JDialog {
scrollReplicationResources.validate();
} catch (IdropException ex) {
- Logger.getLogger(ReplicationDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(ReplicationDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
idropParentGui.showIdropException(ex);
return;
}
@@ -288,26 +301,25 @@ public class ReplicationDialog extends javax.swing.JDialog {
});
}
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnCancel;
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnCancel;
-
- private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnOK;
- private javax.swing.JButton btnReplicate;
+ private javax.swing.JButton btnReplicate;
- private javax.swing.JLabel lblFileName;
+ private javax.swing.JLabel lblFileName;
- private javax.swing.JPanel pnlDialogToolbar;
+ private javax.swing.JPanel pnlDialogToolbar;
- private javax.swing.JPanel pnlHeader;
+ private javax.swing.JPanel pnlHeader;
- private javax.swing.JPanel pnlOptions;
+ private javax.swing.JPanel pnlOptions;
- private javax.swing.JPanel pnlReplicaionTools;
+ private javax.swing.JPanel pnlReplicaionTools;
- private javax.swing.JPanel pnlReplicationResources;
+ private javax.swing.JPanel pnlReplicationResources;
- private javax.swing.JScrollPane scrollReplicationResources;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JScrollPane scrollReplicationResources;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java
index f94efb2..5b1166e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java
@@ -26,27 +26,27 @@ import org.irods.jargon.transfer.engine.TransferManagerImpl;
import org.slf4j.LoggerFactory;
/**
- * Bootstrapping class for iDrop, load config, create necessary services, and start the appropriate GUI components
+ * Bootstrapping class for iDrop, load config, create necessary services, and
+ * start the appropriate GUI components
*
* @author Mike Conway - DICE (www.irods.org)
*/
public class StartupSequencer {
private iDrop idrop;
-
private IDROPCore idropCore;
-
private static final org.slf4j.Logger log = LoggerFactory.getLogger(StartupSequencer.class);
-
public static final int STARTUP_SEQUENCE_PAUSE_INTERVAL = 2000;
public void doStartupSequence() {
+ boolean guiShown = false;
- log.info("initiating startup sequence...");
+ log.info("initiating startup sequence...");
System.setProperty("apple.laf.useScreenMenuBar", "true");
- System.setProperty("com.apple.mrj.application.apple.menu.about.name", "iDrop Client for iRODS");
+ System.setProperty("com.apple.mrj.application.apple.menu.about.name",
+ "iDrop Client for iRODS");
int count = 0;
log.info("creating idropCore...");
@@ -55,7 +55,8 @@ public class StartupSequencer {
try {
idropCore.setIrodsFileSystem(IRODSFileSystem.instance());
} catch (JargonException ex) {
- Logger.getLogger(StartupSequencer.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(StartupSequencer.class.getName()).log(
+ Level.SEVERE, null, ex);
}
log.info("creating idrop GUI app...");
@@ -88,27 +89,29 @@ public class StartupSequencer {
log.info("set config home directory as: {}", derivedConfigHomeDirectory);
/*
- * Here is where I first try and start the database to get the configuration. A database error indicates that
- * iDrop is already running
+ * Here is where I first try and start the database to get the
+ * configuration. A database error indicates that iDrop is already
+ * running
*/
- idropSplashWindow.setStatus("Looking for configuration information...", ++count);
+ idropSplashWindow.setStatus("Looking for configuration information...",
+ ++count);
Properties derivedProperties = null;
try {
IdropConfigurationService idropConfigurationService = new IdropConfigurationServiceImpl(
- derivedConfigHomeDirectory);
+ derivedConfigHomeDirectory, idropCore);
derivedProperties = idropConfigurationService.bootstrapConfiguration();
-
-
-
+
} catch (IdropAlreadyRunningException are) {
log.error("idrop is already running, shutting down");
- JOptionPane.showMessageDialog((Component) null, "iDrop is already running, cannot start", "iDrop Error",
+ JOptionPane.showMessageDialog((Component) null,
+ "iDrop is already running, cannot start", "iDrop Error",
JOptionPane.OK_OPTION);
System.exit(1);
} catch (IdropException ex) {
- Logger.getLogger(StartupSequencer.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(StartupSequencer.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
@@ -118,7 +121,8 @@ public class StartupSequencer {
throw new IdropRuntimeException(e);
}
- idropSplashWindow.setStatus("Configuration information gathered, logging in...", ++count);
+ idropSplashWindow.setStatus(
+ "Configuration information gathered, logging in...", ++count);
log.info("config properties derived...");
idropCore.setIdropConfig(new IdropConfig(derivedProperties));
@@ -137,8 +141,12 @@ public class StartupSequencer {
loginDialog.toFront();
loginDialog.setVisible(true);
+ if (idropCore.getIrodsAccount() == null) {
+ log.warn("no login account, exiting");
+ System.exit(0);
+ }
+
idropSplashWindow.toFront();
-
try {
Thread.sleep(STARTUP_SEQUENCE_PAUSE_INTERVAL);
@@ -151,30 +159,34 @@ public class StartupSequencer {
log.info("building transfer manager...");
try {
- idropCore.setTransferManager(new TransferManagerImpl(idropCore.getIrodsFileSystem(), idrop, idropCore
- .getIdropConfig().isLogSuccessfulTransfers()));
+ idropCore.setTransferManager(new TransferManagerImpl(idropCore.getIrodsFileSystem(), idrop, idropCore.getIdropConfig().isLogSuccessfulTransfers()));
} catch (JargonException ex) {
- Logger.getLogger(StartupSequencer.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("error creating transferManager", ex);
+ Logger.getLogger(StartupSequencer.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropRuntimeException("error creating transferManager",
+ ex);
}
try {
List<LocalIRODSTransfer> currentQueue = idropCore.getTransferManager().getCurrentQueue();
if (!currentQueue.isEmpty()) {
-
+
idropSplashWindow.toBack();
int result = JOptionPane.showConfirmDialog((Component) null,
- "Transfers are waiting to process, restart transfer?", "iDrop Transfers in Progress",
+ "Transfers are waiting to process, restart transfer?",
+ "iDrop Transfers in Progress",
JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.CANCEL_OPTION) {
idropCore.getTransferManager().pause();
}
- idropSplashWindow.toFront();
+ idropSplashWindow.toFront();
}
} catch (JargonException ex) {
- Logger.getLogger(StartupSequencer.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("error evaluating current queue", ex);
+ Logger.getLogger(StartupSequencer.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropRuntimeException("error evaluating current queue",
+ ex);
}
try {
@@ -190,12 +202,15 @@ public class StartupSequencer {
Timer timer = new Timer();
timer.scheduleAtFixedRate(queueSchedulerTimerTask, 10000, 120000);
idropCore.setQueueTimer(timer);
- idrop.signalIdropCoreReadyAndSplashComplete();
+ idrop.signalIdropCoreReadyAndSplashComplete();
+
+
} catch (IdropException ex) {
- Logger.getLogger(StartupSequencer.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(StartupSequencer.class.getName()).log(
+ Level.SEVERE, null, ex);
}
-
- log.info("logged in, now checking for first run...");
+
+ log.info("logged in, now checking for first run...");
try {
Thread.sleep(STARTUP_SEQUENCE_PAUSE_INTERVAL);
@@ -203,37 +218,54 @@ public class StartupSequencer {
throw new IdropRuntimeException(e);
}
- idropSplashWindow.setStatus("Checking if this is the first time run to set up synch...", ++count);
+ idropSplashWindow.setStatus(
+ "Checking if this is the first time run to set up synch...",
+ ++count);
String synchDeviceName = idropCore.getIdropConfig().getSynchDeviceName();
- if (synchDeviceName == null) {
+ if (synchDeviceName == null && idropCore.getIdropConfig().isShowStartupWizard()) {
log.info("first time running idrop, starting configuration wizard");
+ // show idrop gui
+
+ log.info("showing gui first time run");
+ idrop.showIdropGui();
+
doFirstTimeConfigurationWizard();
+ } else {
+ // see if I show the gui at startup or show a message
+ if (idropCore.getIdropConfig().isShowGuiAtStartup()) {
+ idrop.showIdropGui();
+ } else {
+ MessageManager.showMessage(
+ idrop,
+ "iDrop has started.\nCheck your system tray to access the iDrop user interface.",
+ "iDrop has started");
+ }
}
-
log.info("signal that the startup sequence is complete");
try {
-
+
idropSplashWindow.setVisible(false);
idropSplashWindow = null;
} catch (Exception e) {
- Logger.getLogger(StartupSequencer.class.getName()).log(Level.SEVERE, null, e);
+ Logger.getLogger(StartupSequencer.class.getName()).log(
+ Level.SEVERE, null, e);
throw new IdropRuntimeException("error starting idrop gui", e);
}
-
-
+
}
/**
- * Start up iDrop as a system tray application. This is the main entry point for iDrop
+ * Start up iDrop as a system tray application. This is the main entry point
+ * for iDrop
*
* @param args
* the command line arguments
*/
- public static void main(String args[]) throws InterruptedException {
+ public static void main(final String args[]) throws InterruptedException {
StartupSequencer startupSequencer = new StartupSequencer();
try {
startupSequencer.doStartupSequence();
@@ -245,9 +277,9 @@ public class StartupSequencer {
private void doFirstTimeConfigurationWizard() {
log.info("doFirstTimeConfigurationWizard()..do I show");
- // there is a force.no.synch property in idrop.properties that prevents synch from coming up if in the build that way
-
-
+ // there is a force.no.synch property in idrop.properties that prevents
+ // synch from coming up if in the build that way
+
if (idropCore.getIdropConfig().isShowStartupWizard()) {
log.info("doing setup wizard");
SetupWizard setupWizard = new SetupWizard(idrop, true);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java
index 6981b9e..d90d2dd 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java
@@ -3,7 +3,6 @@
*
* Created on Mar 22, 2011, 10:34:06 AM
*/
-
package org.irods.jargon.idrop.desktop.systraygui;
import java.util.logging.Level;
@@ -26,194 +25,231 @@ import org.irods.jargon.transfer.synch.SynchronizeProcessorImpl;
public class SynchSetupDialog extends javax.swing.JDialog {
private final IDROPCore idropCore;
-
private final IRODSFileSystem irodsFileSystem;
-
private final SynchPropertiesService synchPropertiesService;
/** Creates new form SynchSetupDialog */
- public SynchSetupDialog(iDrop parent, IDROPCore idropCore, IRODSFileSystem irodsFileSystem) {
+ public SynchSetupDialog(final iDrop parent, final IDROPCore idropCore,
+ final IRODSFileSystem irodsFileSystem) {
super(parent, false);
this.idropCore = idropCore;
this.irodsFileSystem = irodsFileSystem;
initComponents();
try {
- synchPropertiesService = new SynchPropertiesServiceImpl(irodsFileSystem.getIRODSAccessObjectFactory(),
+ synchPropertiesService = new SynchPropertiesServiceImpl(
+ irodsFileSystem.getIRODSAccessObjectFactory(),
idropCore.getIrodsAccount());
} catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("unable to build synchPropertiesService", ex);
+ Logger.getLogger(SynchSetupDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropRuntimeException(
+ "unable to build synchPropertiesService", ex);
}
}
/**
- * 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.
+ * 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() {
-
- lblDeviceName = new javax.swing.JLabel();
- txtDeviceName = new javax.swing.JTextField();
- lblDeviceName1 = new javax.swing.JLabel();
- txtIrodsPath = new javax.swing.JTextField();
- lblDeviceName2 = new javax.swing.JLabel();
- localPath = new javax.swing.JTextField();
- btnAdd = new javax.swing.JButton();
- btnSynch = new javax.swing.JButton();
- btnUpdateTimestamps = new javax.swing.JButton();
- jLabel1 = new javax.swing.JLabel();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- lblDeviceName.setText("Device Name:");
-
- lblDeviceName1.setText("iRODS Path:");
-
- lblDeviceName2.setText("Local Path:");
-
- btnAdd.setText("Add Device");
- btnAdd.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnAddActionPerformed(evt);
- }
- });
-
- btnSynch.setText("Synch");
- btnSynch.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnSynchActionPerformed(evt);
- }
- });
-
- btnUpdateTimestamps.setText("Update Timestamps");
- btnUpdateTimestamps.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnUpdateTimestampsActionPerformed(evt);
- }
- });
-
- jLabel1.setText("Testing only.....");
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- layout.createSequentialGroup()
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(layout.createSequentialGroup().addContainerGap().add(btnUpdateTimestamps))
- .add(layout
- .createSequentialGroup()
- .add(47, 47, 47)
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(layout
- .createSequentialGroup()
- .add(lblDeviceName1)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)
- .add(txtIrodsPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 394,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(layout
- .createSequentialGroup()
- .add(lblDeviceName)
- .add(18, 18, 18)
- .add(txtDeviceName,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 394,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- layout.createSequentialGroup()
- .add(lblDeviceName2)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED,
- 36, Short.MAX_VALUE)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING,
- false)
- .add(layout
- .createSequentialGroup()
- .add(btnAdd)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)
- .add(btnSynch))
- .add(localPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 394,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))
- .add(279, 279, 279))
- .add(layout
- .createSequentialGroup()
- .add(67, 67, 67)
- .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 604,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addContainerGap(153, Short.MAX_VALUE)));
- layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
- layout.createSequentialGroup()
- .add(jLabel1)
- .add(4, 4, 4)
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblDeviceName)
- .add(txtDeviceName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblDeviceName1)
- .add(txtIrodsPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblDeviceName2)
- .add(localPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(18, 18, 18)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(btnAdd)
- .add(btnSynch)).addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(btnUpdateTimestamps).addContainerGap(25, Short.MAX_VALUE)));
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnAddActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ lblDeviceName = new javax.swing.JLabel();
+ txtDeviceName = new javax.swing.JTextField();
+ lblDeviceName1 = new javax.swing.JLabel();
+ txtIrodsPath = new javax.swing.JTextField();
+ lblDeviceName2 = new javax.swing.JLabel();
+ localPath = new javax.swing.JTextField();
+ btnAdd = new javax.swing.JButton();
+ btnSynch = new javax.swing.JButton();
+ btnUpdateTimestamps = new javax.swing.JButton();
+ jLabel1 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ lblDeviceName.setText("Device Name:");
+
+ lblDeviceName1.setText("iRODS Path:");
+
+ lblDeviceName2.setText("Local Path:");
+
+ btnAdd.setText("Add Device");
+ btnAdd.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnAddActionPerformed(evt);
+ }
+ });
+
+ btnSynch.setText("Synch");
+ btnSynch.addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnSynchActionPerformed(evt);
+ }
+ });
+
+ btnUpdateTimestamps.setText("Update Timestamps");
+ btnUpdateTimestamps
+ .addActionListener(new java.awt.event.ActionListener() {
+ @Override
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnUpdateTimestampsActionPerformed(evt);
+ }
+ });
+
+ jLabel1.setText("Testing only.....");
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
+ getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ layout.createSequentialGroup()
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(btnUpdateTimestamps))
+ .add(layout
+ .createSequentialGroup()
+ .add(47, 47, 47)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING,
+ false)
+ .add(layout
+ .createSequentialGroup()
+ .add(lblDeviceName1)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)
+ .add(txtIrodsPath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 394,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(layout
+ .createSequentialGroup()
+ .add(lblDeviceName)
+ .add(18,
+ 18,
+ 18)
+ .add(txtDeviceName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 394,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING,
+ layout.createSequentialGroup()
+ .add(lblDeviceName2)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED,
+ 36,
+ Short.MAX_VALUE)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.LEADING,
+ false)
+ .add(layout
+ .createSequentialGroup()
+ .add(btnAdd)
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)
+ .add(btnSynch))
+ .add(localPath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 394,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))
+ .add(279, 279, 279))
+ .add(layout
+ .createSequentialGroup()
+ .add(67, 67, 67)
+ .add(jLabel1,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ 604,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(153, Short.MAX_VALUE)));
+ layout.setVerticalGroup(layout
+ .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout
+ .createSequentialGroup()
+ .add(jLabel1)
+ .add(4, 4, 4)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(lblDeviceName)
+ .add(txtDeviceName,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(lblDeviceName1)
+ .add(txtIrodsPath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(lblDeviceName2)
+ .add(localPath,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+ org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+ org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(18, 18, 18)
+ .add(layout
+ .createParallelGroup(
+ org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(btnAdd).add(btnSynch))
+ .addPreferredGap(
+ org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(btnUpdateTimestamps)
+ .addContainerGap(25, Short.MAX_VALUE)));
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnAddActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnAddActionPerformed
try {
SynchPropertiesService synchPropertiesService = new SynchPropertiesServiceImpl(
- irodsFileSystem.getIRODSAccessObjectFactory(), idropCore.getIrodsAccount());
- synchPropertiesService.addSynchDeviceForUserAndIrodsAbsolutePath(idropCore.getIrodsAccount().getUserName(),
- txtDeviceName.getText().trim(), txtIrodsPath.getText().trim(), localPath.getText().trim());
+ irodsFileSystem.getIRODSAccessObjectFactory(),
+ idropCore.getIrodsAccount());
+ synchPropertiesService.addSynchDeviceForUserAndIrodsAbsolutePath(
+ idropCore.getIrodsAccount().getUserName(), txtDeviceName.getText().trim(), txtIrodsPath.getText().trim(),
+ localPath.getText().trim());
} catch (DuplicateDataException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(SynchSetupDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
} catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(SynchSetupDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}// GEN-LAST:event_btnAddActionPerformed
- private void btnSynchActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnSynchActionPerformed
+ private void btnSynchActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnSynchActionPerformed
try {
SynchronizeProcessor synchProcessor = new SynchronizeProcessorImpl();
- synchProcessor.setFileTreeDiffUtility(new FileTreeDiffUtilityImpl(idropCore.getIrodsAccount(),
- irodsFileSystem.getIRODSAccessObjectFactory()));
+ synchProcessor.setFileTreeDiffUtility(new FileTreeDiffUtilityImpl(
+ idropCore.getIrodsAccount(), irodsFileSystem.getIRODSAccessObjectFactory()));
synchProcessor.setIrodsAccessObjectFactory(irodsFileSystem.getIRODSAccessObjectFactory());
synchProcessor.setIrodsAccount(idropCore.getIrodsAccount());
synchProcessor.setTransferManager(idropCore.getTransferManager());
@@ -221,52 +257,52 @@ public class SynchSetupDialog extends javax.swing.JDialog {
// FIXME: refactor to not pass this stuff in, or alt method
synchProcessor.synchronizeLocalToIRODS(txtDeviceName.getText().trim(), txtIrodsPath.getText().trim());
} catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(SynchSetupDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
} finally {
irodsFileSystem.closeAndEatExceptions();
}
}// GEN-LAST:event_btnSynchActionPerformed
- private void btnUpdateTimestampsActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdateTimestampsActionPerformed
+ private void btnUpdateTimestampsActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdateTimestampsActionPerformed
try {
SynchronizeProcessor synchProcessor = new SynchronizeProcessorImpl();
- synchProcessor.setFileTreeDiffUtility(new FileTreeDiffUtilityImpl(idropCore.getIrodsAccount(),
- irodsFileSystem.getIRODSAccessObjectFactory()));
+ synchProcessor.setFileTreeDiffUtility(new FileTreeDiffUtilityImpl(
+ idropCore.getIrodsAccount(), irodsFileSystem.getIRODSAccessObjectFactory()));
synchProcessor.setIrodsAccessObjectFactory(irodsFileSystem.getIRODSAccessObjectFactory());
synchProcessor.setIrodsAccount(idropCore.getIrodsAccount());
synchProcessor.setTransferManager(idropCore.getTransferManager());
synchProcessor.setSynchPropertiesService(synchPropertiesService);
- synchProcessor.getTimestampsAndUpdateSynchDataInIRODS(idropCore.getIrodsAccount().getUserName(),
- txtDeviceName.getText().trim(), txtIrodsPath.getText().trim());
+ synchProcessor.getTimestampsAndUpdateSynchDataInIRODS(idropCore.getIrodsAccount().getUserName(), txtDeviceName.getText().trim(), txtIrodsPath.getText().trim());
} catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(SynchSetupDialog.class.getName()).log(
+ Level.SEVERE, null, ex);
} finally {
irodsFileSystem.closeAndEatExceptions();
}
}// GEN-LAST:event_btnUpdateTimestampsActionPerformed
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnAdd;
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnAdd;
-
- private javax.swing.JButton btnSynch;
-
- private javax.swing.JButton btnUpdateTimestamps;
+ private javax.swing.JButton btnSynch;
- private javax.swing.JLabel jLabel1;
+ private javax.swing.JButton btnUpdateTimestamps;
- private javax.swing.JLabel lblDeviceName;
+ private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel lblDeviceName1;
+ private javax.swing.JLabel lblDeviceName;
- private javax.swing.JLabel lblDeviceName2;
+ private javax.swing.JLabel lblDeviceName1;
- private javax.swing.JTextField localPath;
+ private javax.swing.JLabel lblDeviceName2;
- private javax.swing.JTextField txtDeviceName;
+ private javax.swing.JTextField localPath;
- private javax.swing.JTextField txtIrodsPath;
- // End of variables declaration//GEN-END:variables
+ private javax.swing.JTextField txtDeviceName;
+ private javax.swing.JTextField txtIrodsPath;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFSChooserListCellRenderer.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFSChooserListCellRenderer.java
index f6dcb6d..fb8e91e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFSChooserListCellRenderer.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFSChooserListCellRenderer.java
@@ -15,7 +15,7 @@ import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
/**
*
* @author jdr0887
- *
+ *
*/
public class RemoteFSChooserListCellRenderer extends DefaultListCellRenderer {
@@ -27,14 +27,17 @@ public class RemoteFSChooserListCellRenderer extends DefaultListCellRenderer {
/*
* (non-Javadoc)
*
- * @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int,
- * boolean, boolean)
+ * @see
+ * javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax
+ * .swing.JList, java.lang.Object, int, boolean, boolean)
*/
@Override
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
- boolean hasFocus) {
+ public Component getListCellRendererComponent(final JList list,
+ final Object value, final int index, final boolean isSelected,
+ final boolean hasFocus) {
- JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, hasFocus);
+ JLabel label = (JLabel) super.getListCellRendererComponent(list, value,
+ index, isSelected, hasFocus);
if (value instanceof CollectionAndDataObjectListingEntry) {
CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) value;
@@ -51,5 +54,4 @@ public class RemoteFSChooserListCellRenderer extends DefaultListCellRenderer {
}
return (label);
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFileChooserDialogLookInComboBoxRender.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFileChooserDialogLookInComboBoxRender.java
index f69a35d..c741337 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFileChooserDialogLookInComboBoxRender.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/components/RemoteFileChooserDialogLookInComboBoxRender.java
@@ -12,7 +12,7 @@ import javax.swing.UIManager;
/**
*
* @author jdr0887
- *
+ *
*/
public class RemoteFileChooserDialogLookInComboBoxRender extends DefaultListCellRenderer {
@@ -21,9 +21,12 @@ public class RemoteFileChooserDialogLookInComboBoxRender extends DefaultListCell
*/
private static final long serialVersionUID = 1L;
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
- boolean hasFocus) {
- JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, hasFocus);
+ @Override
+ public Component getListCellRendererComponent(final JList list,
+ final Object value, final int index, final boolean isSelected,
+ final boolean hasFocus) {
+ JLabel label = (JLabel) super.getListCellRendererComponent(list, value,
+ index, isSelected, hasFocus);
if (value != null && value instanceof String) {
Icon icon = UIManager.getIcon("FileView.directoryIcon");
label.setIcon(icon);
@@ -31,5 +34,4 @@ public class RemoteFileChooserDialogLookInComboBoxRender extends DefaultListCell
}
return (label);
}
-
}
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 a514f38..6119c2c 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
@@ -81,11 +81,13 @@ import org.netbeans.swing.outline.Outline;
import org.slf4j.LoggerFactory;
/**
- * Main system tray and GUI. Create system tray menu, start timer process for queue.
+ * Main system tray and GUI. Create system tray menu, start timer process for
+ * queue.
*
* @author Mike Conway - DICE (www.irods.org)
*/
-public class iDrop extends javax.swing.JFrame implements ActionListener, ItemListener, TransferManagerCallbackListener {
+public class iDrop extends javax.swing.JFrame implements ActionListener,
+ ItemListener, TransferManagerCallbackListener {
private static final long serialVersionUID = 1L;
private LocalFileSystemModel localFileModel = null;
@@ -105,6 +107,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
public JCheckBox showGUICheckBox;
public JButton preferencesDialogOKButton;
private static SimpleDateFormat SDF = new SimpleDateFormat("MM-dd-yyyy");
+ private boolean receivedStartupSignal = false;
public iDrop(final IDROPCore idropCore) {
@@ -130,7 +133,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
public iDrop() {
}
- protected void buildIdropGuiComponents() throws IdropRuntimeException, HeadlessException {
+ protected void buildIdropGuiComponents() throws IdropRuntimeException,
+ HeadlessException {
initComponents();
this.pnlLocalTreeArea.setVisible(false);
this.pnlIrodsInfo.setVisible(false);
@@ -139,7 +143,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
pnlIrodsInfo.setTransferHandler(new InfoPanelTransferHandler(this));
} catch (IdropException ex) {
Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("error setting up infoPanelTransferHandler", ex);
+ throw new IdropRuntimeException(
+ "error setting up infoPanelTransferHandler", ex);
}
tableSearchResults.setModel(new IRODSSearchTableModel());
@@ -160,9 +165,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
/*
* FIXME: remove cookswing deps for issues
*
- * CookSwing cookSwing = new CookSwing(this); newPreferencesDialog = (JDialog)
- * cookSwing.render("org/irods/jargon/idrop/preferencesDialog.xml"); boolean showGUI =
- * getiDropCore().getPreferences().getBoolean("showGUI", true); showGUICheckBox.setSelected(showGUI);
+ * CookSwing cookSwing = new CookSwing(this); newPreferencesDialog =
+ * (JDialog)
+ * cookSwing.render("org/irods/jargon/idrop/preferencesDialog.xml");
+ * boolean showGUI =
+ * getiDropCore().getPreferences().getBoolean("showGUI", true);
+ * showGUICheckBox.setSelected(showGUI);
*/
if (!getiDropCore().getIdropConfig().isAdvancedView()) {
toolBarInfo.setVisible(false);
@@ -173,7 +181,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
System.exit(0);
}
- userNameLabel.setText("User: " + getiDropCore().getIrodsAccount().getUserName());
+ userNameLabel.setText("User: "
+ + getiDropCore().getIrodsAccount().getUserName());
}
@@ -185,33 +194,40 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
setUpLocalFileSelectTree();
buildTargetTree();
+ togglePauseTransfer.setSelected(pausedItem.getState());
+ iDropCore.getIconManager().setRunningStatus(
+ iDropCore.getTransferManager().getRunningStatus());
+ iDropCore.getIconManager().setErrorStatus(
+ iDropCore.getTransferManager().getErrorStatus());
setVisible(true);
}
protected void signalIdropCoreReadyAndSplashComplete() {
- createAndShowSystemTray();
-
- boolean showGUI = getiDropCore().getPreferences().getBoolean("showGUI", true);
- if (showGUI) {
- showIdropGui();
+ if (receivedStartupSignal) {
+ log.info("already received startup signal");
} else {
- MessageManager.showMessage(this,
- "iDrop has started.\nCheck your system tray to access the iDrop user interface.",
- "iDrop has started");
+ createAndShowSystemTray();
}
- iDropCore.getIconManager().setRunningStatus(iDropCore.getTransferManager().getRunningStatus());
- iDropCore.getIconManager().setErrorStatus(iDropCore.getTransferManager().getErrorStatus());
- togglePauseTransfer.setSelected(pausedItem.getState());
+
+ receivedStartupSignal = true;
+
+ iDropCore.getIconManager().setRunningStatus(
+ iDropCore.getTransferManager().getRunningStatus());
+ iDropCore.getIconManager().setErrorStatus(
+ iDropCore.getTransferManager().getErrorStatus());
+
}
@Override
- public synchronized void transferManagerErrorStatusUpdate(ErrorStatus es) {
+ public synchronized void transferManagerErrorStatusUpdate(
+ final ErrorStatus es) {
iDropCore.getIconManager().setErrorStatus(es);
}
@Override
- public synchronized void transferManagerRunningStatusUpdate(RunningStatus rs) {
+ public synchronized void transferManagerRunningStatusUpdate(
+ final RunningStatus rs) {
iDropCore.getIconManager().setRunningStatus(rs);
if (rs == RunningStatus.PAUSED) {
this.setTransferStatePaused();
@@ -227,7 +243,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
*/
@Override
public void statusCallback(final TransferStatus ts) {
- // this.queuedTransfersLabel.setText("Queued Transfers: " + ts.getTotalFilesTransferredSoFar() + "/"
+ // this.queuedTransfersLabel.setText("Queued Transfers: " +
+ // ts.getTotalFilesTransferredSoFar() + "/"
// + ts.getTotalFilesToTransfer());
this.transferStatusProgressBar.setMaximum(ts.getTotalFilesToTransfer());
this.transferStatusProgressBar.setValue(ts.getTotalFilesTransferredSoFar());
@@ -238,9 +255,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
@Override
public void run() {
// on initiation, clear and reset the status bar info
- lblTransferFilesCounts.setText("Files: " + ts.getTotalFilesTransferredSoFar() + " / "
+ lblTransferFilesCounts.setText("Files: "
+ + ts.getTotalFilesTransferredSoFar() + " / "
+ ts.getTotalFilesToTransfer());
- lblTransferByteCounts.setText("Current File (kb):" + (ts.getBytesTransfered() / 1024) + " / "
+ lblTransferByteCounts.setText("Current File (kb):"
+ + (ts.getBytesTransfered() / 1024) + " / "
+ (ts.getTotalSize() / 1024));
lblCurrentFile.setText(IDropUtils.abbreviateFileName(ts.getSourceFileAbsolutePath()));
}
@@ -249,8 +268,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * Implementation of transfer manager callback. The overall status callback represents the start and completion of a
- * transfer operation
+ * Implementation of transfer manager callback. The overall status callback
+ * represents the start and completion of a transfer operation
*
* @param ts
*/
@@ -276,9 +295,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
public void run() {
// on initiation, clear and reset the status bar info
lblTransferType.setText(ts.getTransferType().name());
- lblTransferFilesCounts.setText("Files: " + ts.getTotalFilesTransferredSoFar() + " / "
+ lblTransferFilesCounts.setText("Files: "
+ + ts.getTotalFilesTransferredSoFar() + " / "
+ ts.getTotalFilesToTransfer());
- lblTransferByteCounts.setText("Bytes (kb):" + (ts.getBytesTransfered() / 1024) + " / "
+ lblTransferByteCounts.setText("Bytes (kb):"
+ + (ts.getBytesTransfered() / 1024) + " / "
+ (ts.getTotalSize() / 1024));
lblCurrentFile.setText(IDropUtils.abbreviateFileName(ts.getSourceFileAbsolutePath()));
}
@@ -291,8 +312,9 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
*
* @param idropException
*/
- public void showIdropException(Exception idropException) {
- JOptionPane.showMessageDialog(this, idropException.getMessage(), "iDROP Exception", JOptionPane.WARNING_MESSAGE);
+ public void showIdropException(final Exception idropException) {
+ JOptionPane.showMessageDialog(this, idropException.getMessage(),
+ "iDROP Exception", JOptionPane.WARNING_MESSAGE);
}
/**
@@ -307,7 +329,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
@Override
public void run() {
- JOptionPane.showMessageDialog(thisIdropGui, messageFromOperation, "iDROP Message",
+ JOptionPane.showMessageDialog(thisIdropGui,
+ messageFromOperation, "iDROP Message",
JOptionPane.INFORMATION_MESSAGE);
}
});
@@ -324,7 +347,10 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
@Override
public void run() {
- /* listener events may occur at startup before the GUI is fully prepared, ignore these */
+ /*
+ * listener events may occur at startup before the GUI is fully
+ * prepared, ignore these
+ */
if (trayIcon == null) {
return;
}
@@ -342,8 +368,9 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * Builds the system tray menu and installs the iDrop icon in the system tray. The iDrop GUI is displayed when the
- * iDrop menu item is selected from the system tray
+ * Builds the system tray menu and installs the iDrop icon in the system
+ * tray. The iDrop GUI is displayed when the iDrop menu item is selected
+ * from the system tray
*/
protected void createAndShowSystemTray() {
if (!SystemTray.isSupported()) {
@@ -351,12 +378,18 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
return;
}
+ if (trayIcon != null) {
+ log.info("system tray already shown");
+ return;
+ }
+
final PopupMenu popup = new PopupMenu();
final SystemTray tray = SystemTray.getSystemTray();
if (trayIcon == null) {
- trayIcon = new TrayIcon(createImage("images/dialog-ok-2.png", "tray icon"));
+ trayIcon = new TrayIcon(createImage("images/dialog-ok-2.png",
+ "tray icon"));
}
trayIcon.setImageAutoSize(true);
@@ -418,8 +451,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
}
- /** Returns an ImageIcon, or null if the path was invalid. FIXME: move to static util */
- protected static Image createImage(String path, String description) {
+ /**
+ * Returns an ImageIcon, or null if the path was invalid. FIXME: move to
+ * static util
+ */
+ protected static Image createImage(final String path,
+ final String description) {
URL imageURL = iDrop.class.getResource(path);
if (imageURL == null) {
@@ -433,7 +470,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
/**
* Get the current iRODS login account.
*
- * @return <code>IRODSAccount</code> with the current iRODS connection information.
+ * @return <code>IRODSAccount</code> with the current iRODS connection
+ * information.
*/
public IRODSAccount getIrodsAccount() {
synchronized (this) {
@@ -444,9 +482,10 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
/**
* Set the current connection information.
*
- * @return <code>IRODSAccount</code> with the current iRODS connection information.
+ * @return <code>IRODSAccount</code> with the current iRODS connection
+ * information.
*/
- public void setIrodsAccount(IRODSAccount irodsAccount) {
+ public void setIrodsAccount(final IRODSAccount irodsAccount) {
synchronized (this) {
this.iDropCore.setIrodsAccount(irodsAccount);
}
@@ -458,7 +497,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
* @param e
*/
@Override
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
Toolkit toolkit = getToolkit();
@@ -488,7 +527,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
showGUICheckBox.setSelected(getiDropCore().getPreferences().getBoolean("showGUI", true));
newPreferencesDialog.setVisible(true);
} else if (e.getActionCommand().equals("Synch")) {
- synchSetupDialog = new SynchSetupDialog(this, getiDropCore(), getiDropCore().getIrodsFileSystem());
+ synchSetupDialog = new SynchSetupDialog(this, getiDropCore(),
+ getiDropCore().getIrodsFileSystem());
synchSetupDialog.setVisible(true);
} else if (e.getActionCommand().equals("Change Password")) {
@@ -512,7 +552,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
showIdropGui();
} else {
- // refresh the tree when setting visible again, the account may have changed.
+ // refresh the tree when setting visible again, the account may
+ // have changed.
buildTargetTree();
this.setVisible(true);
@@ -526,7 +567,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
private boolean showQueueManagerDialog() {
try {
if (queueManagerDialog == null) {
- queueManagerDialog = new QueueManagerDialog(this, iDropCore.getTransferManager(),
+ queueManagerDialog = new QueueManagerDialog(this,
+ iDropCore.getTransferManager(),
QueueManagerDialog.ViewType.RECENT);
} else {
queueManagerDialog.refreshTableView(QueueManagerDialog.ViewType.RECENT);
@@ -546,7 +588,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
return trayIcon;
}
- public void setTrayIcon(TrayIcon trayIcon) {
+ public void setTrayIcon(final TrayIcon trayIcon) {
this.trayIcon = trayIcon;
trayIcon.setImageAutoSize(true);
}
@@ -560,7 +602,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
* <code>String</code> with the target of the transfer
* @return <code>int</code> with the dialog user response.
*/
- public int showTransferConfirm(final String sourcePath, final String targetPath) {
+ public int showTransferConfirm(final String sourcePath,
+ final String targetPath) {
StringBuilder sb = new StringBuilder();
sb.append("Would you like to transfer from ");
@@ -569,7 +612,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
sb.append(targetPath);
// default icon, custom title
- int n = JOptionPane.showConfirmDialog(this, sb.toString(), "Transfer Confirmaiton", JOptionPane.YES_NO_OPTION);
+ int n = JOptionPane.showConfirmDialog(this, sb.toString(),
+ "Transfer Confirmaiton", JOptionPane.YES_NO_OPTION);
return n;
}
@@ -583,7 +627,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
int n = JOptionPane.showConfirmDialog(
this,
"There are transfers ready to process, should the transfer queue be started? Click NO to pause the transfersf",
- "Begin Transfer Confirmation", JOptionPane.YES_NO_OPTION);
+ "Begin Transfer Confirmation",
+ JOptionPane.YES_NO_OPTION);
return n;
}
@@ -591,7 +636,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
/**
* Returns the current iRODS remote tree view component.
*
- * @return <code>JTree</code> visual representation of the remote iRODS resource
+ * @return <code>JTree</code> visual representation of the remote iRODS
+ * resource
*/
public Outline getTreeStagingResource() {
return irodsTree;
@@ -625,7 +671,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
@Override
- public void itemStateChanged(ItemEvent e) {
+ public void itemStateChanged(final ItemEvent e) {
if (e.getItem().equals("Pause")) {
@@ -638,15 +684,16 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
iDropCore.getTransferManager().resume();
}
} catch (Exception ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null,
+ ex);
}
}
}
/**
- * Show or hide the iRODS info panel and manage the state of the show info menu and toggle so that they remain in
- * synch
+ * Show or hide the iRODS info panel and manage the state of the show info
+ * menu and toggle so that they remain in synch
*/
private void handleInfoPanelShowOrHide() {
final iDrop idropGuiReference = this;
@@ -656,7 +703,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
public void run() {
pnlIrodsInfo.setVisible(toggleIrodsDetails.isSelected());
jCheckBoxMenuItemShowIrodsInfo.setSelected(toggleIrodsDetails.isSelected());
- // if info is being opened, initialize to the first selected item, or the root of the iRODS tree if none
+ // if info is being opened, initialize to the first selected
+ // item, or the root of the iRODS tree if none
// selected
IRODSNode node;
@@ -673,9 +721,10 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
private void setUpLocalFileSelectTree() {
/*
- * build a list of the roots (e.g. drives on windows systems). If there is only one, use it as the basis for the
- * file model, otherwise, display an additional panel listing the other roots, and build the tree for the first
- * drive encountered.
+ * build a list of the roots (e.g. drives on windows systems). If there
+ * is only one, use it as the basis for the file model, otherwise,
+ * display an additional panel listing the other roots, and build the
+ * tree for the first drive encountered.
*/
if (fileTree != null) {
@@ -693,41 +742,47 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
initializeLocalFileTreeModel(null);
fileTree = new LocalFileTree(localFileModel, gui);
- listLocalDrives.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
-
- @Override
- public void valueChanged(ListSelectionEvent e) {
- if (e.getValueIsAdjusting()) {
- return;
- }
-
- log.debug("new local file system model");
- log.debug("selection event:{}", e);
- Object selectedItem = listLocalDrives.getSelectedValue();
- initializeLocalFileTreeModelWhenDriveIsSelected(selectedItem);
-
- }
- });
+ listLocalDrives.getSelectionModel().addListSelectionListener(
+ new ListSelectionListener() {
+
+ @Override
+ public void valueChanged(final ListSelectionEvent e) {
+ if (e.getValueIsAdjusting()) {
+ return;
+ }
+
+ log.debug("new local file system model");
+ log.debug("selection event:{}", e);
+ Object selectedItem = listLocalDrives.getSelectedValue();
+ initializeLocalFileTreeModelWhenDriveIsSelected(selectedItem);
+
+ }
+ });
scrollLocalFileTree.setViewportView(fileTree);
- pnlLocalTreeArea.add(scrollLocalFileTree, java.awt.BorderLayout.CENTER);
+ pnlLocalTreeArea.add(scrollLocalFileTree,
+ java.awt.BorderLayout.CENTER);
}
});
}
- private void initializeLocalFileTreeModelWhenDriveIsSelected(final Object selectedDrive) {
+ private void initializeLocalFileTreeModelWhenDriveIsSelected(
+ final Object selectedDrive) {
if (selectedDrive == null) {
log.debug("selected drive is null, use the first one");
listLocalDrives.setSelectedIndex(0);
- localFileModel = new LocalFileSystemModel(new LocalFileNode(new File(
- (String) listLocalDrives.getSelectedValue())));
+ localFileModel = new LocalFileSystemModel(new LocalFileNode(
+ new File((String) listLocalDrives.getSelectedValue())));
fileTree.setModel(localFileModel);
} else {
- log.debug("selected drive is not null, create new root based on selection", selectedDrive);
+ log.debug(
+ "selected drive is not null, create new root based on selection",
+ selectedDrive);
listLocalDrives.setSelectedValue(selectedDrive, true);
- localFileModel = new LocalFileSystemModel(new LocalFileNode(new File((String) selectedDrive)));
+ localFileModel = new LocalFileSystemModel(new LocalFileNode(
+ new File((String) selectedDrive)));
fileTree.setModel(localFileModel);
}
@@ -739,13 +794,15 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
List<String> roots = LocalFileUtils.listFileRootsForSystem();
if (roots.isEmpty()) {
- IdropException ie = new IdropException("unable to find any roots on the local file system");
+ IdropException ie = new IdropException(
+ "unable to find any roots on the local file system");
log.error("error building roots on local file system", ie);
showIdropException(ie);
return;
} else if (roots.size() == 1) {
scrollLocalDrives.setVisible(false);
- localFileModel = new LocalFileSystemModel(new LocalFileNode(new File(roots.get(0))));
+ localFileModel = new LocalFileSystemModel(new LocalFileNode(
+ new File(roots.get(0))));
} else {
DefaultListModel listModel = new DefaultListModel();
@@ -772,18 +829,24 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
public void run() {
/*
- * log.debug("refreshing series panel"); Enumeration<TreePath> currentPaths = null; TreePath
- * firstVisibleRow = null; TreePath rootPath = null;
+ * log.debug("refreshing series panel"); Enumeration<TreePath>
+ * currentPaths = null; TreePath firstVisibleRow = null;
+ * TreePath rootPath = null;
*
- * if (getTreeStagingResource() != null) { TreePath[] expandedPaths =
- * TreeUtils.getPaths(getTreeStagingResource(), true); //FIXME: get this code out of idrop and put into
- * iRODS tree log.info("expanded paths:{}", expandedPaths); rootPath = getTreeStagingResource().get
- * getPathForRow(0); // Rectangle nodeRectangle = scrollIrodsTree.getViewport().getViewRect(); //
- * TreeModel treeModel = getTreeStagingResource().getModel(); // TreeNode root = (TreeNode)
- * treeModel.getRoot(); currentPaths = getTreeStagingResource().getExpandedDescendants(rootPath);
- * //firstVisibleRow = getTreeStagingResource().getClosestPathForLocation(0, 0);
- * log.debug("selected tree node, paths are:{}", currentPaths); log.debug("first visible row is:{}",
- * firstVisibleRow); }
+ * if (getTreeStagingResource() != null) { TreePath[]
+ * expandedPaths = TreeUtils.getPaths(getTreeStagingResource(),
+ * true); //FIXME: get this code out of idrop and put into iRODS
+ * tree log.info("expanded paths:{}", expandedPaths); rootPath =
+ * getTreeStagingResource().get getPathForRow(0); // Rectangle
+ * nodeRectangle = scrollIrodsTree.getViewport().getViewRect();
+ * // TreeModel treeModel = getTreeStagingResource().getModel();
+ * // TreeNode root = (TreeNode) treeModel.getRoot();
+ * currentPaths =
+ * getTreeStagingResource().getExpandedDescendants(rootPath);
+ * //firstVisibleRow =
+ * getTreeStagingResource().getClosestPathForLocation(0, 0);
+ * log.debug("selected tree node, paths are:{}", currentPaths);
+ * log.debug("first visible row is:{}", firstVisibleRow); }
*/
CollectionAndDataObjectListingEntry root = new CollectionAndDataObjectListingEntry();
@@ -805,27 +868,32 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
try {
if (irodsTree == null) {
irodsTree = new IRODSTree(gui);
- IRODSNode rootNode = new IRODSNode(root, getIrodsAccount(),
- getiDropCore().getIrodsFileSystem(), irodsTree);
+ IRODSNode rootNode = new IRODSNode(root,
+ getIrodsAccount(), getiDropCore().getIrodsFileSystem(), irodsTree);
irodsTree.setRefreshingTree(true);
// irodsTree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
}
- IRODSNode rootNode = new IRODSNode(root, getIrodsAccount(), getiDropCore().getIrodsFileSystem(),
- irodsTree);
+ IRODSNode rootNode = new IRODSNode(root, getIrodsAccount(),
+ getiDropCore().getIrodsFileSystem(), irodsTree);
- IRODSFileSystemModel irodsFileSystemModel = new IRODSFileSystemModel(rootNode, getIrodsAccount());
- IRODSOutlineModel mdl = new IRODSOutlineModel(gui, irodsFileSystemModel, new IRODSRowModel(), true,
+ IRODSFileSystemModel irodsFileSystemModel = new IRODSFileSystemModel(
+ rootNode, getIrodsAccount());
+ IRODSOutlineModel mdl = new IRODSOutlineModel(gui,
+ irodsFileSystemModel, new IRODSRowModel(), true,
"File System");
irodsTree.setModel(mdl);
/*
* IrodsTreeListenerForBuildingInfoPanel treeListener = new
- * IrodsTreeListenerForBuildingInfoPanel(gui); irodsTree.addTreeExpansionListener(treeListener);
- * irodsTree.addTreeSelectionListener(treeListener); // preset to display root tree node
+ * IrodsTreeListenerForBuildingInfoPanel(gui);
+ * irodsTree.addTreeExpansionListener(treeListener);
+ * irodsTree.addTreeSelectionListener(treeListener); //
+ * preset to display root tree node
* irodsTree.setSelectionRow(0);
*/
} catch (Exception ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE,
+ null, ex);
throw new IdropRuntimeException(ex);
}
@@ -833,18 +901,22 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
/*
* TreePath currentPath;
*
- * if (currentPaths != null) { while (currentPaths.hasMoreElements()) { currentPath = (TreePath)
- * currentPaths.nextElement(); log.debug("expanding tree path:{}", currentPath);
+ * if (currentPaths != null) { while
+ * (currentPaths.hasMoreElements()) { currentPath = (TreePath)
+ * currentPaths.nextElement();
+ * log.debug("expanding tree path:{}", currentPath);
* irodsTree.expandPath(currentPath); } }
*/
irodsTree.setRefreshingTree(false);
- getiDropCore().getIrodsFileSystem().closeAndEatExceptions(iDropCore.getIrodsAccount());
+ getiDropCore().getIrodsFileSystem().closeAndEatExceptions(
+ iDropCore.getIrodsAccount());
}
});
}
- public void initializeInfoPane(final CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry)
+ public void initializeInfoPane(
+ final CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry)
throws IdropException {
if (!toggleIrodsDetails.isSelected()) {
log.info("info display not selected, don't bother");
@@ -874,16 +946,20 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
} else {
log.info("looking up data object to build info panel");
DataObjectAO dataObjectAO = getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory().getDataObjectAO(getIrodsAccount());
- DataObject dataObject = dataObjectAO.findByAbsolutePath(collectionAndDataObjectListingEntry.getParentPath() + "/" + collectionAndDataObjectListingEntry.getPathOrName());
+ DataObject dataObject = dataObjectAO.findByAbsolutePath(collectionAndDataObjectListingEntry.getParentPath()
+ + "/"
+ + collectionAndDataObjectListingEntry.getPathOrName());
initializeInfoPanel(dataObject);
}
} catch (Exception e) {
- log.error("exception building info panel from collection and data object listing entry:{}",
+ log.error(
+ "exception building info panel from collection and data object listing entry:{}",
collectionAndDataObjectListingEntry, e);
throw new IdropRuntimeException(e);
} finally {
- getiDropCore().getIrodsFileSystem().closeAndEatExceptions(getIrodsAccount());
+ getiDropCore().getIrodsFileSystem().closeAndEatExceptions(
+ getIrodsAccount());
idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
@@ -892,13 +968,15 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * Initialize the info panel with data from iRODS. In this case, the data is an iRODS data object (file)
+ * Initialize the info panel with data from iRODS. In this case, the data is
+ * an iRODS data object (file)
*
* @param dataObject
* <code>DataObject</code> iRODS domain object for a file.
* @throws IdropException
*/
- public void initializeInfoPanel(final DataObject dataObject) throws IdropException {
+ public void initializeInfoPanel(final DataObject dataObject)
+ throws IdropException {
if (!toggleIrodsDetails.isSelected()) {
log.info("info display not selected, don't bother");
@@ -925,8 +1003,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
log.debug("getting available tags for data object");
try {
- FreeTaggingService freeTaggingService = FreeTaggingServiceImpl.instance(getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory(), getiDropCore().getIrodsAccount());
- IRODSTagGrouping irodsTagGrouping = freeTaggingService.getTagsForDataObjectInFreeTagForm(dataObject.getCollectionName() + "/" + dataObject.getDataName());
+ FreeTaggingService freeTaggingService = FreeTaggingServiceImpl.instance(getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory(),
+ getiDropCore().getIrodsAccount());
+ IRODSTagGrouping irodsTagGrouping = freeTaggingService.getTagsForDataObjectInFreeTagForm(dataObject.getCollectionName()
+ + "/"
+ + dataObject.getDataName());
txtTags.setText(irodsTagGrouping.getSpaceDelimitedTagsForDomain());
pnlInfoIcon.removeAll();
pnlInfoIcon.add(IconHelper.getFileIcon());
@@ -937,10 +1018,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
lblInfoLengthValue.setVisible(true);
lblInfoLength.setVisible(true);
} catch (JargonException ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE,
+ null, ex);
throw new IdropRuntimeException(ex);
} finally {
- getiDropCore().getIrodsFileSystem().closeAndEatExceptions(getIrodsAccount());
+ getiDropCore().getIrodsFileSystem().closeAndEatExceptions(
+ getIrodsAccount());
idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
@@ -949,12 +1032,14 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * Initialize the info panel with data from iRODS. In this case, the data is an iRODS collection (directory).
+ * Initialize the info panel with data from iRODS. In this case, the data is
+ * an iRODS collection (directory).
*
* @param collection
* @throws IdropException
*/
- public void initializeInfoPanel(final Collection collection) throws IdropException {
+ public void initializeInfoPanel(final Collection collection)
+ throws IdropException {
if (collection == null) {
throw new IdropException("Null collection");
}
@@ -983,7 +1068,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
log.debug("getting available tags for data object");
try {
- FreeTaggingService freeTaggingService = FreeTaggingServiceImpl.instance(getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory(), getIrodsAccount());
+ FreeTaggingService freeTaggingService = FreeTaggingServiceImpl.instance(getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory(),
+ getIrodsAccount());
IRODSTagGrouping irodsTagGrouping = freeTaggingService.getTagsForCollectionInFreeTagForm(collection.getCollectionName());
txtTags.setText(irodsTagGrouping.getSpaceDelimitedTagsForDomain());
pnlInfoIcon.removeAll();
@@ -994,10 +1080,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
lblInfoLengthValue.setVisible(false);
lblInfoLength.setVisible(false);
} catch (JargonException ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE,
+ null, ex);
throw new IdropRuntimeException(ex);
} finally {
- getiDropCore().getIrodsFileSystem().closeAndEatExceptions(getIrodsAccount());
+ getiDropCore().getIrodsFileSystem().closeAndEatExceptions(
+ getIrodsAccount());
idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
@@ -1005,9 +1093,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * Get the JTree component that represents the iRODS file system in the iDrop gui.
+ * Get the JTree component that represents the iRODS file system in the
+ * iDrop gui.
*
- * @return <code>IRODSTree</code> that is the JTree component for the iRODS file system view.
+ * @return <code>IRODSTree</code> that is the JTree component for the iRODS
+ * file system view.
*/
public IRODSTree getIrodsTree() {
return irodsTree;
@@ -1018,761 +1108,837 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * 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.
+ * 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.
*
*/
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
- java.awt.GridBagConstraints gridBagConstraints;
-
- searchTablePopupMenu = new javax.swing.JPopupMenu();
- menuItemShowInHierarchy = new javax.swing.JMenuItem();
- iDropToolbar = new javax.swing.JPanel();
- pnlToolbarSizer = new javax.swing.JPanel();
- pnlTopToolbarSearchArea = new javax.swing.JPanel();
- pnlSearchSizer = new javax.swing.JPanel();
- lblMainSearch = new javax.swing.JLabel();
- comboSearchType = new javax.swing.JComboBox();
- txtMainSearch = new javax.swing.JTextField();
- btnearch = new javax.swing.JButton();
- pnlLocalToggleSizer = new javax.swing.JPanel();
- toggleLocalFiles = new javax.swing.JToggleButton();
- pnlIrodsDetailsToggleSizer = new javax.swing.JPanel();
- toggleIrodsDetails = new javax.swing.JToggleButton();
- pnlIdropMain = new javax.swing.JPanel();
- jSplitPanelLocalRemote = new javax.swing.JSplitPane();
- pnlLocalTreeArea = new javax.swing.JPanel();
- pnlLocalRoots = new javax.swing.JPanel();
- scrollLocalDrives = new javax.swing.JScrollPane();
- listLocalDrives = new javax.swing.JList();
- pnlRefreshButton = new javax.swing.JPanel();
- btnRefreshLocalDrives = new javax.swing.JButton();
- pnlDrivesFiller = new javax.swing.JPanel();
- scrollLocalFileTree = new javax.swing.JScrollPane();
- pnlIrodsArea = new javax.swing.JPanel();
- splitTargetCollections = new javax.swing.JSplitPane();
- tabIrodsViews = new javax.swing.JTabbedPane();
- pnlTabHierarchicalView = new javax.swing.JPanel();
- pnlIrodsTreeToolbar = new javax.swing.JPanel();
- btnRefreshTargetTree = new javax.swing.JButton();
- pnlIrodsTreeMaster = new javax.swing.JPanel();
- scrollIrodsTree = new javax.swing.JScrollPane();
- pnlTabSearch = new javax.swing.JPanel();
- pnlTabSearchTop = new javax.swing.JPanel();
- pnlTabSearchResults = new javax.swing.JPanel();
- scrollPaneSearchResults = new javax.swing.JScrollPane();
- tableSearchResults = new javax.swing.JTable();
- pnlIrodsInfo = new javax.swing.JPanel();
- pnlIrodsInfoInner = new javax.swing.JPanel();
- pnlFileIconSizer = new javax.swing.JPanel();
- pnlInfoIcon = new javax.swing.JPanel();
- pnlFileNameAndIcon = new javax.swing.JPanel();
- lblFileOrCollectionName = new javax.swing.JLabel();
- pnlInfoCollectionParent = new javax.swing.JPanel();
- lblFileParent = new javax.swing.JLabel();
- scrollParentPath = new javax.swing.JScrollPane();
- txtParentPath = new javax.swing.JTextArea();
- pnlInfoComment = new javax.swing.JPanel();
- lblComment = new javax.swing.JLabel();
- scrollComment = new javax.swing.JScrollPane();
- txtComment = new javax.swing.JTextArea();
- pnlInfoTags = new javax.swing.JPanel();
- lblTags = new javax.swing.JLabel();
- txtTags = new javax.swing.JTextField();
- pnlInfoButton = new javax.swing.JPanel();
- btnUpdateInfo = new javax.swing.JButton();
- pnlInfoDetails = new javax.swing.JPanel();
- lblInfoCreatedAt = new javax.swing.JLabel();
- lblInfoCreatedAtValue = new javax.swing.JLabel();
- lblInfoUpdatedAt = new javax.swing.JLabel();
- lblInfoUpdatedAtValue = new javax.swing.JLabel();
- lblInfoLength = new javax.swing.JLabel();
- lblInfoLengthValue = new javax.swing.JLabel();
- pnlToolbarInfo = new javax.swing.JPanel();
- toolBarInfo = new javax.swing.JToolBar();
- btnViewMetadata = new javax.swing.JButton();
- btnReplication = new javax.swing.JButton();
- separator1 = new javax.swing.JToolBar.Separator();
- btnMoveToTrash = new javax.swing.JButton();
- separator2 = new javax.swing.JToolBar.Separator();
- pnlIdropBottom = new javax.swing.JPanel();
- userNameLabel = new javax.swing.JLabel();
- pnlTransferOverview = new javax.swing.JPanel();
- pnlTransferStatus = new javax.swing.JPanel();
- pnlTransferType = new javax.swing.JPanel();
- lblTransferTypeLabel = new javax.swing.JLabel();
- lblTransferType = new javax.swing.JLabel();
- pnlTransferFileCounts = new javax.swing.JPanel();
- lblTransferFilesCounts = new javax.swing.JLabel();
- pnlTransferByteCounts = new javax.swing.JPanel();
- lblTransferByteCounts = new javax.swing.JLabel();
- pnlTransferFileInfo = new javax.swing.JPanel();
- lblCurrentFileLabel = new javax.swing.JLabel();
- lblCurrentFile = new javax.swing.JLabel();
- transferStatusProgressBar = new javax.swing.JProgressBar();
- transferQueueToolbarPanel = new javax.swing.JPanel();
- idropProgressPanelToolbar = new javax.swing.JToolBar();
- btnShowTransferManager = new javax.swing.JButton();
- togglePauseTransfer = new javax.swing.JToggleButton();
- pnlIdropProgressIcon = new javax.swing.JPanel();
- progressIconImageLabel = new javax.swing.JLabel();
- jMenuBar1 = new javax.swing.JMenuBar();
- jMenuFile = new javax.swing.JMenu();
- jMenuItemExit = new javax.swing.JMenuItem();
- jMenuEdit = new javax.swing.JMenu();
- jMenuView = new javax.swing.JMenu();
- jCheckBoxMenuItemShowSourceTree = new javax.swing.JCheckBoxMenuItem();
- jCheckBoxMenuItemShowIrodsInfo = new javax.swing.JCheckBoxMenuItem();
-
- menuItemShowInHierarchy.setText("Show in iRODS");
- menuItemShowInHierarchy.setToolTipText("Show this file or collection in the iRODS hierarchy");
- menuItemShowInHierarchy.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- menuItemShowInHierarchyActionPerformed(evt);
- }
- });
- searchTablePopupMenu.add(menuItemShowInHierarchy);
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("iDrop - iRODS Cloud Browser");
- setMinimumSize(new java.awt.Dimension(600, 600));
- addWindowListener(new java.awt.event.WindowAdapter() {
- public void windowClosed(java.awt.event.WindowEvent evt) {
- formWindowClosed(evt);
- }
- });
-
- iDropToolbar.setMinimumSize(new java.awt.Dimension(800, 400));
- iDropToolbar.setPreferredSize(new java.awt.Dimension(1077, 40));
- iDropToolbar.setLayout(new java.awt.BorderLayout());
-
- pnlToolbarSizer.setLayout(new java.awt.BorderLayout());
-
- pnlTopToolbarSearchArea.setMinimumSize(new java.awt.Dimension(45, 50));
- pnlTopToolbarSearchArea.setLayout(new java.awt.BorderLayout());
-
- pnlSearchSizer.setMinimumSize(new java.awt.Dimension(74, 30));
- pnlSearchSizer.setPreferredSize(new java.awt.Dimension(254, 50));
- pnlSearchSizer.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- lblMainSearch.setText("Search:");
- lblMainSearch.setMaximumSize(null);
- lblMainSearch.setMinimumSize(null);
- lblMainSearch.setPreferredSize(new java.awt.Dimension(45, 40));
- pnlSearchSizer.add(lblMainSearch);
-
- comboSearchType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "by name", "by tag", "by name and tag" }));
- comboSearchType.setToolTipText("Select the type of search to be carried out using the supplied search string");
- pnlSearchSizer.add(comboSearchType);
-
- txtMainSearch.setColumns(20);
- txtMainSearch.setToolTipText("Search for files or tags");
- txtMainSearch.setMinimumSize(null);
- txtMainSearch.setPreferredSize(new java.awt.Dimension(100, 30));
- txtMainSearch.addKeyListener(new java.awt.event.KeyAdapter() {
- public void keyPressed(java.awt.event.KeyEvent evt) {
- txtMainSearchKeyPressed(evt);
- }
- });
- pnlSearchSizer.add(txtMainSearch);
-
- btnearch.setMnemonic('s');
- btnearch.setText("Search");
- btnearch.setToolTipText("Search iRODS based on the current view selected");
- btnearch.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnearchActionPerformed(evt);
- }
- });
- pnlSearchSizer.add(btnearch);
-
- pnlTopToolbarSearchArea.add(pnlSearchSizer, java.awt.BorderLayout.SOUTH);
-
- pnlToolbarSizer.add(pnlTopToolbarSearchArea, java.awt.BorderLayout.CENTER);
-
- pnlLocalToggleSizer.setLayout(new java.awt.BorderLayout());
-
- toggleLocalFiles.setText("<<< Local Files");
- toggleLocalFiles.setToolTipText("Browse the local file system.");
- toggleLocalFiles.setMaximumSize(new java.awt.Dimension(144, 10));
- toggleLocalFiles.setMinimumSize(new java.awt.Dimension(144, 10));
- toggleLocalFiles.setPreferredSize(new java.awt.Dimension(144, 30));
- toggleLocalFiles.addChangeListener(new javax.swing.event.ChangeListener() {
- public void stateChanged(javax.swing.event.ChangeEvent evt) {
- toggleLocalFilesStateChanged(evt);
- }
- });
- toggleLocalFiles.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- toggleLocalFilesActionPerformed(evt);
- }
- });
- pnlLocalToggleSizer.add(toggleLocalFiles, java.awt.BorderLayout.NORTH);
- toggleLocalFiles.getAccessibleContext().setAccessibleName("<<< Local Files ");
-
- pnlToolbarSizer.add(pnlLocalToggleSizer, java.awt.BorderLayout.WEST);
-
- pnlIrodsDetailsToggleSizer.setLayout(new java.awt.BorderLayout());
-
- toggleIrodsDetails.setToolTipText("Browse the local file system.");
- toggleIrodsDetails.setLabel("iRODS Info >>>>");
- toggleIrodsDetails.setMaximumSize(new java.awt.Dimension(144, 10));
- toggleIrodsDetails.setMinimumSize(new java.awt.Dimension(144, 10));
- toggleIrodsDetails.setPreferredSize(new java.awt.Dimension(144, 30));
- toggleIrodsDetails.addChangeListener(new javax.swing.event.ChangeListener() {
- public void stateChanged(javax.swing.event.ChangeEvent evt) {
- toggleIrodsDetailsStateChanged(evt);
- }
- });
- toggleIrodsDetails.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- toggleIrodsDetailsActionPerformed(evt);
- }
- });
- pnlIrodsDetailsToggleSizer.add(toggleIrodsDetails, java.awt.BorderLayout.NORTH);
- toggleIrodsDetails.getAccessibleContext().setAccessibleName("");
-
- pnlToolbarSizer.add(pnlIrodsDetailsToggleSizer, java.awt.BorderLayout.EAST);
-
- iDropToolbar.add(pnlToolbarSizer, java.awt.BorderLayout.NORTH);
-
- getContentPane().add(iDropToolbar, java.awt.BorderLayout.NORTH);
-
- pnlIdropMain.setPreferredSize(new java.awt.Dimension(500, 300));
- pnlIdropMain.setLayout(new javax.swing.BoxLayout(pnlIdropMain, javax.swing.BoxLayout.PAGE_AXIS));
-
- jSplitPanelLocalRemote.setBorder(null);
- jSplitPanelLocalRemote.setDividerLocation(250);
- jSplitPanelLocalRemote.setDividerSize(30);
- jSplitPanelLocalRemote.setMaximumSize(null);
- jSplitPanelLocalRemote.setPreferredSize(new java.awt.Dimension(0, 0));
-
- pnlLocalTreeArea.setBackground(new java.awt.Color(153, 255, 102));
- pnlLocalTreeArea.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
- pnlLocalTreeArea.setMinimumSize(new java.awt.Dimension(0, 0));
- pnlLocalTreeArea.setOpaque(false);
- pnlLocalTreeArea.setPreferredSize(new java.awt.Dimension(0, 0));
- pnlLocalTreeArea.setLayout(new java.awt.BorderLayout());
-
- pnlLocalRoots.setMinimumSize(new java.awt.Dimension(0, 0));
- pnlLocalRoots.setLayout(new java.awt.BorderLayout());
-
- scrollLocalDrives.setMaximumSize(null);
- scrollLocalDrives.setMinimumSize(new java.awt.Dimension(0, 0));
- scrollLocalDrives.setPreferredSize(new java.awt.Dimension(300, 100));
-
- listLocalDrives.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
- listLocalDrives.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
- listLocalDrives.setMaximumSize(null);
- listLocalDrives.setPreferredSize(new java.awt.Dimension(150, 200));
- listLocalDrives.setVisibleRowCount(4);
- scrollLocalDrives.setViewportView(listLocalDrives);
-
- pnlLocalRoots.add(scrollLocalDrives, java.awt.BorderLayout.CENTER);
-
- pnlRefreshButton.setMaximumSize(new java.awt.Dimension(1000, 30));
- pnlRefreshButton.setMinimumSize(new java.awt.Dimension(0, 0));
- pnlRefreshButton.setPreferredSize(new java.awt.Dimension(101, 30));
-
- btnRefreshLocalDrives.setLabel("Refresh");
- btnRefreshLocalDrives.setMaximumSize(new java.awt.Dimension(200, 50));
- btnRefreshLocalDrives.setMinimumSize(new java.awt.Dimension(0, 0));
- btnRefreshLocalDrives.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnRefreshLocalDrivesActionPerformed(evt);
- }
- });
- pnlRefreshButton.add(btnRefreshLocalDrives);
-
- pnlLocalRoots.add(pnlRefreshButton, java.awt.BorderLayout.NORTH);
- pnlLocalRoots.add(pnlDrivesFiller, java.awt.BorderLayout.SOUTH);
-
- pnlLocalTreeArea.add(pnlLocalRoots, java.awt.BorderLayout.NORTH);
-
- scrollLocalFileTree.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
- scrollLocalFileTree.setBorder(null);
- scrollLocalFileTree.setToolTipText("scroll panel tooltip");
- scrollLocalFileTree.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
- scrollLocalFileTree.setMaximumSize(null);
- scrollLocalFileTree.setMinimumSize(new java.awt.Dimension(0, 0));
- scrollLocalFileTree.setPreferredSize(new java.awt.Dimension(500, 500));
- pnlLocalTreeArea.add(scrollLocalFileTree, java.awt.BorderLayout.CENTER);
-
- jSplitPanelLocalRemote.setLeftComponent(pnlLocalTreeArea);
-
- pnlIrodsArea.setMinimumSize(new java.awt.Dimension(500, 300));
- pnlIrodsArea.setPreferredSize(new java.awt.Dimension(600, 304));
- pnlIrodsArea.setLayout(new java.awt.BorderLayout());
-
- splitTargetCollections.setDividerLocation(400);
- splitTargetCollections.setMinimumSize(new java.awt.Dimension(0, 0));
-
- tabIrodsViews.setMinimumSize(new java.awt.Dimension(200, 129));
- tabIrodsViews.setPreferredSize(new java.awt.Dimension(350, 300));
- tabIrodsViews.addChangeListener(new javax.swing.event.ChangeListener() {
- public void stateChanged(javax.swing.event.ChangeEvent evt) {
- tabIrodsViewsStateChanged(evt);
- }
- });
-
- pnlTabHierarchicalView.setLayout(new java.awt.BorderLayout());
-
- btnRefreshTargetTree.setMnemonic('r');
- btnRefreshTargetTree.setText("Refresh");
- btnRefreshTargetTree.setToolTipText("Refresh the view of the iRODS server");
- btnRefreshTargetTree.setFocusable(false);
- btnRefreshTargetTree.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnRefreshTargetTree.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnRefreshTargetTree.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnRefreshTargetTreeActionPerformed(evt);
- }
- });
- pnlIrodsTreeToolbar.add(btnRefreshTargetTree);
-
- pnlTabHierarchicalView.add(pnlIrodsTreeToolbar, java.awt.BorderLayout.NORTH);
-
- pnlIrodsTreeMaster.setLayout(new java.awt.BorderLayout());
- pnlIrodsTreeMaster.add(scrollIrodsTree, java.awt.BorderLayout.CENTER);
-
- pnlTabHierarchicalView.add(pnlIrodsTreeMaster, java.awt.BorderLayout.CENTER);
-
- tabIrodsViews.addTab("iRODS Tree View", pnlTabHierarchicalView);
-
- pnlTabSearch.setToolTipText("Search for files and collections in iRODS and display search results");
- pnlTabSearch.setLayout(new java.awt.BorderLayout());
- pnlTabSearch.add(pnlTabSearchTop, java.awt.BorderLayout.NORTH);
-
- pnlTabSearchResults.setLayout(new java.awt.GridLayout(1, 0));
-
- tableSearchResults.setModel(new javax.swing.table.DefaultTableModel(
- new Object [][] {
- {null, null, null, null},
- {null, null, null, null},
- {null, null, null, null},
- {null, null, null, null}
- },
- new String [] {
- "Title 1", "Title 2", "Title 3", "Title 4"
- }
- ));
- scrollPaneSearchResults.setViewportView(tableSearchResults);
-
- pnlTabSearchResults.add(scrollPaneSearchResults);
-
- pnlTabSearch.add(pnlTabSearchResults, java.awt.BorderLayout.CENTER);
-
- tabIrodsViews.addTab("Search", null, pnlTabSearch, "Search for files and collections in iRODS and display search results");
-
- splitTargetCollections.setLeftComponent(tabIrodsViews);
-
- pnlIrodsInfo.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 15, 10, 15));
- pnlIrodsInfo.setMinimumSize(new java.awt.Dimension(300, 708));
- pnlIrodsInfo.setLayout(new java.awt.BorderLayout());
-
- pnlIrodsInfoInner.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
- pnlIrodsInfoInner.setToolTipText("Information on selected iRODS file or collection");
- pnlIrodsInfoInner.setLayout(new java.awt.GridBagLayout());
-
- pnlFileIconSizer.setMinimumSize(new java.awt.Dimension(80, 40));
- pnlFileIconSizer.setLayout(new java.awt.BorderLayout());
-
- pnlInfoIcon.setMaximumSize(new java.awt.Dimension(50, 50));
- pnlInfoIcon.setLayout(new java.awt.GridLayout(1, 0));
- pnlFileIconSizer.add(pnlInfoIcon, java.awt.BorderLayout.WEST);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.weightx = 0.8;
- pnlIrodsInfoInner.add(pnlFileIconSizer, gridBagConstraints);
-
- pnlFileNameAndIcon.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
- pnlFileNameAndIcon.setMinimumSize(new java.awt.Dimension(100, 100));
- pnlFileNameAndIcon.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 5));
-
- lblFileOrCollectionName.setMinimumSize(new java.awt.Dimension(80, 16));
- pnlFileNameAndIcon.add(lblFileOrCollectionName);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- gridBagConstraints.weightx = 0.8;
- gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
- pnlIrodsInfoInner.add(pnlFileNameAndIcon, gridBagConstraints);
-
- pnlInfoCollectionParent.setLayout(new java.awt.BorderLayout());
-
- lblFileParent.setText("Parent path of file:");
- pnlInfoCollectionParent.add(lblFileParent, java.awt.BorderLayout.NORTH);
- lblFileParent.getAccessibleContext().setAccessibleDescription("The path of the parent of the file or collection");
-
- scrollParentPath.setMinimumSize(new java.awt.Dimension(100, 100));
-
- txtParentPath.setEditable(false);
- txtParentPath.setMaximumSize(null);
- txtParentPath.setMinimumSize(new java.awt.Dimension(600, 100));
- scrollParentPath.setViewportView(txtParentPath);
-
- pnlInfoCollectionParent.add(scrollParentPath, java.awt.BorderLayout.CENTER);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- gridBagConstraints.weightx = 0.8;
- gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
- pnlIrodsInfoInner.add(pnlInfoCollectionParent, gridBagConstraints);
-
- pnlInfoComment.setLayout(new java.awt.BorderLayout());
-
- lblComment.setText("Comment:");
- lblComment.setToolTipText("");
- pnlInfoComment.add(lblComment, java.awt.BorderLayout.NORTH);
- lblComment.getAccessibleContext().setAccessibleDescription("lable for comment area");
-
- scrollComment.setMinimumSize(null);
- scrollComment.setPreferredSize(new java.awt.Dimension(388, 84));
-
- txtComment.setMaximumSize(null);
- txtComment.setMinimumSize(null);
- txtComment.setPreferredSize(null);
- scrollComment.setViewportView(txtComment);
-
- pnlInfoComment.add(scrollComment, java.awt.BorderLayout.CENTER);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlIrodsInfoInner.add(pnlInfoComment, gridBagConstraints);
-
- pnlInfoTags.setLayout(new java.awt.BorderLayout());
-
- lblTags.setText("Tags:");
- lblTags.setToolTipText("");
- pnlInfoTags.add(lblTags, java.awt.BorderLayout.NORTH);
- lblTags.getAccessibleContext().setAccessibleName("Tags");
- lblTags.getAccessibleContext().setAccessibleDescription("Label for free tagging area");
-
- txtTags.setColumns(30);
- txtTags.setToolTipText("Name of file or collection. This field allows editing to rename");
- txtTags.setMinimumSize(null);
- txtTags.setPreferredSize(null);
- txtTags.addFocusListener(new java.awt.event.FocusAdapter() {
- public void focusLost(java.awt.event.FocusEvent evt) {
- txtTagsFocusLost(evt);
- }
- });
- txtTags.addKeyListener(new java.awt.event.KeyAdapter() {
- public void keyPressed(java.awt.event.KeyEvent evt) {
- txtTagsKeyPressed(evt);
- }
- });
- pnlInfoTags.add(txtTags, java.awt.BorderLayout.PAGE_END);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- gridBagConstraints.weightx = 0.8;
- pnlIrodsInfoInner.add(pnlInfoTags, gridBagConstraints);
-
- pnlInfoButton.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnUpdateInfo.setMnemonic('I');
- btnUpdateInfo.setText("Update Info");
- btnUpdateInfo.setToolTipText("Update information on the info panel such as tags and comment");
- btnUpdateInfo.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnUpdateInfoActionPerformed(evt);
- }
- });
- pnlInfoButton.add(btnUpdateInfo);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- gridBagConstraints.weightx = 0.1;
- pnlIrodsInfoInner.add(pnlInfoButton, gridBagConstraints);
-
- pnlInfoDetails.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
- pnlInfoDetails.setLayout(new java.awt.GridBagLayout());
-
- lblInfoCreatedAt.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
- lblInfoCreatedAt.setText("Created:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlInfoDetails.add(lblInfoCreatedAt, gridBagConstraints);
-
- lblInfoCreatedAtValue.setText("XXXXXX");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlInfoDetails.add(lblInfoCreatedAtValue, gridBagConstraints);
-
- lblInfoUpdatedAt.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
- lblInfoUpdatedAt.setText("Updated:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlInfoDetails.add(lblInfoUpdatedAt, gridBagConstraints);
-
- lblInfoUpdatedAtValue.setText("XXXXXX");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlInfoDetails.add(lblInfoUpdatedAtValue, gridBagConstraints);
-
- lblInfoLength.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
- lblInfoLength.setText("Length:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlInfoDetails.add(lblInfoLength, gridBagConstraints);
-
- lblInfoLengthValue.setText("XXXXXX");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlInfoDetails.add(lblInfoLengthValue, gridBagConstraints);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- gridBagConstraints.weightx = 0.8;
- gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 0);
- pnlIrodsInfoInner.add(pnlInfoDetails, gridBagConstraints);
-
- pnlToolbarInfo.setMinimumSize(new java.awt.Dimension(300, 200));
- pnlToolbarInfo.setLayout(new java.awt.BorderLayout());
-
- toolBarInfo.setRollover(true);
-
- btnViewMetadata.setText("Metadata");
- btnViewMetadata.setFocusable(false);
- btnViewMetadata.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnViewMetadata.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnViewMetadata.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnViewMetadataActionPerformed(evt);
- }
- });
- toolBarInfo.add(btnViewMetadata);
-
- btnReplication.setText("Replication");
- btnReplication.setFocusable(false);
- btnReplication.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnReplication.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnReplication.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnReplicationActionPerformed(evt);
- }
- });
- toolBarInfo.add(btnReplication);
- toolBarInfo.add(separator1);
-
- btnMoveToTrash.setText("Move to Trash");
- btnMoveToTrash.setFocusable(false);
- btnMoveToTrash.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnMoveToTrash.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- toolBarInfo.add(btnMoveToTrash);
-
- separator2.setMinimumSize(new java.awt.Dimension(50, 1));
- toolBarInfo.add(separator2);
-
- pnlToolbarInfo.add(toolBarInfo, java.awt.BorderLayout.NORTH);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 7;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- gridBagConstraints.weightx = 0.8;
- pnlIrodsInfoInner.add(pnlToolbarInfo, gridBagConstraints);
-
- pnlIrodsInfo.add(pnlIrodsInfoInner, java.awt.BorderLayout.CENTER);
- pnlIrodsInfoInner.getAccessibleContext().setAccessibleName("info panel");
-
- splitTargetCollections.setRightComponent(pnlIrodsInfo);
-
- pnlIrodsArea.add(splitTargetCollections, java.awt.BorderLayout.CENTER);
-
- jSplitPanelLocalRemote.setRightComponent(pnlIrodsArea);
-
- pnlIdropMain.add(jSplitPanelLocalRemote);
-
- getContentPane().add(pnlIdropMain, java.awt.BorderLayout.CENTER);
-
- pnlIdropBottom.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
- pnlIdropBottom.setToolTipText("Display area for status and messages");
- pnlIdropBottom.setLayout(new java.awt.GridBagLayout());
-
- userNameLabel.setText("usernamelabel");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.weightx = 0.005;
- pnlIdropBottom.add(userNameLabel, gridBagConstraints);
-
- pnlTransferOverview.setLayout(new java.awt.BorderLayout());
-
- lblTransferTypeLabel.setText("Transfer Type:");
- pnlTransferType.add(lblTransferTypeLabel);
-
- lblTransferType.setText(" ");
- pnlTransferType.add(lblTransferType);
-
- pnlTransferStatus.add(pnlTransferType);
-
- lblTransferFilesCounts.setText("Files: /");
- pnlTransferFileCounts.add(lblTransferFilesCounts);
-
- pnlTransferStatus.add(pnlTransferFileCounts);
-
- lblTransferByteCounts.setText("Bytes (total): /");
- pnlTransferByteCounts.add(lblTransferByteCounts);
-
- pnlTransferStatus.add(pnlTransferByteCounts);
-
- pnlTransferOverview.add(pnlTransferStatus, java.awt.BorderLayout.NORTH);
-
- pnlTransferFileInfo.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
-
- lblCurrentFileLabel.setText("Current File:");
- pnlTransferFileInfo.add(lblCurrentFileLabel);
- pnlTransferFileInfo.add(lblCurrentFile);
-
- pnlTransferOverview.add(pnlTransferFileInfo, java.awt.BorderLayout.CENTER);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.gridwidth = 35;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlIdropBottom.add(pnlTransferOverview, gridBagConstraints);
-
- transferStatusProgressBar.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
- transferStatusProgressBar.setStringPainted(true);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- gridBagConstraints.weightx = 8.0;
- pnlIdropBottom.add(transferStatusProgressBar, gridBagConstraints);
-
- transferQueueToolbarPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
-
- idropProgressPanelToolbar.setRollover(true);
-
- btnShowTransferManager.setText("Manage");
- btnShowTransferManager.setToolTipText("Show a panel to manage transfers");
- btnShowTransferManager.setFocusable(false);
- btnShowTransferManager.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnShowTransferManager.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- btnShowTransferManager.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnShowTransferManagerActionPerformed(evt);
- }
- });
- idropProgressPanelToolbar.add(btnShowTransferManager);
-
- togglePauseTransfer.setText("Pause");
- togglePauseTransfer.setToolTipText("Pause the current transfer");
- togglePauseTransfer.setFocusable(false);
- togglePauseTransfer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- togglePauseTransfer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- togglePauseTransfer.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- togglePauseTransferActionPerformed(evt);
- }
- });
- idropProgressPanelToolbar.add(togglePauseTransfer);
-
- transferQueueToolbarPanel.add(idropProgressPanelToolbar);
-
- pnlIdropProgressIcon.add(progressIconImageLabel);
-
- transferQueueToolbarPanel.add(pnlIdropProgressIcon);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 34;
- gridBagConstraints.gridy = 1;
- pnlIdropBottom.add(transferQueueToolbarPanel, gridBagConstraints);
-
- getContentPane().add(pnlIdropBottom, java.awt.BorderLayout.SOUTH);
-
- jMenuFile.setMnemonic('f');
- jMenuFile.setText("File");
-
- jMenuItemExit.setMnemonic('x');
- jMenuItemExit.setText("Exit");
- jMenuItemExit.setToolTipText("Close the iDROP console window");
- jMenuItemExit.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jMenuItemExitActionPerformed(evt);
- }
- });
- jMenuFile.add(jMenuItemExit);
-
- jMenuBar1.add(jMenuFile);
-
- jMenuEdit.setMnemonic('E');
- jMenuEdit.setText("Edit");
- jMenuBar1.add(jMenuEdit);
-
- jMenuView.setMnemonic('V');
- jMenuView.setText("View");
-
- jCheckBoxMenuItemShowSourceTree.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK));
- jCheckBoxMenuItemShowSourceTree.setMnemonic('L');
- jCheckBoxMenuItemShowSourceTree.setText("Show Local");
- jCheckBoxMenuItemShowSourceTree.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jCheckBoxMenuItemShowSourceTreeActionPerformed(evt);
- }
- });
- jMenuView.add(jCheckBoxMenuItemShowSourceTree);
-
- jCheckBoxMenuItemShowIrodsInfo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK));
- jCheckBoxMenuItemShowIrodsInfo.setMnemonic('I');
- jCheckBoxMenuItemShowIrodsInfo.setText("Show iRODS Info");
- jCheckBoxMenuItemShowIrodsInfo.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jCheckBoxMenuItemShowIrodsInfoActionPerformed(evt);
- }
- });
- jMenuView.add(jCheckBoxMenuItemShowIrodsInfo);
-
- jMenuBar1.add(jMenuView);
-
- setJMenuBar(jMenuBar1);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnShowTransferManagerActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnShowTransferManagerActionPerformed
+ // <editor-fold defaultstate="collapsed"
+ // desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ searchTablePopupMenu = new javax.swing.JPopupMenu();
+ menuItemShowInHierarchy = new javax.swing.JMenuItem();
+ iDropToolbar = new javax.swing.JPanel();
+ pnlToolbarSizer = new javax.swing.JPanel();
+ pnlTopToolbarSearchArea = new javax.swing.JPanel();
+ pnlSearchSizer = new javax.swing.JPanel();
+ lblMainSearch = new javax.swing.JLabel();
+ comboSearchType = new javax.swing.JComboBox();
+ txtMainSearch = new javax.swing.JTextField();
+ btnearch = new javax.swing.JButton();
+ pnlLocalToggleSizer = new javax.swing.JPanel();
+ toggleLocalFiles = new javax.swing.JToggleButton();
+ pnlIrodsDetailsToggleSizer = new javax.swing.JPanel();
+ toggleIrodsDetails = new javax.swing.JToggleButton();
+ pnlIdropMain = new javax.swing.JPanel();
+ jSplitPanelLocalRemote = new javax.swing.JSplitPane();
+ pnlLocalTreeArea = new javax.swing.JPanel();
+ pnlLocalRoots = new javax.swing.JPanel();
+ scrollLocalDrives = new javax.swing.JScrollPane();
+ listLocalDrives = new javax.swing.JList();
+ pnlRefreshButton = new javax.swing.JPanel();
+ btnRefreshLocalDrives = new javax.swing.JButton();
+ pnlDrivesFiller = new javax.swing.JPanel();
+ scrollLocalFileTree = new javax.swing.JScrollPane();
+ pnlIrodsArea = new javax.swing.JPanel();
+ splitTargetCollections = new javax.swing.JSplitPane();
+ tabIrodsViews = new javax.swing.JTabbedPane();
+ pnlTabHierarchicalView = new javax.swing.JPanel();
+ pnlIrodsTreeToolbar = new javax.swing.JPanel();
+ btnRefreshTargetTree = new javax.swing.JButton();
+ pnlIrodsTreeMaster = new javax.swing.JPanel();
+ scrollIrodsTree = new javax.swing.JScrollPane();
+ pnlTabSearch = new javax.swing.JPanel();
+ pnlTabSearchTop = new javax.swing.JPanel();
+ pnlTabSearchResults = new javax.swing.JPanel();
+ scrollPaneSearchResults = new javax.swing.JScrollPane();
+ tableSearchResults = new javax.swing.JTable();
+ pnlIrodsInfo = new javax.swing.JPanel();
+ pnlIrodsInfoInner = new javax.swing.JPanel();
+ pnlFileIconSizer = new javax.swing.JPanel();
+ pnlInfoIcon = new javax.swing.JPanel();
+ pnlFileNameAndIcon = new javax.swing.JPanel();
+ lblFileOrCollectionName = new javax.swing.JLabel();
+ pnlInfoCollectionParent = new javax.swing.JPanel();
+ lblFileParent = new javax.swing.JLabel();
+ scrollParentPath = new javax.swing.JScrollPane();
+ txtParentPath = new javax.swing.JTextArea();
+ pnlInfoComment = new javax.swing.JPanel();
+ lblComment = new javax.swing.JLabel();
+ scrollComment = new javax.swing.JScrollPane();
+ txtComment = new javax.swing.JTextArea();
+ pnlInfoTags = new javax.swing.JPanel();
+ lblTags = new javax.swing.JLabel();
+ txtTags = new javax.swing.JTextField();
+ pnlInfoButton = new javax.swing.JPanel();
+ btnUpdateInfo = new javax.swing.JButton();
+ pnlInfoDetails = new javax.swing.JPanel();
+ lblInfoCreatedAt = new javax.swing.JLabel();
+ lblInfoCreatedAtValue = new javax.swing.JLabel();
+ lblInfoUpdatedAt = new javax.swing.JLabel();
+ lblInfoUpdatedAtValue = new javax.swing.JLabel();
+ lblInfoLength = new javax.swing.JLabel();
+ lblInfoLengthValue = new javax.swing.JLabel();
+ pnlToolbarInfo = new javax.swing.JPanel();
+ toolBarInfo = new javax.swing.JToolBar();
+ btnViewMetadata = new javax.swing.JButton();
+ btnReplication = new javax.swing.JButton();
+ separator1 = new javax.swing.JToolBar.Separator();
+ btnMoveToTrash = new javax.swing.JButton();
+ separator2 = new javax.swing.JToolBar.Separator();
+ pnlIdropBottom = new javax.swing.JPanel();
+ userNameLabel = new javax.swing.JLabel();
+ pnlTransferOverview = new javax.swing.JPanel();
+ pnlTransferStatus = new javax.swing.JPanel();
+ pnlTransferType = new javax.swing.JPanel();
+ lblTransferTypeLabel = new javax.swing.JLabel();
+ lblTransferType = new javax.swing.JLabel();
+ pnlTransferFileCounts = new javax.swing.JPanel();
+ lblTransferFilesCounts = new javax.swing.JLabel();
+ pnlTransferByteCounts = new javax.swing.JPanel();
+ lblTransferByteCounts = new javax.swing.JLabel();
+ pnlTransferFileInfo = new javax.swing.JPanel();
+ lblCurrentFileLabel = new javax.swing.JLabel();
+ lblCurrentFile = new javax.swing.JLabel();
+ transferStatusProgressBar = new javax.swing.JProgressBar();
+ transferQueueToolbarPanel = new javax.swing.JPanel();
+ idropProgressPanelToolbar = new javax.swing.JToolBar();
+ btnShowTransferManager = new javax.swing.JButton();
+ togglePauseTransfer = new javax.swing.JToggleButton();
+ pnlIdropProgressIcon = new javax.swing.JPanel();
+ progressIconImageLabel = new javax.swing.JLabel();
+ jMenuBar1 = new javax.swing.JMenuBar();
+ jMenuFile = new javax.swing.JMenu();
+ jMenuItemExit = new javax.swing.JMenuItem();
+ jMenuEdit = new javax.swing.JMenu();
+ jMenuView = new javax.swing.JMenu();
+ jCheckBoxMenuItemShowSourceTree = new javax.swing.JCheckBoxMenuItem();
+ jCheckBoxMenuItemShowIrodsInfo = new javax.swing.JCheckBoxMenuItem();
+
+ menuItemShowInHierarchy.setText("Show in iRODS");
+ menuItemShowInHierarchy
+ .setToolTipText("Show this file or collection in the iRODS hierarchy");
+ menuItemShowInHierarchy
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ menuItemShowInHierarchyActionPerformed(evt);
+ }
+ });
+ searchTablePopupMenu.add(menuItemShowInHierarchy);
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDrop - iRODS Cloud Browser");
+ setMinimumSize(new java.awt.Dimension(600, 600));
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosed(final java.awt.event.WindowEvent evt) {
+ formWindowClosed(evt);
+ }
+ });
+
+ iDropToolbar.setMinimumSize(new java.awt.Dimension(800, 400));
+ iDropToolbar.setPreferredSize(new java.awt.Dimension(1077, 40));
+ iDropToolbar.setLayout(new java.awt.BorderLayout());
+
+ pnlToolbarSizer.setLayout(new java.awt.BorderLayout());
+
+ pnlTopToolbarSearchArea.setMinimumSize(new java.awt.Dimension(45, 50));
+ pnlTopToolbarSearchArea.setLayout(new java.awt.BorderLayout());
+
+ pnlSearchSizer.setMinimumSize(new java.awt.Dimension(74, 30));
+ pnlSearchSizer.setPreferredSize(new java.awt.Dimension(254, 50));
+ pnlSearchSizer.setLayout(new java.awt.FlowLayout(
+ java.awt.FlowLayout.RIGHT));
+
+ lblMainSearch.setText("Search:");
+ lblMainSearch.setMaximumSize(null);
+ lblMainSearch.setMinimumSize(null);
+ lblMainSearch.setPreferredSize(new java.awt.Dimension(45, 40));
+ pnlSearchSizer.add(lblMainSearch);
+
+ comboSearchType.setModel(new javax.swing.DefaultComboBoxModel(
+ new String[] { "by name", "by tag", "by name and tag" }));
+ comboSearchType
+ .setToolTipText("Select the type of search to be carried out using the supplied search string");
+ pnlSearchSizer.add(comboSearchType);
+
+ txtMainSearch.setColumns(20);
+ txtMainSearch.setToolTipText("Search for files or tags");
+ txtMainSearch.setMinimumSize(null);
+ txtMainSearch.setPreferredSize(new java.awt.Dimension(100, 30));
+ txtMainSearch.addKeyListener(new java.awt.event.KeyAdapter() {
+ public void keyPressed(final java.awt.event.KeyEvent evt) {
+ txtMainSearchKeyPressed(evt);
+ }
+ });
+ pnlSearchSizer.add(txtMainSearch);
+
+ btnearch.setMnemonic('s');
+ btnearch.setText("Search");
+ btnearch.setToolTipText("Search iRODS based on the current view selected");
+ btnearch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnearchActionPerformed(evt);
+ }
+ });
+ pnlSearchSizer.add(btnearch);
+
+ pnlTopToolbarSearchArea
+ .add(pnlSearchSizer, java.awt.BorderLayout.SOUTH);
+
+ pnlToolbarSizer.add(pnlTopToolbarSearchArea,
+ java.awt.BorderLayout.CENTER);
+
+ pnlLocalToggleSizer.setLayout(new java.awt.BorderLayout());
+
+ toggleLocalFiles.setText("<<< Local Files");
+ toggleLocalFiles.setToolTipText("Browse the local file system.");
+ toggleLocalFiles.setMaximumSize(new java.awt.Dimension(144, 10));
+ toggleLocalFiles.setMinimumSize(new java.awt.Dimension(144, 10));
+ toggleLocalFiles.setPreferredSize(new java.awt.Dimension(144, 30));
+ toggleLocalFiles
+ .addChangeListener(new javax.swing.event.ChangeListener() {
+ public void stateChanged(
+ final javax.swing.event.ChangeEvent evt) {
+ toggleLocalFilesStateChanged(evt);
+ }
+ });
+ toggleLocalFiles.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ toggleLocalFilesActionPerformed(evt);
+ }
+ });
+ pnlLocalToggleSizer.add(toggleLocalFiles, java.awt.BorderLayout.NORTH);
+ toggleLocalFiles.getAccessibleContext().setAccessibleName(
+ "<<< Local Files ");
+
+ pnlToolbarSizer.add(pnlLocalToggleSizer, java.awt.BorderLayout.WEST);
+
+ pnlIrodsDetailsToggleSizer.setLayout(new java.awt.BorderLayout());
+
+ toggleIrodsDetails.setToolTipText("Browse the local file system.");
+ toggleIrodsDetails.setLabel("iRODS Info >>>>");
+ toggleIrodsDetails.setMaximumSize(new java.awt.Dimension(144, 10));
+ toggleIrodsDetails.setMinimumSize(new java.awt.Dimension(144, 10));
+ toggleIrodsDetails.setPreferredSize(new java.awt.Dimension(144, 30));
+ toggleIrodsDetails
+ .addChangeListener(new javax.swing.event.ChangeListener() {
+ public void stateChanged(
+ final javax.swing.event.ChangeEvent evt) {
+ toggleIrodsDetailsStateChanged(evt);
+ }
+ });
+ toggleIrodsDetails
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ toggleIrodsDetailsActionPerformed(evt);
+ }
+ });
+ pnlIrodsDetailsToggleSizer.add(toggleIrodsDetails,
+ java.awt.BorderLayout.NORTH);
+ toggleIrodsDetails.getAccessibleContext().setAccessibleName("");
+
+ pnlToolbarSizer.add(pnlIrodsDetailsToggleSizer,
+ java.awt.BorderLayout.EAST);
+
+ iDropToolbar.add(pnlToolbarSizer, java.awt.BorderLayout.NORTH);
+
+ getContentPane().add(iDropToolbar, java.awt.BorderLayout.NORTH);
+
+ pnlIdropMain.setPreferredSize(new java.awt.Dimension(500, 300));
+ pnlIdropMain.setLayout(new javax.swing.BoxLayout(pnlIdropMain,
+ javax.swing.BoxLayout.PAGE_AXIS));
+
+ jSplitPanelLocalRemote.setBorder(null);
+ jSplitPanelLocalRemote.setDividerLocation(250);
+ jSplitPanelLocalRemote.setDividerSize(30);
+ jSplitPanelLocalRemote.setMaximumSize(null);
+ jSplitPanelLocalRemote.setPreferredSize(new java.awt.Dimension(0, 0));
+
+ pnlLocalTreeArea.setBackground(new java.awt.Color(153, 255, 102));
+ pnlLocalTreeArea.setBorder(javax.swing.BorderFactory
+ .createLineBorder(new java.awt.Color(0, 0, 0)));
+ pnlLocalTreeArea.setMinimumSize(new java.awt.Dimension(0, 0));
+ pnlLocalTreeArea.setOpaque(false);
+ pnlLocalTreeArea.setPreferredSize(new java.awt.Dimension(0, 0));
+ pnlLocalTreeArea.setLayout(new java.awt.BorderLayout());
+
+ pnlLocalRoots.setMinimumSize(new java.awt.Dimension(0, 0));
+ pnlLocalRoots.setLayout(new java.awt.BorderLayout());
+
+ scrollLocalDrives.setMaximumSize(null);
+ scrollLocalDrives.setMinimumSize(new java.awt.Dimension(0, 0));
+ scrollLocalDrives.setPreferredSize(new java.awt.Dimension(300, 100));
+
+ listLocalDrives.setBorder(javax.swing.BorderFactory
+ .createLineBorder(new java.awt.Color(0, 0, 0)));
+ listLocalDrives
+ .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+ listLocalDrives.setMaximumSize(null);
+ listLocalDrives.setPreferredSize(new java.awt.Dimension(150, 200));
+ listLocalDrives.setVisibleRowCount(4);
+ scrollLocalDrives.setViewportView(listLocalDrives);
+
+ pnlLocalRoots.add(scrollLocalDrives, java.awt.BorderLayout.CENTER);
+
+ pnlRefreshButton.setMaximumSize(new java.awt.Dimension(1000, 30));
+ pnlRefreshButton.setMinimumSize(new java.awt.Dimension(0, 0));
+ pnlRefreshButton.setPreferredSize(new java.awt.Dimension(101, 30));
+
+ btnRefreshLocalDrives.setLabel("Refresh");
+ btnRefreshLocalDrives.setMaximumSize(new java.awt.Dimension(200, 50));
+ btnRefreshLocalDrives.setMinimumSize(new java.awt.Dimension(0, 0));
+ btnRefreshLocalDrives
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnRefreshLocalDrivesActionPerformed(evt);
+ }
+ });
+ pnlRefreshButton.add(btnRefreshLocalDrives);
+
+ pnlLocalRoots.add(pnlRefreshButton, java.awt.BorderLayout.NORTH);
+ pnlLocalRoots.add(pnlDrivesFiller, java.awt.BorderLayout.SOUTH);
+
+ pnlLocalTreeArea.add(pnlLocalRoots, java.awt.BorderLayout.NORTH);
+
+ scrollLocalFileTree.setBackground(javax.swing.UIManager.getDefaults()
+ .getColor("Button.background"));
+ scrollLocalFileTree.setBorder(null);
+ scrollLocalFileTree.setToolTipText("scroll panel tooltip");
+ scrollLocalFileTree
+ .setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+ scrollLocalFileTree.setMaximumSize(null);
+ scrollLocalFileTree.setMinimumSize(new java.awt.Dimension(0, 0));
+ scrollLocalFileTree.setPreferredSize(new java.awt.Dimension(500, 500));
+ pnlLocalTreeArea.add(scrollLocalFileTree, java.awt.BorderLayout.CENTER);
+
+ jSplitPanelLocalRemote.setLeftComponent(pnlLocalTreeArea);
+
+ pnlIrodsArea.setMinimumSize(new java.awt.Dimension(500, 300));
+ pnlIrodsArea.setPreferredSize(new java.awt.Dimension(600, 304));
+ pnlIrodsArea.setLayout(new java.awt.BorderLayout());
+
+ splitTargetCollections.setDividerLocation(400);
+ splitTargetCollections.setMinimumSize(new java.awt.Dimension(0, 0));
+
+ tabIrodsViews.setMinimumSize(new java.awt.Dimension(200, 129));
+ tabIrodsViews.setPreferredSize(new java.awt.Dimension(350, 300));
+ tabIrodsViews.addChangeListener(new javax.swing.event.ChangeListener() {
+ public void stateChanged(final javax.swing.event.ChangeEvent evt) {
+ tabIrodsViewsStateChanged(evt);
+ }
+ });
+
+ pnlTabHierarchicalView.setLayout(new java.awt.BorderLayout());
+
+ btnRefreshTargetTree.setMnemonic('r');
+ btnRefreshTargetTree.setText("Refresh");
+ btnRefreshTargetTree
+ .setToolTipText("Refresh the view of the iRODS server");
+ btnRefreshTargetTree.setFocusable(false);
+ btnRefreshTargetTree
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnRefreshTargetTree
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnRefreshTargetTree
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnRefreshTargetTreeActionPerformed(evt);
+ }
+ });
+ pnlIrodsTreeToolbar.add(btnRefreshTargetTree);
+
+ pnlTabHierarchicalView.add(pnlIrodsTreeToolbar,
+ java.awt.BorderLayout.NORTH);
+
+ pnlIrodsTreeMaster.setLayout(new java.awt.BorderLayout());
+ pnlIrodsTreeMaster.add(scrollIrodsTree, java.awt.BorderLayout.CENTER);
+
+ pnlTabHierarchicalView.add(pnlIrodsTreeMaster,
+ java.awt.BorderLayout.CENTER);
+
+ tabIrodsViews.addTab("iRODS Tree View", pnlTabHierarchicalView);
+
+ pnlTabSearch
+ .setToolTipText("Search for files and collections in iRODS and display search results");
+ pnlTabSearch.setLayout(new java.awt.BorderLayout());
+ pnlTabSearch.add(pnlTabSearchTop, java.awt.BorderLayout.NORTH);
+
+ pnlTabSearchResults.setLayout(new java.awt.GridLayout(1, 0));
+
+ tableSearchResults.setModel(new javax.swing.table.DefaultTableModel(
+ new Object[][] { { null, null, null, null },
+ { null, null, null, null }, { null, null, null, null },
+ { null, null, null, null } }, new String[] { "Title 1",
+ "Title 2", "Title 3", "Title 4" }));
+ scrollPaneSearchResults.setViewportView(tableSearchResults);
+
+ pnlTabSearchResults.add(scrollPaneSearchResults);
+
+ pnlTabSearch.add(pnlTabSearchResults, java.awt.BorderLayout.CENTER);
+
+ tabIrodsViews
+ .addTab("Search", null, pnlTabSearch,
+ "Search for files and collections in iRODS and display search results");
+
+ splitTargetCollections.setLeftComponent(tabIrodsViews);
+
+ pnlIrodsInfo.setBorder(javax.swing.BorderFactory.createEmptyBorder(10,
+ 15, 10, 15));
+ pnlIrodsInfo.setMinimumSize(new java.awt.Dimension(300, 708));
+ pnlIrodsInfo.setLayout(new java.awt.BorderLayout());
+
+ pnlIrodsInfoInner.setBorder(javax.swing.BorderFactory
+ .createEmptyBorder(10, 10, 10, 10));
+ pnlIrodsInfoInner
+ .setToolTipText("Information on selected iRODS file or collection");
+ pnlIrodsInfoInner.setLayout(new java.awt.GridBagLayout());
+
+ pnlFileIconSizer.setMinimumSize(new java.awt.Dimension(80, 40));
+ pnlFileIconSizer.setLayout(new java.awt.BorderLayout());
+
+ pnlInfoIcon.setMaximumSize(new java.awt.Dimension(50, 50));
+ pnlInfoIcon.setLayout(new java.awt.GridLayout(1, 0));
+ pnlFileIconSizer.add(pnlInfoIcon, java.awt.BorderLayout.WEST);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.weightx = 0.8;
+ pnlIrodsInfoInner.add(pnlFileIconSizer, gridBagConstraints);
+
+ pnlFileNameAndIcon.setBorder(javax.swing.BorderFactory
+ .createLineBorder(new java.awt.Color(0, 0, 0)));
+ pnlFileNameAndIcon.setMinimumSize(new java.awt.Dimension(100, 100));
+ pnlFileNameAndIcon.setLayout(new java.awt.FlowLayout(
+ java.awt.FlowLayout.LEFT, 0, 5));
+
+ lblFileOrCollectionName.setMinimumSize(new java.awt.Dimension(80, 16));
+ pnlFileNameAndIcon.add(lblFileOrCollectionName);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ gridBagConstraints.weightx = 0.8;
+ gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
+ pnlIrodsInfoInner.add(pnlFileNameAndIcon, gridBagConstraints);
+
+ pnlInfoCollectionParent.setLayout(new java.awt.BorderLayout());
+
+ lblFileParent.setText("Parent path of file:");
+ pnlInfoCollectionParent.add(lblFileParent, java.awt.BorderLayout.NORTH);
+ lblFileParent.getAccessibleContext().setAccessibleDescription(
+ "The path of the parent of the file or collection");
+
+ scrollParentPath.setMinimumSize(new java.awt.Dimension(100, 100));
+
+ txtParentPath.setEditable(false);
+ txtParentPath.setMaximumSize(null);
+ txtParentPath.setMinimumSize(new java.awt.Dimension(600, 100));
+ scrollParentPath.setViewportView(txtParentPath);
+
+ pnlInfoCollectionParent.add(scrollParentPath,
+ java.awt.BorderLayout.CENTER);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ gridBagConstraints.weightx = 0.8;
+ gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
+ pnlIrodsInfoInner.add(pnlInfoCollectionParent, gridBagConstraints);
+
+ pnlInfoComment.setLayout(new java.awt.BorderLayout());
+
+ lblComment.setText("Comment:");
+ lblComment.setToolTipText("");
+ pnlInfoComment.add(lblComment, java.awt.BorderLayout.NORTH);
+ lblComment.getAccessibleContext().setAccessibleDescription(
+ "lable for comment area");
+
+ scrollComment.setMinimumSize(null);
+ scrollComment.setPreferredSize(new java.awt.Dimension(388, 84));
+
+ txtComment.setMaximumSize(null);
+ txtComment.setMinimumSize(null);
+ txtComment.setPreferredSize(null);
+ scrollComment.setViewportView(txtComment);
+
+ pnlInfoComment.add(scrollComment, java.awt.BorderLayout.CENTER);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlIrodsInfoInner.add(pnlInfoComment, gridBagConstraints);
+
+ pnlInfoTags.setLayout(new java.awt.BorderLayout());
+
+ lblTags.setText("Tags:");
+ lblTags.setToolTipText("");
+ pnlInfoTags.add(lblTags, java.awt.BorderLayout.NORTH);
+ lblTags.getAccessibleContext().setAccessibleName("Tags");
+ lblTags.getAccessibleContext().setAccessibleDescription(
+ "Label for free tagging area");
+
+ txtTags.setColumns(30);
+ txtTags.setToolTipText("Name of file or collection. This field allows editing to rename");
+ txtTags.setMinimumSize(null);
+ txtTags.setPreferredSize(null);
+ txtTags.addFocusListener(new java.awt.event.FocusAdapter() {
+ public void focusLost(final java.awt.event.FocusEvent evt) {
+ txtTagsFocusLost(evt);
+ }
+ });
+ txtTags.addKeyListener(new java.awt.event.KeyAdapter() {
+ public void keyPressed(final java.awt.event.KeyEvent evt) {
+ txtTagsKeyPressed(evt);
+ }
+ });
+ pnlInfoTags.add(txtTags, java.awt.BorderLayout.PAGE_END);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ gridBagConstraints.weightx = 0.8;
+ pnlIrodsInfoInner.add(pnlInfoTags, gridBagConstraints);
+
+ pnlInfoButton.setLayout(new java.awt.FlowLayout(
+ java.awt.FlowLayout.RIGHT));
+
+ btnUpdateInfo.setMnemonic('I');
+ btnUpdateInfo.setText("Update Info");
+ btnUpdateInfo
+ .setToolTipText("Update information on the info panel such as tags and comment");
+ btnUpdateInfo.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnUpdateInfoActionPerformed(evt);
+ }
+ });
+ pnlInfoButton.add(btnUpdateInfo);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ gridBagConstraints.weightx = 0.1;
+ pnlIrodsInfoInner.add(pnlInfoButton, gridBagConstraints);
+
+ pnlInfoDetails.setBorder(javax.swing.BorderFactory
+ .createLineBorder(new java.awt.Color(0, 0, 0)));
+ pnlInfoDetails.setLayout(new java.awt.GridBagLayout());
+
+ lblInfoCreatedAt
+ .setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ lblInfoCreatedAt.setText("Created:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlInfoDetails.add(lblInfoCreatedAt, gridBagConstraints);
+
+ lblInfoCreatedAtValue.setText("XXXXXX");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlInfoDetails.add(lblInfoCreatedAtValue, gridBagConstraints);
+
+ lblInfoUpdatedAt
+ .setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ lblInfoUpdatedAt.setText("Updated:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlInfoDetails.add(lblInfoUpdatedAt, gridBagConstraints);
+
+ lblInfoUpdatedAtValue.setText("XXXXXX");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlInfoDetails.add(lblInfoUpdatedAtValue, gridBagConstraints);
+
+ lblInfoLength
+ .setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ lblInfoLength.setText("Length:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlInfoDetails.add(lblInfoLength, gridBagConstraints);
+
+ lblInfoLengthValue.setText("XXXXXX");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlInfoDetails.add(lblInfoLengthValue, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.weightx = 0.8;
+ gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 0);
+ pnlIrodsInfoInner.add(pnlInfoDetails, gridBagConstraints);
+
+ pnlToolbarInfo.setMinimumSize(new java.awt.Dimension(300, 200));
+ pnlToolbarInfo.setLayout(new java.awt.BorderLayout());
+
+ toolBarInfo.setRollover(true);
+
+ btnViewMetadata.setText("Metadata");
+ btnViewMetadata.setFocusable(false);
+ btnViewMetadata
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnViewMetadata
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnViewMetadata.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnViewMetadataActionPerformed(evt);
+ }
+ });
+ toolBarInfo.add(btnViewMetadata);
+
+ btnReplication.setText("Replication");
+ btnReplication.setFocusable(false);
+ btnReplication
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnReplication
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnReplication.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ btnReplicationActionPerformed(evt);
+ }
+ });
+ toolBarInfo.add(btnReplication);
+ toolBarInfo.add(separator1);
+
+ btnMoveToTrash.setText("Move to Trash");
+ btnMoveToTrash.setFocusable(false);
+ btnMoveToTrash
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnMoveToTrash
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ toolBarInfo.add(btnMoveToTrash);
+
+ separator2.setMinimumSize(new java.awt.Dimension(50, 1));
+ toolBarInfo.add(separator2);
+
+ pnlToolbarInfo.add(toolBarInfo, java.awt.BorderLayout.NORTH);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.weightx = 0.8;
+ pnlIrodsInfoInner.add(pnlToolbarInfo, gridBagConstraints);
+
+ pnlIrodsInfo.add(pnlIrodsInfoInner, java.awt.BorderLayout.CENTER);
+ pnlIrodsInfoInner.getAccessibleContext()
+ .setAccessibleName("info panel");
+
+ splitTargetCollections.setRightComponent(pnlIrodsInfo);
+
+ pnlIrodsArea.add(splitTargetCollections, java.awt.BorderLayout.CENTER);
+
+ jSplitPanelLocalRemote.setRightComponent(pnlIrodsArea);
+
+ pnlIdropMain.add(jSplitPanelLocalRemote);
+
+ getContentPane().add(pnlIdropMain, java.awt.BorderLayout.CENTER);
+
+ pnlIdropBottom.setBorder(javax.swing.BorderFactory
+ .createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+ pnlIdropBottom.setToolTipText("Display area for status and messages");
+ pnlIdropBottom.setLayout(new java.awt.GridBagLayout());
+
+ userNameLabel.setText("usernamelabel");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.weightx = 0.005;
+ pnlIdropBottom.add(userNameLabel, gridBagConstraints);
+
+ pnlTransferOverview.setLayout(new java.awt.BorderLayout());
+
+ lblTransferTypeLabel.setText("Transfer Type:");
+ pnlTransferType.add(lblTransferTypeLabel);
+
+ lblTransferType.setText(" ");
+ pnlTransferType.add(lblTransferType);
+
+ pnlTransferStatus.add(pnlTransferType);
+
+ lblTransferFilesCounts.setText("Files: /");
+ pnlTransferFileCounts.add(lblTransferFilesCounts);
+
+ pnlTransferStatus.add(pnlTransferFileCounts);
+
+ lblTransferByteCounts.setText("Bytes (total): /");
+ pnlTransferByteCounts.add(lblTransferByteCounts);
+
+ pnlTransferStatus.add(pnlTransferByteCounts);
+
+ pnlTransferOverview.add(pnlTransferStatus, java.awt.BorderLayout.NORTH);
+
+ pnlTransferFileInfo.setLayout(new java.awt.FlowLayout(
+ java.awt.FlowLayout.LEFT));
+
+ lblCurrentFileLabel.setText("Current File:");
+ pnlTransferFileInfo.add(lblCurrentFileLabel);
+ pnlTransferFileInfo.add(lblCurrentFile);
+
+ pnlTransferOverview.add(pnlTransferFileInfo,
+ java.awt.BorderLayout.CENTER);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.gridwidth = 35;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlIdropBottom.add(pnlTransferOverview, gridBagConstraints);
+
+ transferStatusProgressBar.setBorder(javax.swing.BorderFactory
+ .createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+ transferStatusProgressBar.setStringPainted(true);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.weightx = 8.0;
+ pnlIdropBottom.add(transferStatusProgressBar, gridBagConstraints);
+
+ transferQueueToolbarPanel.setBorder(javax.swing.BorderFactory
+ .createEtchedBorder());
+
+ idropProgressPanelToolbar.setRollover(true);
+
+ btnShowTransferManager.setText("Manage");
+ btnShowTransferManager
+ .setToolTipText("Show a panel to manage transfers");
+ btnShowTransferManager.setFocusable(false);
+ btnShowTransferManager
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnShowTransferManager
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnShowTransferManager
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ btnShowTransferManagerActionPerformed(evt);
+ }
+ });
+ idropProgressPanelToolbar.add(btnShowTransferManager);
+
+ togglePauseTransfer.setText("Pause");
+ togglePauseTransfer.setToolTipText("Pause the current transfer");
+ togglePauseTransfer.setFocusable(false);
+ togglePauseTransfer
+ .setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ togglePauseTransfer
+ .setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ togglePauseTransfer
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ togglePauseTransferActionPerformed(evt);
+ }
+ });
+ idropProgressPanelToolbar.add(togglePauseTransfer);
+
+ transferQueueToolbarPanel.add(idropProgressPanelToolbar);
+
+ pnlIdropProgressIcon.add(progressIconImageLabel);
+
+ transferQueueToolbarPanel.add(pnlIdropProgressIcon);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 34;
+ gridBagConstraints.gridy = 1;
+ pnlIdropBottom.add(transferQueueToolbarPanel, gridBagConstraints);
+
+ getContentPane().add(pnlIdropBottom, java.awt.BorderLayout.SOUTH);
+
+ jMenuFile.setMnemonic('f');
+ jMenuFile.setText("File");
+
+ jMenuItemExit.setMnemonic('x');
+ jMenuItemExit.setText("Exit");
+ jMenuItemExit.setToolTipText("Close the iDROP console window");
+ jMenuItemExit.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(final java.awt.event.ActionEvent evt) {
+ jMenuItemExitActionPerformed(evt);
+ }
+ });
+ jMenuFile.add(jMenuItemExit);
+
+ jMenuBar1.add(jMenuFile);
+
+ jMenuEdit.setMnemonic('E');
+ jMenuEdit.setText("Edit");
+ jMenuBar1.add(jMenuEdit);
+
+ jMenuView.setMnemonic('V');
+ jMenuView.setText("View");
+
+ jCheckBoxMenuItemShowSourceTree.setAccelerator(javax.swing.KeyStroke
+ .getKeyStroke(java.awt.event.KeyEvent.VK_L,
+ java.awt.event.InputEvent.SHIFT_MASK));
+ jCheckBoxMenuItemShowSourceTree.setMnemonic('L');
+ jCheckBoxMenuItemShowSourceTree.setText("Show Local");
+ jCheckBoxMenuItemShowSourceTree
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ jCheckBoxMenuItemShowSourceTreeActionPerformed(evt);
+ }
+ });
+ jMenuView.add(jCheckBoxMenuItemShowSourceTree);
+
+ jCheckBoxMenuItemShowIrodsInfo.setAccelerator(javax.swing.KeyStroke
+ .getKeyStroke(java.awt.event.KeyEvent.VK_L,
+ java.awt.event.InputEvent.SHIFT_MASK));
+ jCheckBoxMenuItemShowIrodsInfo.setMnemonic('I');
+ jCheckBoxMenuItemShowIrodsInfo.setText("Show iRODS Info");
+ jCheckBoxMenuItemShowIrodsInfo
+ .addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(
+ final java.awt.event.ActionEvent evt) {
+ jCheckBoxMenuItemShowIrodsInfoActionPerformed(evt);
+ }
+ });
+ jMenuView.add(jCheckBoxMenuItemShowIrodsInfo);
+
+ jMenuBar1.add(jMenuView);
+
+ setJMenuBar(jMenuBar1);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnShowTransferManagerActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnShowTransferManagerActionPerformed
showQueueManagerDialog();
}// GEN-LAST:event_btnShowTransferManagerActionPerformed
@@ -1782,7 +1948,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
*
* @param evt
*/
- private void togglePauseTransferActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_togglePauseTransferActionPerformed
+ private void togglePauseTransferActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_togglePauseTransferActionPerformed
try {
if (togglePauseTransfer.isSelected()) {
@@ -1800,7 +1967,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
private static final long serialVersionUID = 1L;
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(final ActionEvent e) {
newPreferencesDialog.setVisible(true);
}
};
@@ -1808,13 +1975,14 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
private static final long serialVersionUID = 1L;
- public void actionPerformed(ActionEvent e) {
- getiDropCore().getPreferences().putBoolean("showGUI", showGUICheckBox.isSelected() ? true : false);
+ public void actionPerformed(final ActionEvent e) {
+ getiDropCore().getPreferences().putBoolean("showGUI",
+ showGUICheckBox.isSelected() ? true : false);
newPreferencesDialog.setVisible(false);
}
};
- private void formWindowClosed(java.awt.event.WindowEvent evt) {// GEN-FIRST:event_formWindowClosed
+ private void formWindowClosed(final java.awt.event.WindowEvent evt) {// GEN-FIRST:event_formWindowClosed
this.setVisible(false);
this.formShown = false;
}// GEN-LAST:event_formWindowClosed
@@ -1824,14 +1992,17 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
*
* @param evt
*/
- private void btnRefreshTargetTreeActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshTargetTreeActionPerformed
+ private void btnRefreshTargetTreeActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshTargetTreeActionPerformed
buildTargetTree();
}// GEN-LAST:event_btnRefreshTargetTreeActionPerformed
- private void toggleLocalFilesStateChanged(javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_toggleLocalFilesStateChanged
+ private void toggleLocalFilesStateChanged(
+ final javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_toggleLocalFilesStateChanged
}// GEN-LAST:event_toggleLocalFilesStateChanged
- private void toggleLocalFilesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleLocalFilesActionPerformed
+ private void toggleLocalFilesActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleLocalFilesActionPerformed
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
@@ -1850,21 +2021,25 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
*
* @param evt
*/
- private void jCheckBoxMenuItemShowSourceTreeActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jCheckBoxMenuItemShowSourceTreeActionPerformed
+ private void jCheckBoxMenuItemShowSourceTreeActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jCheckBoxMenuItemShowSourceTreeActionPerformed
toggleLocalFiles.setSelected(jCheckBoxMenuItemShowSourceTree.isSelected());
toggleLocalFilesActionPerformed(evt);
}// GEN-LAST:event_jCheckBoxMenuItemShowSourceTreeActionPerformed
- private void jMenuItemExitActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItemExitActionPerformed
+ private void jMenuItemExitActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItemExitActionPerformed
this.setVisible(false);
}// GEN-LAST:event_jMenuItemExitActionPerformed
/**
- * Handle the press of the refresh local drives button, refresh the local file tree.
+ * Handle the press of the refresh local drives button, refresh the local
+ * file tree.
*
* @param evt
*/
- private void btnRefreshLocalDrivesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshLocalDrivesActionPerformed
+ private void btnRefreshLocalDrivesActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshLocalDrivesActionPerformed
// keep track of currently selected paths
log.debug("refreshing local files tree");
@@ -1891,8 +2066,10 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
final Enumeration<TreePath> pathsToExpand = currentPaths;
fileTree.expandTreeNodesBasedOnListOfPreviouslyExpandedNodes(pathsToExpand);
} catch (IdropException ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("exception expanding tree nodes", ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE,
+ null, ex);
+ throw new IdropRuntimeException(
+ "exception expanding tree nodes", ex);
}
}
@@ -1900,7 +2077,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}// GEN-LAST:event_btnRefreshLocalDrivesActionPerformed
- private void toggleIrodsDetailsStateChanged(javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_toggleIrodsDetailsStateChanged
+ private void toggleIrodsDetailsStateChanged(
+ final javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_toggleIrodsDetailsStateChanged
// unused right now
}// GEN-LAST:event_toggleIrodsDetailsStateChanged
@@ -1909,28 +2087,32 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
*
* @param evt
*/
- private void toggleIrodsDetailsActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleIrodsDetailsActionPerformed
+ private void toggleIrodsDetailsActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleIrodsDetailsActionPerformed
jCheckBoxMenuItemShowIrodsInfo.setSelected(toggleIrodsDetails.isSelected());
handleInfoPanelShowOrHide();
}// GEN-LAST:event_toggleIrodsDetailsActionPerformed
- private void jCheckBoxMenuItemShowIrodsInfoActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jCheckBoxMenuItemShowIrodsInfoActionPerformed
+ private void jCheckBoxMenuItemShowIrodsInfoActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jCheckBoxMenuItemShowIrodsInfoActionPerformed
toggleIrodsDetails.setSelected(jCheckBoxMenuItemShowIrodsInfo.isSelected());
handleInfoPanelShowOrHide();
}// GEN-LAST:event_jCheckBoxMenuItemShowIrodsInfoActionPerformed
/**
- * Focus lost on tags, update tags in the info box. Updates are done in the tagging service by taking a delta
- * between the current and desired tag set.
+ * Focus lost on tags, update tags in the info box. Updates are done in the
+ * tagging service by taking a delta between the current and desired tag
+ * set.
*
* @param evt
*/
- private void txtTagsFocusLost(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtTagsFocusLost
+ private void txtTagsFocusLost(final java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtTagsFocusLost
}// GEN-LAST:event_txtTagsFocusLost
/**
- * Method to clear any cached values when an account changes. Some data is cached and lazily loaded
+ * Method to clear any cached values when an account changes. Some data is
+ * cached and lazily loaded
*/
public void signalChangeInAccountSoCachedDataCanBeCleared() {
log.info("clearing any cached data associated with the account");
@@ -1940,18 +2122,21 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
/**
- * Tag view master panel has been shown, lazily load the user tag cloud if not loaded
+ * Tag view master panel has been shown, lazily load the user tag cloud if
+ * not loaded
*
* @param evt
*/
- private void pnlTagViewMasterComponentShown(java.awt.event.ComponentEvent evt) {// GEN-FIRST:event_pnlTagViewMasterComponentShown
+ private void pnlTagViewMasterComponentShown(
+ final java.awt.event.ComponentEvent evt) {// GEN-FIRST:event_pnlTagViewMasterComponentShown
// dont think right event TODO: loose this event
}// GEN-LAST:event_pnlTagViewMasterComponentShown
- private void tabIrodsViewsStateChanged(javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_tabIrodsViewsStateChanged
+ private void tabIrodsViewsStateChanged(
+ final javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_tabIrodsViewsStateChanged
}// GEN-LAST:event_tabIrodsViewsStateChanged
- private void txtMainSearchKeyPressed(java.awt.event.KeyEvent evt) {// GEN-FIRST:event_txtMainSearchKeyPressed
+ private void txtMainSearchKeyPressed(final java.awt.event.KeyEvent evt) {// GEN-FIRST:event_txtMainSearchKeyPressed
// enter key triggers search
if (evt.getKeyCode() != java.awt.event.KeyEvent.VK_ENTER) {
@@ -1975,7 +2160,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}
}
- private void txtTagsKeyPressed(java.awt.event.KeyEvent evt) {// GEN-FIRST:event_txtTagsKeyPressed
+ private void txtTagsKeyPressed(final java.awt.event.KeyEvent evt) {// GEN-FIRST:event_txtTagsKeyPressed
// FIXME: cull this
@@ -1987,11 +2172,13 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
}// GEN-LAST:event_txtTagsKeyPressed
/**
- * Display the data replication dialog for the collection or data object depicted in the info panel
+ * Display the data replication dialog for the collection or data object
+ * depicted in the info panel
*
* @param evt
*/
- private void btnReplicationActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnReplicationActionPerformed
+ private void btnReplicationActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnReplicationActionPerformed
if (lastCachedInfoItem == null) {
return;
}
@@ -1999,27 +2186,33 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
ReplicationDialog replicationDialog;
if (lastCachedInfoItem instanceof DataObject) {
DataObject cachedDataObject = (DataObject) lastCachedInfoItem;
- replicationDialog = new ReplicationDialog(this, true, cachedDataObject.getCollectionName(),
+ replicationDialog = new ReplicationDialog(this, true,
+ cachedDataObject.getCollectionName(),
cachedDataObject.getDataName());
} else if (lastCachedInfoItem instanceof Collection) {
Collection collection = (Collection) lastCachedInfoItem;
- replicationDialog = new ReplicationDialog(this, true, collection.getCollectionName());
+ replicationDialog = new ReplicationDialog(this, true,
+ collection.getCollectionName());
} else {
showIdropException(new IdropException(
"Unknown type of object displayed in info area, cannot create the replication dialog"));
- throw new IdropRuntimeException("unknown type of object displayed in info area");
+ throw new IdropRuntimeException(
+ "unknown type of object displayed in info area");
}
- replicationDialog.setLocation((int) (this.getLocation().getX() + replicationDialog.getWidth() / 2), (int) (this.getLocation().getY() + replicationDialog.getHeight() / 2));
+ replicationDialog.setLocation(
+ (int) (this.getLocation().getX() + replicationDialog.getWidth() / 2), (int) (this.getLocation().getY() + replicationDialog.getHeight() / 2));
replicationDialog.setVisible(true);
}// GEN-LAST:event_btnReplicationActionPerformed
/**
- * Display the metadata edit /view dialog for the item displayed in the info panel
+ * Display the metadata edit /view dialog for the item displayed in the info
+ * panel
*
* @param evt
*/
- private void btnViewMetadataActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnViewMetadataActionPerformed
+ private void btnViewMetadataActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnViewMetadataActionPerformed
if (lastCachedInfoItem == null) {
return;
}
@@ -2027,23 +2220,28 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
MetadataViewDialog metadataViewDialog;
if (lastCachedInfoItem instanceof DataObject) {
DataObject cachedDataObject = (DataObject) lastCachedInfoItem;
- metadataViewDialog = new MetadataViewDialog(this, getIrodsAccount(), cachedDataObject.getCollectionName(),
+ metadataViewDialog = new MetadataViewDialog(this,
+ getIrodsAccount(), cachedDataObject.getCollectionName(),
cachedDataObject.getDataName());
} else if (lastCachedInfoItem instanceof Collection) {
Collection collection = (Collection) lastCachedInfoItem;
- metadataViewDialog = new MetadataViewDialog(this, getIrodsAccount(), collection.getCollectionName());
+ metadataViewDialog = new MetadataViewDialog(this,
+ getIrodsAccount(), collection.getCollectionName());
} else {
showIdropException(new IdropException(
"Unknown type of object displayed in info area, cannot create the replication dialog"));
- throw new IdropRuntimeException("unknown type of object displayed in info area");
+ throw new IdropRuntimeException(
+ "unknown type of object displayed in info area");
}
- metadataViewDialog.setLocation((int) (this.getLocation().getX() + metadataViewDialog.getWidth() / 2),
+ metadataViewDialog.setLocation(
+ (int) (this.getLocation().getX() + metadataViewDialog.getWidth() / 2),
(int) (this.getLocation().getY() + metadataViewDialog.getHeight() / 2));
metadataViewDialog.setVisible(true);
}// GEN-LAST:event_btnViewMetadataActionPerformed
- private void btnUpdateInfoActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdateInfoActionPerformed
+ private void btnUpdateInfoActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdateInfoActionPerformed
// if I have cached an item, see if it is a file or collection
if (this.lastCachedInfoItem == null) {
@@ -2064,37 +2262,47 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
FreeTaggingService freeTaggingService;
try {
- freeTaggingService = FreeTaggingServiceImpl.instance(getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory(), getIrodsAccount());
+ freeTaggingService = FreeTaggingServiceImpl.instance(
+ getiDropCore().getIrodsFileSystem().getIRODSAccessObjectFactory(),
+ getIrodsAccount());
if (lastCachedInfoItem instanceof Collection) {
log.info("processing tags for collection");
Collection collection = (Collection) lastCachedItemToProcessTagsFor;
- IRODSTagGrouping irodsTagGrouping = new IRODSTagGrouping(MetadataDomain.COLLECTION, collection.getCollectionName(), txtTags.getText(), getIrodsAccount().getUserName());
+ IRODSTagGrouping irodsTagGrouping = new IRODSTagGrouping(
+ MetadataDomain.COLLECTION, collection.getCollectionName(),
+ txtTags.getText(), getIrodsAccount().getUserName());
log.debug("new tag set is:{}", txtTags.getText());
freeTaggingService.updateTags(irodsTagGrouping);
} else if (lastCachedInfoItem instanceof DataObject) {
log.info("processing tags for data object");
DataObject dataObject = (DataObject) lastCachedItemToProcessTagsFor;
- IRODSTagGrouping irodsTagGrouping = new IRODSTagGrouping(MetadataDomain.DATA, dataObject.getCollectionName() + "/" + dataObject.getDataName(), txtTags.getText(),
- getIrodsAccount().getUserName());
+ IRODSTagGrouping irodsTagGrouping = new IRODSTagGrouping(
+ MetadataDomain.DATA, dataObject.getCollectionName()
+ + "/"
+ + dataObject.getDataName(), txtTags.getText(), getIrodsAccount().getUserName());
log.debug("new tag set is:{}", txtTags.getText());
freeTaggingService.updateTags(irodsTagGrouping);
} else {
log.error("unknown item type cached as being displayed in info area");
- throw new IdropRuntimeException("unknown item type cached");
+ throw new IdropRuntimeException(
+ "unknown item type cached");
}
idropGui.showMessageFromOperation("update of info successful");
} catch (JargonException ex) {
idropGui.showIdropException(ex);
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE,
+ null, ex);
throw new IdropRuntimeException(ex);
} finally {
try {
- getiDropCore().getIrodsFileSystem().close(getIrodsAccount());
+ getiDropCore().getIrodsFileSystem().close(
+ getIrodsAccount());
} catch (JargonException ex) {
- Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(iDrop.class.getName()).log(
+ Level.SEVERE, null, ex);
// logged and ignored
}
idropGui.setNormalCursor();
@@ -2106,11 +2314,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
/*
* The search button has been pressed, do a search
*/
- private void btnearchActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnearchActionPerformed
+ private void btnearchActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnearchActionPerformed
processSearchRequest();
}// GEN-LAST:event_btnearchActionPerformed
- private void menuItemShowInHierarchyActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_menuItemShowInHierarchyActionPerformed
+ private void menuItemShowInHierarchyActionPerformed(
+ final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_menuItemShowInHierarchyActionPerformed
int selRow = tableSearchResults.getSelectedRow();
log.debug("selected:{}", selRow);
@@ -2123,7 +2332,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
TreePath selPath;
try {
- selPath = TreeUtils.buildTreePathForIrodsAbsolutePath(irodsTree, entry.getFormattedAbsolutePath());
+ selPath = TreeUtils.buildTreePathForIrodsAbsolutePath(irodsTree,
+ entry.getFormattedAbsolutePath());
} catch (IdropException ex) {
Logger.getLogger(iDrop.class.getName()).log(Level.SEVERE, null, ex);
this.showMessageFromOperation("That collection or file is not visible in the context of the current tree");
@@ -2141,107 +2351,108 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
// irodsTree.scrollPathToVisible(selPath);
tabIrodsViews.setSelectedComponent(pnlTabHierarchicalView);
}// GEN-LAST:event_menuItemShowInHierarchyActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnMoveToTrash;
- private javax.swing.JButton btnRefreshLocalDrives;
- private javax.swing.JButton btnRefreshTargetTree;
- private javax.swing.JButton btnReplication;
- private javax.swing.JButton btnShowTransferManager;
- private javax.swing.JButton btnUpdateInfo;
- private javax.swing.JButton btnViewMetadata;
- private javax.swing.JButton btnearch;
- private javax.swing.JComboBox comboSearchType;
- private javax.swing.JPanel iDropToolbar;
- private javax.swing.JToolBar idropProgressPanelToolbar;
- private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItemShowIrodsInfo;
- private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItemShowSourceTree;
- private javax.swing.JMenuBar jMenuBar1;
- private javax.swing.JMenu jMenuEdit;
- private javax.swing.JMenu jMenuFile;
- private javax.swing.JMenuItem jMenuItemExit;
- private javax.swing.JMenu jMenuView;
- private javax.swing.JSplitPane jSplitPanelLocalRemote;
- private javax.swing.JLabel lblComment;
- private javax.swing.JLabel lblCurrentFile;
- private javax.swing.JLabel lblCurrentFileLabel;
- private javax.swing.JLabel lblFileOrCollectionName;
- private javax.swing.JLabel lblFileParent;
- private javax.swing.JLabel lblInfoCreatedAt;
- private javax.swing.JLabel lblInfoCreatedAtValue;
- private javax.swing.JLabel lblInfoLength;
- private javax.swing.JLabel lblInfoLengthValue;
- private javax.swing.JLabel lblInfoUpdatedAt;
- private javax.swing.JLabel lblInfoUpdatedAtValue;
- private javax.swing.JLabel lblMainSearch;
- private javax.swing.JLabel lblTags;
- private javax.swing.JLabel lblTransferByteCounts;
- private javax.swing.JLabel lblTransferFilesCounts;
- private javax.swing.JLabel lblTransferType;
- private javax.swing.JLabel lblTransferTypeLabel;
- private javax.swing.JList listLocalDrives;
- private javax.swing.JMenuItem menuItemShowInHierarchy;
- private javax.swing.JPanel pnlDrivesFiller;
- private javax.swing.JPanel pnlFileIconSizer;
- private javax.swing.JPanel pnlFileNameAndIcon;
- private javax.swing.JPanel pnlIdropBottom;
- private javax.swing.JPanel pnlIdropMain;
- private javax.swing.JPanel pnlIdropProgressIcon;
- private javax.swing.JPanel pnlInfoButton;
- private javax.swing.JPanel pnlInfoCollectionParent;
- private javax.swing.JPanel pnlInfoComment;
- private javax.swing.JPanel pnlInfoDetails;
- private javax.swing.JPanel pnlInfoIcon;
- private javax.swing.JPanel pnlInfoTags;
- private javax.swing.JPanel pnlIrodsArea;
- private javax.swing.JPanel pnlIrodsDetailsToggleSizer;
- private javax.swing.JPanel pnlIrodsInfo;
- private javax.swing.JPanel pnlIrodsInfoInner;
- private javax.swing.JPanel pnlIrodsTreeMaster;
- private javax.swing.JPanel pnlIrodsTreeToolbar;
- private javax.swing.JPanel pnlLocalRoots;
- private javax.swing.JPanel pnlLocalToggleSizer;
- private javax.swing.JPanel pnlLocalTreeArea;
- private javax.swing.JPanel pnlRefreshButton;
- private javax.swing.JPanel pnlSearchSizer;
- private javax.swing.JPanel pnlTabHierarchicalView;
- private javax.swing.JPanel pnlTabSearch;
- private javax.swing.JPanel pnlTabSearchResults;
- private javax.swing.JPanel pnlTabSearchTop;
- private javax.swing.JPanel pnlToolbarInfo;
- private javax.swing.JPanel pnlToolbarSizer;
- private javax.swing.JPanel pnlTopToolbarSearchArea;
- private javax.swing.JPanel pnlTransferByteCounts;
- private javax.swing.JPanel pnlTransferFileCounts;
- private javax.swing.JPanel pnlTransferFileInfo;
- private javax.swing.JPanel pnlTransferOverview;
- private javax.swing.JPanel pnlTransferStatus;
- private javax.swing.JPanel pnlTransferType;
- private javax.swing.JLabel progressIconImageLabel;
- private javax.swing.JScrollPane scrollComment;
- private javax.swing.JScrollPane scrollIrodsTree;
- private javax.swing.JScrollPane scrollLocalDrives;
- private javax.swing.JScrollPane scrollLocalFileTree;
- private javax.swing.JScrollPane scrollPaneSearchResults;
- private javax.swing.JScrollPane scrollParentPath;
- protected javax.swing.JPopupMenu searchTablePopupMenu;
- private javax.swing.JToolBar.Separator separator1;
- private javax.swing.JToolBar.Separator separator2;
- private javax.swing.JSplitPane splitTargetCollections;
- private javax.swing.JTabbedPane tabIrodsViews;
- private javax.swing.JTable tableSearchResults;
- private javax.swing.JToggleButton toggleIrodsDetails;
- private javax.swing.JToggleButton toggleLocalFiles;
- private javax.swing.JToggleButton togglePauseTransfer;
- private javax.swing.JToolBar toolBarInfo;
- private javax.swing.JPanel transferQueueToolbarPanel;
- private javax.swing.JProgressBar transferStatusProgressBar;
- private javax.swing.JTextArea txtComment;
- private javax.swing.JTextField txtMainSearch;
- private javax.swing.JTextArea txtParentPath;
- private javax.swing.JTextField txtTags;
- private javax.swing.JLabel userNameLabel;
- // End of variables declaration//GEN-END:variables
-
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+
+ private javax.swing.JButton btnMoveToTrash;
+ private javax.swing.JButton btnRefreshLocalDrives;
+ private javax.swing.JButton btnRefreshTargetTree;
+ private javax.swing.JButton btnReplication;
+ private javax.swing.JButton btnShowTransferManager;
+ private javax.swing.JButton btnUpdateInfo;
+ private javax.swing.JButton btnViewMetadata;
+ private javax.swing.JButton btnearch;
+ private javax.swing.JComboBox comboSearchType;
+ private javax.swing.JPanel iDropToolbar;
+ private javax.swing.JToolBar idropProgressPanelToolbar;
+ private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItemShowIrodsInfo;
+ private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItemShowSourceTree;
+ private javax.swing.JMenuBar jMenuBar1;
+ private javax.swing.JMenu jMenuEdit;
+ private javax.swing.JMenu jMenuFile;
+ private javax.swing.JMenuItem jMenuItemExit;
+ private javax.swing.JMenu jMenuView;
+ private javax.swing.JSplitPane jSplitPanelLocalRemote;
+ private javax.swing.JLabel lblComment;
+ private javax.swing.JLabel lblCurrentFile;
+ private javax.swing.JLabel lblCurrentFileLabel;
+ private javax.swing.JLabel lblFileOrCollectionName;
+ private javax.swing.JLabel lblFileParent;
+ private javax.swing.JLabel lblInfoCreatedAt;
+ private javax.swing.JLabel lblInfoCreatedAtValue;
+ private javax.swing.JLabel lblInfoLength;
+ private javax.swing.JLabel lblInfoLengthValue;
+ private javax.swing.JLabel lblInfoUpdatedAt;
+ private javax.swing.JLabel lblInfoUpdatedAtValue;
+ private javax.swing.JLabel lblMainSearch;
+ private javax.swing.JLabel lblTags;
+ private javax.swing.JLabel lblTransferByteCounts;
+ private javax.swing.JLabel lblTransferFilesCounts;
+ private javax.swing.JLabel lblTransferType;
+ private javax.swing.JLabel lblTransferTypeLabel;
+ private javax.swing.JList listLocalDrives;
+ private javax.swing.JMenuItem menuItemShowInHierarchy;
+ private javax.swing.JPanel pnlDrivesFiller;
+ private javax.swing.JPanel pnlFileIconSizer;
+ private javax.swing.JPanel pnlFileNameAndIcon;
+ private javax.swing.JPanel pnlIdropBottom;
+ private javax.swing.JPanel pnlIdropMain;
+ private javax.swing.JPanel pnlIdropProgressIcon;
+ private javax.swing.JPanel pnlInfoButton;
+ private javax.swing.JPanel pnlInfoCollectionParent;
+ private javax.swing.JPanel pnlInfoComment;
+ private javax.swing.JPanel pnlInfoDetails;
+ private javax.swing.JPanel pnlInfoIcon;
+ private javax.swing.JPanel pnlInfoTags;
+ private javax.swing.JPanel pnlIrodsArea;
+ private javax.swing.JPanel pnlIrodsDetailsToggleSizer;
+ private javax.swing.JPanel pnlIrodsInfo;
+ private javax.swing.JPanel pnlIrodsInfoInner;
+ private javax.swing.JPanel pnlIrodsTreeMaster;
+ private javax.swing.JPanel pnlIrodsTreeToolbar;
+ private javax.swing.JPanel pnlLocalRoots;
+ private javax.swing.JPanel pnlLocalToggleSizer;
+ private javax.swing.JPanel pnlLocalTreeArea;
+ private javax.swing.JPanel pnlRefreshButton;
+ private javax.swing.JPanel pnlSearchSizer;
+ private javax.swing.JPanel pnlTabHierarchicalView;
+ private javax.swing.JPanel pnlTabSearch;
+ private javax.swing.JPanel pnlTabSearchResults;
+ private javax.swing.JPanel pnlTabSearchTop;
+ private javax.swing.JPanel pnlToolbarInfo;
+ private javax.swing.JPanel pnlToolbarSizer;
+ private javax.swing.JPanel pnlTopToolbarSearchArea;
+ private javax.swing.JPanel pnlTransferByteCounts;
+ private javax.swing.JPanel pnlTransferFileCounts;
+ private javax.swing.JPanel pnlTransferFileInfo;
+ private javax.swing.JPanel pnlTransferOverview;
+ private javax.swing.JPanel pnlTransferStatus;
+ private javax.swing.JPanel pnlTransferType;
+ private javax.swing.JLabel progressIconImageLabel;
+ private javax.swing.JScrollPane scrollComment;
+ private javax.swing.JScrollPane scrollIrodsTree;
+ private javax.swing.JScrollPane scrollLocalDrives;
+ private javax.swing.JScrollPane scrollLocalFileTree;
+ private javax.swing.JScrollPane scrollPaneSearchResults;
+ private javax.swing.JScrollPane scrollParentPath;
+ protected javax.swing.JPopupMenu searchTablePopupMenu;
+ private javax.swing.JToolBar.Separator separator1;
+ private javax.swing.JToolBar.Separator separator2;
+ private javax.swing.JSplitPane splitTargetCollections;
+ private javax.swing.JTabbedPane tabIrodsViews;
+ private javax.swing.JTable tableSearchResults;
+ private javax.swing.JToggleButton toggleIrodsDetails;
+ private javax.swing.JToggleButton toggleLocalFiles;
+ private javax.swing.JToggleButton togglePauseTransfer;
+ private javax.swing.JToolBar toolBarInfo;
+ private javax.swing.JPanel transferQueueToolbarPanel;
+ private javax.swing.JProgressBar transferStatusProgressBar;
+ private javax.swing.JTextArea txtComment;
+ private javax.swing.JTextField txtMainSearch;
+ private javax.swing.JTextArea txtParentPath;
+ private javax.swing.JTextField txtTags;
+ private javax.swing.JLabel userNameLabel;
+
+ // End of variables declaration//GEN-END:variables
public Object getLastCachedInfoItem() {
return lastCachedInfoItem;
}
@@ -2295,10 +2506,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
try {
idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- FreeTaggingService freeTaggingService = FreeTaggingServiceImpl.instance(
- iDropCore.getIRODSAccessObjectFactory(), getIrodsAccount());
+ FreeTaggingService freeTaggingService = FreeTaggingServiceImpl.instance(iDropCore.getIRODSAccessObjectFactory(),
+ getIrodsAccount());
TagQuerySearchResult result = freeTaggingService.searchUsingFreeTagString(searchTerms);
- IRODSSearchTableModel irodsSearchTableModel = new IRODSSearchTableModel(result.getQueryResultEntries());
+ IRODSSearchTableModel irodsSearchTableModel = new IRODSSearchTableModel(
+ result.getQueryResultEntries());
tableSearchResults.setModel(irodsSearchTableModel);
tabIrodsViews.setSelectedComponent(pnlTabSearch);
} catch (Exception e) {
@@ -2315,19 +2527,20 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
class PopupListener extends MouseAdapter {
@Override
- public void mousePressed(MouseEvent e) {
+ public void mousePressed(final MouseEvent e) {
showPopup(e);
}
@Override
- public void mouseReleased(MouseEvent e) {
+ public void mouseReleased(final MouseEvent e) {
showPopup(e);
}
- private void showPopup(MouseEvent e) {
+ private void showPopup(final MouseEvent e) {
if (e.isPopupTrigger()) {
int rowAtPoint = tableSearchResults.rowAtPoint(e.getPoint());
- tableSearchResults.getSelectionModel().setSelectionInterval(rowAtPoint, rowAtPoint);
+ tableSearchResults.getSelectionModel().setSelectionInterval(
+ rowAtPoint, rowAtPoint);
searchTablePopupMenu.show(e.getComponent(), e.getX(), e.getY());
}
}
@@ -2337,7 +2550,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
return iDropCore;
}
- public void setiDropCore(IDROPCore iDropCore) {
+ public void setiDropCore(final IDROPCore iDropCore) {
this.iDropCore = iDropCore;
}
@@ -2353,7 +2566,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener, ItemLis
return fileTree;
}
- public void setFileTree(LocalFileTree fileTree) {
+ public void setFileTree(final LocalFileTree fileTree) {
this.fileTree = fileTree;
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IRODSFileService.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IRODSFileService.java
index 73329a3..e401fe1 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IRODSFileService.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IRODSFileService.java
@@ -29,18 +29,17 @@ import org.irods.jargon.idrop.exceptions.IdropException;
import org.slf4j.LoggerFactory;
/**
- * Delegate class that interacts with iRODS based on GUI interactions FIXME: this needs to be re-worked for connection
- * handling (cache, or per-service scheme) right now it just opens connections per invocation. This was a shortcut to
- * get a demo done and needs to be corrected.
+ * Delegate class that interacts with iRODS based on GUI interactions FIXME:
+ * this needs to be re-worked for connection handling (cache, or per-service
+ * scheme) right now it just opens connections per invocation. This was a
+ * shortcut to get a demo done and needs to be corrected.
*
* @author Mike Conway - DICE (www.irods.org)
*/
public class IRODSFileService {
public static org.slf4j.Logger log = LoggerFactory.getLogger(IRODSFileService.class);
-
private final IRODSAccount irodsAccount;
-
private final IRODSFileSystem irodsFileSystem;
private IRODSFileService() {
@@ -49,8 +48,8 @@ public class IRODSFileService {
// not to be invoked, thus private
}
- public IRODSFileService(final IRODSAccount irodsAccount, final IRODSFileSystem irodsFileSystem)
- throws IdropException {
+ public IRODSFileService(final IRODSAccount irodsAccount,
+ final IRODSFileSystem irodsFileSystem) throws IdropException {
if (irodsAccount == null) {
throw new IdropException("null irodsAccount");
}
@@ -67,28 +66,33 @@ public class IRODSFileService {
public List<CollectionAndDataObjectListingEntry> getCollectionsUnderParentCollection(
final String parentCollectionAbsolutePath) throws IdropException {
- if (parentCollectionAbsolutePath == null || parentCollectionAbsolutePath.isEmpty()) {
+ if (parentCollectionAbsolutePath == null
+ || parentCollectionAbsolutePath.isEmpty()) {
throw new IdropException("null parentCollectionAbsolutePath");
}
try {
- CollectionAndDataObjectListAndSearchAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory()
- .getCollectionAndDataObjectListAndSearchAO(irodsAccount);
- return collectionAO.listCollectionsUnderPath(parentCollectionAbsolutePath, 0);
+ CollectionAndDataObjectListAndSearchAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAndDataObjectListAndSearchAO(irodsAccount);
+ return collectionAO.listCollectionsUnderPath(
+ parentCollectionAbsolutePath, 0);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("exception getting collections under: {}" + parentCollectionAbsolutePath, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException("exception getting collections under: {}"
+ + parentCollectionAbsolutePath, ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
- public IRODSFile getIRODSFileForPath(final String irodsFilePath) throws IdropException {
+ public IRODSFile getIRODSFileForPath(final String irodsFilePath)
+ throws IdropException {
if (irodsFilePath == null || irodsFilePath.isEmpty()) {
throw new IdropException("null or empty irodsFilePath");
@@ -97,13 +101,16 @@ public class IRODSFileService {
try {
return irodsFileSystem.getIRODSFileFactory(irodsAccount).instanceIRODSFile(irodsFilePath);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("exception getting collections under: {}" + irodsFilePath, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException("exception getting collections under: {}"
+ + irodsFilePath, ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
@@ -112,30 +119,35 @@ public class IRODSFileService {
public List<CollectionAndDataObjectListingEntry> getFilesAndCollectionsUnderParentCollection(
final String parentCollectionAbsolutePath) throws IdropException {
- if (parentCollectionAbsolutePath == null || parentCollectionAbsolutePath.isEmpty()) {
+ if (parentCollectionAbsolutePath == null
+ || parentCollectionAbsolutePath.isEmpty()) {
throw new IdropException("null parentCollectionAbsolutePath");
}
try {
- CollectionAndDataObjectListAndSearchAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory()
- .getCollectionAndDataObjectListAndSearchAO(irodsAccount);
+ CollectionAndDataObjectListAndSearchAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAndDataObjectListAndSearchAO(irodsAccount);
return collectionAO.listDataObjectsAndCollectionsUnderPath(parentCollectionAbsolutePath);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("exception getting collections under: {}" + parentCollectionAbsolutePath, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException("exception getting collections under: {}"
+ + parentCollectionAbsolutePath, ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
- public Collection getParentCollection(final String parentCollectionAbsolutePath) throws IdropException {
+ public Collection getParentCollection(
+ final String parentCollectionAbsolutePath) throws IdropException {
- if (parentCollectionAbsolutePath == null || parentCollectionAbsolutePath.isEmpty()) {
+ if (parentCollectionAbsolutePath == null
+ || parentCollectionAbsolutePath.isEmpty()) {
throw new IdropException("null parentCollectionAbsolutePath");
}
@@ -143,19 +155,23 @@ public class IRODSFileService {
CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
return collectionAO.findByAbsolutePath(parentCollectionAbsolutePath);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("exception getting collections under: {}" + parentCollectionAbsolutePath, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException("exception getting collections under: {}"
+ + parentCollectionAbsolutePath, ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
- public String getStringFromSourcePaths(final List<String> sourcePaths) throws IdropException {
+ public String getStringFromSourcePaths(final List<String> sourcePaths)
+ throws IdropException {
if (sourcePaths == null || sourcePaths.isEmpty()) {
throw new IdropException("sourcePaths is null or empty");
}
@@ -169,21 +185,24 @@ public class IRODSFileService {
}
- public IRODSRuleExecResult runIRODSRule(final String irodsRule) throws IdropException {
+ public IRODSRuleExecResult runIRODSRule(final String irodsRule)
+ throws IdropException {
log.info("executing rule: {}", irodsRule);
try {
- final RuleProcessingAO ruleProcessingAO = irodsFileSystem.getIRODSAccessObjectFactory()
- .getRuleProcessingAO(irodsAccount);
+ final RuleProcessingAO ruleProcessingAO = irodsFileSystem.getIRODSAccessObjectFactory().getRuleProcessingAO(
+ irodsAccount);
return ruleProcessingAO.executeRule(irodsRule);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception processing rule", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
@@ -197,41 +216,50 @@ public class IRODSFileService {
final ResourceAO resourceAO = irodsFileSystem.getIRODSAccessObjectFactory().getResourceAO(irodsAccount);
return resourceAO.findAll();
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception processing rule", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
/**
- * Method will return a listing of collections with a given metadata value, in this case the marker attribute for
- * the result of a virus scan.
+ * Method will return a listing of collections with a given metadata value,
+ * in this case the marker attribute for the result of a virus scan.
*
* @param parentCollectionAbsolutePath
- * <code>String</code> with the absolute path to the parent collection.
- * @return <code>List<MetaDataAndDomainData></code> with the results of the query.
+ * <code>String</code> with the absolute path to the parent
+ * collection.
+ * @return <code>List<MetaDataAndDomainData></code> with the results of the
+ * query.
* @throws IdropException
*/
- public List<MetaDataAndDomainData> getVirusStatusForParentCollection(final String parentCollectionAbsolutePath)
- throws IdropException {
- return getProcessingResultMetadataForCollection(parentCollectionAbsolutePath,
+ public List<MetaDataAndDomainData> getVirusStatusForParentCollection(
+ final String parentCollectionAbsolutePath) throws IdropException {
+ return getProcessingResultMetadataForCollection(
+ parentCollectionAbsolutePath,
"PolicyDrivenService:PolicyProcessingResultAttribute:VirusScan");
}
/**
- * Method will return a listing of the marker values for a data object for fixity check status
+ * Method will return a listing of the marker values for a data object for
+ * fixity check status
*
* @param parentCollectionAbsolutePath
- * <code>String</code> with the absolute path to the parent collection.
- * @return <code>MetaDataAndDomainData</code> with the results of the query or null.
+ * <code>String</code> with the absolute path to the parent
+ * collection.
+ * @return <code>MetaDataAndDomainData</code> with the results of the query
+ * or null.
* @throws IdropException
*/
- public MetaDataAndDomainData getFixityStatusForDataObject(final String parentCollectionAbsolutePath,
+ public MetaDataAndDomainData getFixityStatusForDataObject(
+ final String parentCollectionAbsolutePath,
final String dataObjectName) throws IdropException {
List<MetaDataAndDomainData> metaDataList = getProcessingResultMetadataForDataObject(
parentCollectionAbsolutePath, dataObjectName, "CHECKSUM%");
@@ -243,14 +271,18 @@ public class IRODSFileService {
}
/**
- * Method will return a listing of the marker values for a data object for virus scan status
+ * Method will return a listing of the marker values for a data object for
+ * virus scan status
*
* @param parentCollectionAbsolutePath
- * <code>String</code> with the absolute path to the parent collection.
- * @return <code>MetaDataAndDomainData</code> with the results of the query or null.
+ * <code>String</code> with the absolute path to the parent
+ * collection.
+ * @return <code>MetaDataAndDomainData</code> with the results of the query
+ * or null.
* @throws IdropException
*/
- public MetaDataAndDomainData getVirusStatusForDataObject(final String parentCollectionAbsolutePath,
+ public MetaDataAndDomainData getVirusStatusForDataObject(
+ final String parentCollectionAbsolutePath,
final String dataObjectName) throws IdropException {
List<MetaDataAndDomainData> metaDataList = getProcessingResultMetadataForDataObject(
parentCollectionAbsolutePath, dataObjectName, "VIRUS_SCAN%");
@@ -265,11 +297,13 @@ public class IRODSFileService {
* Get a list of the AVU metadata for the given collection
*
* @param irodsAbsolutePath
- * <code>String</code> that is the absolute iRODS path to the collection.
+ * <code>String</code> that is the absolute iRODS path to the
+ * collection.
* @return <code>List<MetaDataAndDomainData><code> with the query results.
* @throws IdropException
*/
- public List<MetaDataAndDomainData> getMetadataForCollection(final String irodsAbsolutePath) throws IdropException {
+ public List<MetaDataAndDomainData> getMetadataForCollection(
+ final String irodsAbsolutePath) throws IdropException {
if (irodsAbsolutePath == null || irodsAbsolutePath.isEmpty()) {
throw new IdropException("null or empty irodsAbsolutePath");
}
@@ -277,17 +311,19 @@ public class IRODSFileService {
log.info("getting metadata for collection:{}", irodsAbsolutePath);
try {
- final CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(
- irodsAccount);
- return collectionAO.findMetadataValuesForCollection(irodsAbsolutePath, 0);
+ final CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
+ return collectionAO.findMetadataValuesForCollection(
+ irodsAbsolutePath, 0);
} catch (Exception ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception processing rule", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
@@ -297,11 +333,13 @@ public class IRODSFileService {
* Get a list of the AVU metadata for the given collection
*
* @param irodsAbsolutePath
- * <code>String</code> that is the absolute iRODS path to the collection.
+ * <code>String</code> that is the absolute iRODS path to the
+ * collection.
* @return <code>List<MetaDataAndDomainData><code> with the query results.
* @throws IdropException
*/
- public List<MetaDataAndDomainData> getMetadataForDataObject(final String irodsAbsolutePath, final String fileName)
+ public List<MetaDataAndDomainData> getMetadataForDataObject(
+ final String irodsAbsolutePath, final String fileName)
throws IdropException {
if (irodsAbsolutePath == null || irodsAbsolutePath.isEmpty()) {
throw new IdropException("null or empty irodsAbsolutePath");
@@ -315,41 +353,49 @@ public class IRODSFileService {
log.info("file name:{}", fileName);
try {
- final DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(
- irodsAccount);
- return dataObjectAO.findMetadataValuesForDataObject(irodsAbsolutePath, fileName);
+ final DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount);
+ return dataObjectAO.findMetadataValuesForDataObject(
+ irodsAbsolutePath, fileName);
} catch (Exception ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception processing rule", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
/**
- * Method will return a listing of collections with a given metadata value, in this case the marker attribute for
- * the result of a fixity check.
+ * Method will return a listing of collections with a given metadata value,
+ * in this case the marker attribute for the result of a fixity check.
*
* @param parentCollectionAbsolutePath
- * <code>String</code> with the absolute path to the parent collection.
- * @return <code>List<MetaDataAndDomainData></code> with the results of the query.
+ * <code>String</code> with the absolute path to the parent
+ * collection.
+ * @return <code>List<MetaDataAndDomainData></code> with the results of the
+ * query.
* @throws IdropException
*/
- public List<MetaDataAndDomainData> getFixityStatusForParentCollection(final String parentCollectionAbsolutePath)
- throws IdropException {
- return getProcessingResultMetadataForCollection(parentCollectionAbsolutePath,
+ public List<MetaDataAndDomainData> getFixityStatusForParentCollection(
+ final String parentCollectionAbsolutePath) throws IdropException {
+ return getProcessingResultMetadataForCollection(
+ parentCollectionAbsolutePath,
"PolicyDrivenService:PolicyProcessingResultAttribute:FixityCheck");
}
public List<MetaDataAndDomainData> getProcessingResultMetadataForCollection(
- final String parentCollectionAbsolutePath, final String markerAttribute) throws IdropException {
- if (parentCollectionAbsolutePath == null || parentCollectionAbsolutePath.isEmpty()) {
- throw new IdropException("null or empty parentCollectionAbsolutePath");
+ final String parentCollectionAbsolutePath,
+ final String markerAttribute) throws IdropException {
+ if (parentCollectionAbsolutePath == null
+ || parentCollectionAbsolutePath.isEmpty()) {
+ throw new IdropException(
+ "null or empty parentCollectionAbsolutePath");
}
if (markerAttribute == null || markerAttribute.isEmpty()) {
@@ -358,10 +404,12 @@ public class IRODSFileService {
List<AVUQueryElement> queryElements = new ArrayList<AVUQueryElement>();
try {
- queryElements.add(AVUQueryElement.instanceForValueQuery(AVUQueryElement.AVUQueryPart.ATTRIBUTE,
+ queryElements.add(AVUQueryElement.instanceForValueQuery(
+ AVUQueryElement.AVUQueryPart.ATTRIBUTE,
AVUQueryOperatorEnum.EQUAL, markerAttribute));
} catch (JargonQueryException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException(ex);
}
@@ -374,30 +422,36 @@ public class IRODSFileService {
sb.append("'");
try {
- final CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(
- irodsAccount);
- return collectionAO.findMetadataValuesByMetadataQueryWithAdditionalWhere(queryElements, sb.toString());
+ final CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
+ return collectionAO.findMetadataValuesByMetadataQueryWithAdditionalWhere(
+ queryElements, sb.toString());
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception processing rule", ex);
} catch (JargonQueryException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("query exception processing rule", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
public List<MetaDataAndDomainData> getProcessingResultMetadataForDataObject(
- final String parentCollectionAbsolutePath, final String dataObjectName, final String markerAttribute)
+ final String parentCollectionAbsolutePath,
+ final String dataObjectName, final String markerAttribute)
throws IdropException {
- if (parentCollectionAbsolutePath == null || parentCollectionAbsolutePath.isEmpty()) {
- throw new IdropException("null or empty parentCollectionAbsolutePath");
+ if (parentCollectionAbsolutePath == null
+ || parentCollectionAbsolutePath.isEmpty()) {
+ throw new IdropException(
+ "null or empty parentCollectionAbsolutePath");
}
if (dataObjectName == null || dataObjectName.isEmpty()) {
@@ -410,29 +464,34 @@ public class IRODSFileService {
List<AVUQueryElement> queryElements = new ArrayList<AVUQueryElement>();
try {
- queryElements.add(AVUQueryElement.instanceForValueQuery(AVUQueryElement.AVUQueryPart.ATTRIBUTE,
+ queryElements.add(AVUQueryElement.instanceForValueQuery(
+ AVUQueryElement.AVUQueryPart.ATTRIBUTE,
AVUQueryOperatorEnum.LIKE, markerAttribute));
} catch (JargonQueryException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException(ex);
}
try {
- final DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(
- irodsAccount);
- return dataObjectAO.findMetadataValuesForDataObjectUsingAVUQuery(queryElements,
- parentCollectionAbsolutePath, dataObjectName);
+ final DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount);
+ return dataObjectAO.findMetadataValuesForDataObjectUsingAVUQuery(
+ queryElements, parentCollectionAbsolutePath,
+ dataObjectName);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception processing rule", ex);
} catch (JargonQueryException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("query exception processing rule", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
@@ -441,30 +500,37 @@ public class IRODSFileService {
* For a given data object, get a list of the resources for that object
*
* @param irodsCollectionAbsolutePath
- * <code>String</code> with the absolute path to the collection that holds the data object.
+ * <code>String</code> with the absolute path to the collection
+ * that holds the data object.
* @param dataObjectName
* <code>String</code> with the name of the data object.
* @return <code>List<Resource></code>
* @throws IdropException
*/
- public List<Resource> getResourcesForDataObject(final String irodsCollectionAbsolutePath,
+ public List<Resource> getResourcesForDataObject(
+ final String irodsCollectionAbsolutePath,
final String dataObjectName) throws IdropException {
try {
DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount);
- return dataObjectAO.getResourcesForDataObject(irodsCollectionAbsolutePath, dataObjectName);
+ return dataObjectAO.getResourcesForDataObject(
+ irodsCollectionAbsolutePath, dataObjectName);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("exception getting resources for a data object", ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException(
+ "exception getting resources for a data object", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
- public boolean createNewFolder(final String newFolderAbsolutePath) throws IdropException {
+ public boolean createNewFolder(final String newFolderAbsolutePath)
+ throws IdropException {
log.info("createNewFolder");
if (newFolderAbsolutePath == null || newFolderAbsolutePath.isEmpty()) {
@@ -474,24 +540,27 @@ public class IRODSFileService {
boolean createSuccessful = false;
try {
- IRODSFile newDirectory = irodsFileSystem.getIRODSFileFactory(irodsAccount).instanceIRODSFile(
- newFolderAbsolutePath);
+ IRODSFile newDirectory = irodsFileSystem.getIRODSFileFactory(
+ irodsAccount).instanceIRODSFile(newFolderAbsolutePath);
createSuccessful = newDirectory.mkdirs();
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception creating new dir", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
return createSuccessful;
}
- public void deleteFileOrFolderNoForce(final String deleteFileAbsolutePath) throws IdropException {
+ public void deleteFileOrFolderNoForce(final String deleteFileAbsolutePath)
+ throws IdropException {
log.info("deleteFileOrFolderNoForce");
@@ -502,22 +571,26 @@ public class IRODSFileService {
log.info("delete path:{}", deleteFileAbsolutePath);
try {
- IRODSFile deleteFileOrDir = irodsFileSystem.getIRODSFileFactory(irodsAccount).instanceIRODSFile(
- deleteFileAbsolutePath);
+ IRODSFile deleteFileOrDir = irodsFileSystem.getIRODSFileFactory(
+ irodsAccount).instanceIRODSFile(deleteFileAbsolutePath);
deleteFileOrDir.delete();
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("exception deleting dir:" + deleteFileAbsolutePath, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropException("exception deleting dir:"
+ + deleteFileAbsolutePath, ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
- public void moveCollectionUnderneathNewParent(final String currentAbsolutePath, final String newAbsolutePath)
+ public void moveCollectionUnderneathNewParent(
+ final String currentAbsolutePath, final String newAbsolutePath)
throws IdropException {
log.info("renameFileOrFolder");
@@ -534,34 +607,40 @@ public class IRODSFileService {
log.info("newAbsolutePath:{}", newAbsolutePath);
try {
- DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory()
- .getDataTransferOperations(irodsAccount);
+ DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory().getDataTransferOperations(
+ irodsAccount);
dataTransferOperations.moveTheSourceCollectionUnderneathTheTargetCollectionUsingSourceParentCollectionName(
currentAbsolutePath, newAbsolutePath);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception renaming file", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
- public String renameIRODSFileOrDirectory(final String irodsCurrentAbsolutePath, final String newFileOrCollectionName)
- throws IdropException {
+ public String renameIRODSFileOrDirectory(
+ final String irodsCurrentAbsolutePath,
+ final String newFileOrCollectionName) throws IdropException {
- if (irodsCurrentAbsolutePath == null || irodsCurrentAbsolutePath.isEmpty()) {
+ if (irodsCurrentAbsolutePath == null
+ || irodsCurrentAbsolutePath.isEmpty()) {
throw new IdropException("null or empty irodsCurrentAbsolutePath");
}
- if (newFileOrCollectionName == null || newFileOrCollectionName.isEmpty()) {
+ if (newFileOrCollectionName == null
+ || newFileOrCollectionName.isEmpty()) {
throw new IdropException("null or empty newFileOrCollectionName");
}
- log.info("rename of IRODSFileOrDirectory, current absPath:{}", irodsCurrentAbsolutePath);
+ log.info("rename of IRODSFileOrDirectory, current absPath:{}",
+ irodsCurrentAbsolutePath);
log.info("newFileOrCollectionName:{}", newFileOrCollectionName);
String newPath = "";
@@ -577,25 +656,28 @@ public class IRODSFileService {
newPath = newPathSb.toString();
- DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory()
- .getDataTransferOperations(irodsAccount);
+ DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory().getDataTransferOperations(
+ irodsAccount);
dataTransferOperations.move(irodsCurrentAbsolutePath, newPath);
log.info("move completed");
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception moving file", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
return newPath;
}
- public void moveIRODSFileUnderneathNewParent(final String currentAbsolutePath, final String newAbsolutePath)
+ public void moveIRODSFileUnderneathNewParent(
+ final String currentAbsolutePath, final String newAbsolutePath)
throws IdropException {
log.info("moveIRODSFileUnderneathNewParent");
@@ -612,17 +694,19 @@ public class IRODSFileService {
log.info("newAbsolutePath:{}", newAbsolutePath);
try {
- DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory()
- .getDataTransferOperations(irodsAccount);
+ DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory().getDataTransferOperations(
+ irodsAccount);
dataTransferOperations.move(currentAbsolutePath, newAbsolutePath);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropException("exception moving file", ex);
} finally {
try {
irodsFileSystem.close(irodsAccount);
} catch (JargonException ex) {
- Logger.getLogger(IRODSFileService.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileService.class.getName()).log(
+ Level.SEVERE, null, ex);
}
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IconManager.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IconManager.java
index 3ef4935..60fc13e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IconManager.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IconManager.java
@@ -11,21 +11,21 @@ import org.irods.jargon.transfer.engine.TransferManager;
public class IconManager {
private TransferManager.ErrorStatus errorStatus = null;
-
private TransferManager.RunningStatus runningStatus = null;
-
private final iDrop idropGui;
public IconManager(final iDrop idropClient) {
this.idropGui = idropClient;
}
- public synchronized void setErrorStatus(final TransferManager.ErrorStatus errorStatus) {
+ public synchronized void setErrorStatus(
+ final TransferManager.ErrorStatus errorStatus) {
this.errorStatus = errorStatus;
updateIcon();
}
- public synchronized void setRunningStatus(final TransferManager.RunningStatus runningStatus) {
+ public synchronized void setRunningStatus(
+ final TransferManager.RunningStatus runningStatus) {
this.runningStatus = runningStatus;
updateIcon();
}
@@ -47,5 +47,4 @@ public class IconManager {
}
idropGui.updateIcon(iconFile);
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
index e736152..a58eb88 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
@@ -13,11 +13,13 @@ import org.irods.jargon.idrop.exceptions.IdropException;
* @author mikeconway
*/
public interface IdropConfigurationService {
+
String IDROP_PROPS_FILE_NAME = "idrop.properties";
String FORCE_MODE = "force.mode";
String FORCE_NO_SYNCH = "force.no.synch";
String LOGIN_PRESET = "login.preset";
String SHOW_STARTUP = "show.startup";
+ String SHOW_GUI = "idrop.show.gui";
Properties bootstrapConfiguration() throws IdropException;
@@ -27,5 +29,4 @@ public interface IdropConfigurationService {
* @throws IdropException
*/
void saveConfigurationToPropertiesFile() throws IdropException;
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java
index 573d082..803b5c1 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java
@@ -7,6 +7,7 @@ import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.irods.jargon.idrop.desktop.systraygui.IDROPCore;
import org.irods.jargon.idrop.desktop.systraygui.utils.IdropPropertiesHelper;
import org.irods.jargon.idrop.exceptions.IdropAlreadyRunningException;
import org.irods.jargon.idrop.exceptions.IdropException;
@@ -16,36 +17,46 @@ import org.irods.jargon.transfer.engine.ConfigurationService;
import org.slf4j.LoggerFactory;
/**
- * Manage configuration information. This service will initialize and manage configuration information from iDrop
+ * Manage configuration information. This service will initialize and manage
+ * configuration information from iDrop
*
* @author Mike Conway - DICE (www.irods.org)
*/
public class IdropConfigurationServiceImpl implements IdropConfigurationService {
private final String idropConfigRootDirectoryAbsolutePath;
-
private final ConfigurationService configurationService;
-
+ private final IDROPCore idropCore;
private static final org.slf4j.Logger log = LoggerFactory.getLogger(IdropConfigurationServiceImpl.class);
- public IdropConfigurationServiceImpl(final String idropConfigRootDirectoryAbsolutePath)
- throws IdropAlreadyRunningException, IdropException {
+ public IdropConfigurationServiceImpl(
+ final String idropConfigRootDirectoryAbsolutePath,
+ final IDROPCore idropCore) throws IdropAlreadyRunningException,
+ IdropException {
if (idropConfigRootDirectoryAbsolutePath == null) {
- throw new IllegalArgumentException("idropConfigRootDirectoryAbsolutePath is null");
+ throw new IllegalArgumentException(
+ "idropConfigRootDirectoryAbsolutePath is null");
+ }
+
+ if (idropCore == null) {
+ throw new IllegalArgumentException("idropCore is null");
}
+ this.idropConfigRootDirectoryAbsolutePath = idropConfigRootDirectoryAbsolutePath;
+ this.idropCore = idropCore;
+
log.info("getting config service via factory");
try {
TransferServiceFactoryImpl transferServiceFactory = new TransferServiceFactoryImpl();
- this.idropConfigRootDirectoryAbsolutePath = idropConfigRootDirectoryAbsolutePath;
this.configurationService = transferServiceFactory.instanceConfigurationService();
} catch (Exception ex) {
Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
if (ex.getMessage().indexOf("Failed to start database") != -1) {
- throw new IdropAlreadyRunningException("iDrop is already running");
+ throw new IdropAlreadyRunningException(
+ "iDrop is already running");
} else {
throw new IdropException(ex);
}
@@ -64,7 +75,8 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
} catch (Exception ex) {
Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
if (ex.getMessage().indexOf("Could not open Hibernate Session") != -1) {
- throw new IdropAlreadyRunningException("iDrop is already running, or the iDrop database is in use");
+ throw new IdropAlreadyRunningException(
+ "iDrop is already running, or the iDrop database is in use");
} else {
throw new IdropException(ex);
}
@@ -85,10 +97,11 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
log.info("now storing derived properties in idrop configuration");
log.info("checking for force mode, which forces certain properties to be loaded from the idrop.properties file");
/*
- * This is something of a shim right now until config things settle down. For lifetime library, force into login preset mode
+ * This is something of a shim right now until config things settle
+ * down. For lifetime library, force into login preset mode
*/
-
- String forceMode = (String) configFileProperties.getProperty(FORCE_MODE);
+
+ String forceMode = configFileProperties.getProperty(FORCE_MODE);
if (forceMode != null) {
boolean isForce = Boolean.valueOf(forceMode);
log.info("force mode is:{}", isForce);
@@ -97,11 +110,12 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
databaseProperties.setProperty(LOGIN_PRESET, "true");
}
}
-
+
/*
- * If the distro has the idrop.properties to force.no.synch=true, then override the force option in effect
+ * If the distro has the idrop.properties to force.no.synch=true, then
+ * override the force option in effect
*/
- forceMode = (String) configFileProperties.getProperty(FORCE_NO_SYNCH);
+ forceMode = configFileProperties.getProperty(FORCE_NO_SYNCH);
if (forceMode != null) {
boolean isForce = Boolean.valueOf(forceMode);
log.info("force no synch mode mode is:{}", isForce);
@@ -110,9 +124,7 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
databaseProperties.setProperty(SHOW_STARTUP, "false");
}
}
-
-
-
+
saveConfigurationToPropertiesFile();
return databaseProperties;
@@ -126,7 +138,8 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
@Override
public void saveConfigurationToPropertiesFile() throws IdropException {
log.info("saveConfigurationToPropertiesFile()");
- StringBuilder sb = new StringBuilder(idropConfigRootDirectoryAbsolutePath);
+ StringBuilder sb = new StringBuilder(
+ idropConfigRootDirectoryAbsolutePath);
sb.append("/");
sb.append(IDROP_PROPS_FILE_NAME);
@@ -138,19 +151,23 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
throw new IdropException("exception exporting final properties", ex);
} catch (IOException ioe) {
Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ioe);
- throw new IdropException("exception storing final properties in file", ioe);
+ throw new IdropException(
+ "exception storing final properties in file", ioe);
}
}
/**
- * In cases where there are no database properties, attempt to import them from a file in the .idrop directory
+ * In cases where there are no database properties, attempt to import them
+ * from a file in the .idrop directory
*
* @return
* @throws IdropException
*/
- private Properties importPropertiesFromPropertiesFile() throws IdropException {
+ private Properties importPropertiesFromPropertiesFile()
+ throws IdropException {
log.info("importPropertiesFromPropertiesFile()");
- StringBuilder sb = new StringBuilder(idropConfigRootDirectoryAbsolutePath);
+ StringBuilder sb = new StringBuilder(
+ idropConfigRootDirectoryAbsolutePath);
sb.append("/");
sb.append(IDROP_PROPS_FILE_NAME);
Properties properties = new Properties();
@@ -165,7 +182,8 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
}
- private void importGivenPropertiesIntoDatabase(Properties properties) throws IdropException {
+ private void importGivenPropertiesIntoDatabase(final Properties properties)
+ throws IdropException {
if (!properties.isEmpty()) {
log.info("some properties were located, importing into the database");
log.debug("props from file:{}", properties);
@@ -173,7 +191,8 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
configurationService.importProperties(properties);
} catch (TransferEngineException ex) {
Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("unable to import properties into database", ex);
+ throw new IdropException(
+ "unable to import properties into database", ex);
}
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/LocalTransferWorker.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/LocalTransferWorker.java
index c4e343e..c1c6acb 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/LocalTransferWorker.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/LocalTransferWorker.java
@@ -8,46 +8,47 @@ import org.irods.jargon.transfer.engine.TransferManager;
import org.slf4j.LoggerFactory;
/**
- * Swing worker to manage local transfers to iRODS. This method can serve as a bridge for callbacks as well
+ * Swing worker to manage local transfers to iRODS. This method can serve as a
+ * bridge for callbacks as well
*
* @author Mike Conway - DICE (www.irods.org)
*/
public final class LocalTransferWorker extends SwingWorker {
public static org.slf4j.Logger log = LoggerFactory.getLogger(LocalTransferWorker.class);
-
private final TransferManager transferManager;
-
private final String localSourceAbsolutePath;
-
private final String irodsTargetAbsolutePath;
-
private final String targetResource;
-
private final IRODSAccount irodsAccount;
- public LocalTransferWorker(final TransferManager transferManager, final String localSourceAbsolutePath,
- final String irodsTargetAbsolutePath, final String targetResource, final IRODSAccount irodsAccount)
- throws IdropException {
+ public LocalTransferWorker(final TransferManager transferManager,
+ final String localSourceAbsolutePath,
+ final String irodsTargetAbsolutePath, final String targetResource,
+ final IRODSAccount irodsAccount) throws IdropException {
if (transferManager == null) {
throw new IdropException("null transferManager");
}
- if (localSourceAbsolutePath == null || localSourceAbsolutePath.isEmpty()) {
+ if (localSourceAbsolutePath == null
+ || localSourceAbsolutePath.isEmpty()) {
throw new IdropException("null or empty localSourceAbsolutePath");
}
- if (irodsTargetAbsolutePath == null || irodsTargetAbsolutePath.isEmpty()) {
+ if (irodsTargetAbsolutePath == null
+ || irodsTargetAbsolutePath.isEmpty()) {
throw new IdropException("null or empty irodsTargetAbsolutePath");
}
if (targetResource == null) {
- throw new IdropException("null targetResource, leave as blank if default is desired");
+ throw new IdropException(
+ "null targetResource, leave as blank if default is desired");
}
if (irodsAccount == null) {
- throw new IdropException("null irodsAccount, leave as blank if default is desired");
+ throw new IdropException(
+ "null irodsAccount, leave as blank if default is desired");
}
this.transferManager = transferManager;
@@ -61,7 +62,8 @@ public final class LocalTransferWorker extends SwingWorker {
@Override
protected Object doInBackground() throws Exception {
log.info("initiating transfer");
- transferManager.enqueueAPut(localSourceAbsolutePath, irodsTargetAbsolutePath, targetResource, irodsAccount);
+ transferManager.enqueueAPut(localSourceAbsolutePath,
+ irodsTargetAbsolutePath, targetResource, irodsAccount);
// return a final transfer status
return null;
}
@@ -71,5 +73,4 @@ public final class LocalTransferWorker extends SwingWorker {
log.info("done!");
super.done();
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/QueueSchedulerTimerTask.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/QueueSchedulerTimerTask.java
index 3c7de2c..27b930e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/QueueSchedulerTimerTask.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/QueueSchedulerTimerTask.java
@@ -16,16 +16,13 @@ import org.slf4j.LoggerFactory;
public class QueueSchedulerTimerTask extends TimerTask {
private final TransferManager transferManager;
-
private final iDrop idropGui;
-
public final static long EVERY_10_MINUTES = 1000 * 60 * 10;
-
public final static long EVERY_30_SECONDS = 1000 * 30;
-
private final org.slf4j.Logger log = LoggerFactory.getLogger(QueueSchedulerTimerTask.class);
- public QueueSchedulerTimerTask(TransferManager transferManager, iDrop idropGui) throws IdropException {
+ public QueueSchedulerTimerTask(final TransferManager transferManager,
+ final iDrop idropGui) throws IdropException {
super();
if (transferManager == null) {
@@ -54,7 +51,8 @@ public class QueueSchedulerTimerTask extends TimerTask {
log.info("***** timer queue asking transfer manager to process next");
transferManager.processNextInQueueIfIdle();
} catch (JargonException ex) {
- Logger.getLogger(QueueSchedulerTimerTask.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(QueueSchedulerTimerTask.class.getName()).log(
+ Level.SEVERE, null, ex);
idropGui.showIdropException(ex);
return;
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RefreshQueueManagerTimerTask.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RefreshQueueManagerTimerTask.java
index 153dcd3..b1daede 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RefreshQueueManagerTimerTask.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RefreshQueueManagerTimerTask.java
@@ -2,7 +2,6 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-
package org.irods.jargon.idrop.desktop.systraygui.services;
import java.util.TimerTask;
@@ -19,15 +18,15 @@ import org.slf4j.LoggerFactory;
public class RefreshQueueManagerTimerTask extends TimerTask {
final QueueManagerDialog queueManagerDialog;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(RefreshQueueManagerTimerTask.class);
- public static final RefreshQueueManagerTimerTask instance(final QueueManagerDialog queueManagerDialog)
- throws IdropException {
+ public static final RefreshQueueManagerTimerTask instance(
+ final QueueManagerDialog queueManagerDialog) throws IdropException {
return new RefreshQueueManagerTimerTask(queueManagerDialog);
}
- private RefreshQueueManagerTimerTask(final QueueManagerDialog queueManagerDialog) throws IdropException {
+ private RefreshQueueManagerTimerTask(
+ final QueueManagerDialog queueManagerDialog) throws IdropException {
if (queueManagerDialog == null) {
throw new IdropException("null queueManagerDialog");
}
@@ -38,5 +37,4 @@ public class RefreshQueueManagerTimerTask extends TimerTask {
public void run() {
queueManagerDialog.refreshTableView(queueManagerDialog.getViewType());
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java
index 8a56e91..80dd779 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java
@@ -9,41 +9,41 @@ import org.irods.jargon.idrop.exceptions.IdropException;
import org.slf4j.LoggerFactory;
/**
- * Swing worker to manage rule execution, and a bridge to handle callbacks between the rule and the client
+ * Swing worker to manage rule execution, and a bridge to handle callbacks
+ * between the rule and the client
*
* @author Mike Conway - DICE (www.irods.org)
*/
public final class RuleExecutionWorker extends SwingWorker {
public static org.slf4j.Logger log = LoggerFactory.getLogger(RuleExecutionWorker.class);
-
private final String irodsTargetAbsolutePath;
-
private final String targetResource;
-
private final IRODSAccount irodsAccount;
-
private final iDrop idropGui;
-
private IRODSRuleExecResult execResult = null;
- public RuleExecutionWorker(final iDrop idropGui, final String irodsTargetAbsolutePath, final String targetResource,
+ public RuleExecutionWorker(final iDrop idropGui,
+ final String irodsTargetAbsolutePath, final String targetResource,
final IRODSAccount irodsAccount) throws IdropException {
if (idropGui == null) {
throw new IdropException("null idropGui");
}
- if (irodsTargetAbsolutePath == null || irodsTargetAbsolutePath.isEmpty()) {
+ if (irodsTargetAbsolutePath == null
+ || irodsTargetAbsolutePath.isEmpty()) {
throw new IdropException("null or empty irodsTargetAbsolutePath");
}
if (targetResource == null) {
- throw new IdropException("null targetResource, leave as blank if default is desired");
+ throw new IdropException(
+ "null targetResource, leave as blank if default is desired");
}
if (irodsAccount == null) {
- throw new IdropException("null irodsAccount, leave as blank if default is desired");
+ throw new IdropException(
+ "null irodsAccount, leave as blank if default is desired");
}
this.idropGui = idropGui;
@@ -56,8 +56,8 @@ public final class RuleExecutionWorker extends SwingWorker {
@Override
protected Object doInBackground() throws Exception {
log.info("initiating rule execution");
- IRODSFileService irodsFileService = new IRODSFileService(irodsAccount, idropGui.getiDropCore()
- .getIrodsFileSystem());
+ IRODSFileService irodsFileService = new IRODSFileService(irodsAccount,
+ idropGui.getiDropCore().getIrodsFileSystem());
execResult = irodsFileService.runIRODSRule(RuleLibrary.collectionRule(irodsTargetAbsolutePath));
return execResult;
}
@@ -67,5 +67,4 @@ public final class RuleExecutionWorker extends SwingWorker {
log.info("rule execution finished with result:{}", execResult);
idropGui.showMessageFromOperation("rule execution finished");
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java
index 9b58f73..04dbae3 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java
@@ -10,13 +10,15 @@ import org.irods.jargon.idrop.exceptions.IdropException;
public class RuleLibrary {
private RuleLibrary() {
-
}
- public static String virusScanOnCollectionRule(final String targetCollectionAbsolutePath) throws IdropException {
+ public static String virusScanOnCollectionRule(
+ final String targetCollectionAbsolutePath) throws IdropException {
- if (targetCollectionAbsolutePath == null || targetCollectionAbsolutePath.isEmpty()) {
- throw new IdropException("null or empty targetCollectionAbsolutePath");
+ if (targetCollectionAbsolutePath == null
+ || targetCollectionAbsolutePath.isEmpty()) {
+ throw new IdropException(
+ "null or empty targetCollectionAbsolutePath");
}
// FIXME: currently a dummy rule
@@ -29,9 +31,12 @@ public class RuleLibrary {
return sb.toString();
}
- public static String collectionRule(final String targetCollectionAbsolutePath) throws IdropException {
- if (targetCollectionAbsolutePath == null || targetCollectionAbsolutePath.isEmpty()) {
- throw new IdropException("null or empty targetCollectionAbsolutePath");
+ public static String collectionRule(
+ final String targetCollectionAbsolutePath) throws IdropException {
+ if (targetCollectionAbsolutePath == null
+ || targetCollectionAbsolutePath.isEmpty()) {
+ throw new IdropException(
+ "null or empty targetCollectionAbsolutePath");
}
// FIXME: currently a dummy rule
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/util/MessageUtil.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/util/MessageUtil.java
index a9fc160..b45cd69 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/util/MessageUtil.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/util/MessageUtil.java
@@ -11,23 +11,34 @@ import javax.swing.JOptionPane;
*/
public class MessageUtil {
- public static void showError(Component rootComponent, String message, String title) {
- JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.ERROR_MESSAGE);
+ public static void showError(final Component rootComponent,
+ final String message, final String title) {
+ JOptionPane.showMessageDialog(rootComponent, message, title,
+ JOptionPane.ERROR_MESSAGE);
}
- public static void showWarning(Component rootComponent, String message, String title) {
- JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.WARNING_MESSAGE);
+ public static void showWarning(final Component rootComponent,
+ final String message, final String title) {
+ JOptionPane.showMessageDialog(rootComponent, message, title,
+ JOptionPane.WARNING_MESSAGE);
}
- public static void showMessage(Component rootComponent, String message, String title) {
- JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.INFORMATION_MESSAGE);
+ public static void showMessage(final Component rootComponent,
+ final String message, final String title) {
+ JOptionPane.showMessageDialog(rootComponent, message, title,
+ JOptionPane.INFORMATION_MESSAGE);
}
- public static int showConfirm(Component rootComponent, String message, String title) {
- return showConfirm(rootComponent, message, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
+ public static int showConfirm(final Component rootComponent,
+ final String message, final String title) {
+ return showConfirm(rootComponent, message, title,
+ JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
}
- public static int showConfirm(Component rootComponent, String message, String title, int optionType, int messageType) {
- return JOptionPane.showConfirmDialog(rootComponent, message, title, optionType, messageType);
+ public static int showConfirm(final Component rootComponent,
+ final String message, final String title, final int optionType,
+ final int messageType) {
+ return JOptionPane.showConfirmDialog(rootComponent, message, title,
+ optionType, messageType);
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/ColorHelper.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/ColorHelper.java
index 1063cef..72c5a01 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/ColorHelper.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/ColorHelper.java
@@ -12,7 +12,6 @@ import java.util.List;
public class ColorHelper {
private List<Color> colorWheel = new ArrayList<Color>();
-
private int colorIndex = 0;
public ColorHelper() {
@@ -30,10 +29,11 @@ public class ColorHelper {
colorWheel.add(Color.LIGHT_GRAY);
colorWheel.add(new Color(198, 229, 235));
/*
- * colorWheel.add(new Color(198, 229, 235)); colorWheel.add(new Color(198, 235, 217));
+ * colorWheel.add(new Color(198, 229, 235)); colorWheel.add(new
+ * Color(198, 235, 217));
*
- * colorWheel.add(new Color(235, 204, 198)); colorWheel.add(new Color(198, 205, 235)); colorWheel.add(new
- * Color(212, 206, 204));
+ * colorWheel.add(new Color(235, 204, 198)); colorWheel.add(new
+ * Color(198, 205, 235)); colorWheel.add(new Color(212, 206, 204));
*/
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IDropUtils.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IDropUtils.java
index 59d42f4..7b1ce42 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IDropUtils.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IDropUtils.java
@@ -8,7 +8,8 @@ package org.irods.jargon.idrop.desktop.systraygui.utils;
public class IDropUtils {
/**
- * Given a file name, return the name up to 100 chars, otherwise, redact and abbreviate
+ * Given a file name, return the name up to 100 chars, otherwise, redact and
+ * abbreviate
*
* @param fileName
* @return
@@ -32,5 +33,4 @@ public class IDropUtils {
return sb.toString();
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IconHelper.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IconHelper.java
index fedf4d1..b34c2a8 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IconHelper.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IconHelper.java
@@ -16,25 +16,15 @@ import org.irods.jargon.idrop.desktop.systraygui.iDrop;
public class IconHelper {
private static Image virusErrorIcon = null;
-
private static Image virusSuccessIcon = null;
-
private static Image virusUnknownIcon = null;
-
private static Image checksumValidIcon = null;
-
private static Image checksumErrorIcon = null;
-
private static Image folderIcon = null;
-
private static Image folderOpenIcon = null;
-
private static Image fileIcon = null;
-
private static Image metadataIcon = null;
-
private static Image policyIcon = null;
-
private static Image replicationIcon = null;
public static JLabel getFolderIcon() {
@@ -49,7 +39,8 @@ public class IconHelper {
public static JLabel getFolderOpenIcon() {
if (folderOpenIcon == null) {
- folderOpenIcon = createImage("images/folder-open.png", "folder open");
+ folderOpenIcon = createImage("images/folder-open.png",
+ "folder open");
}
return new JLabel(new ImageIcon(folderOpenIcon));
@@ -66,7 +57,8 @@ public class IconHelper {
public static JLabel getVirusErrorIcon() {
if (virusErrorIcon == null) {
- virusErrorIcon = createImage("images/virus-detected.png", "virus scan fail");
+ virusErrorIcon = createImage("images/virus-detected.png",
+ "virus scan fail");
}
JLabel virusErrorLabel = new JLabel(new ImageIcon(virusErrorIcon));
@@ -77,7 +69,8 @@ public class IconHelper {
public static JLabel getVirusSuccessIcon() {
if (virusSuccessIcon == null) {
- virusSuccessIcon = createImage("images/security-high-2.png", "virus scan success");
+ virusSuccessIcon = createImage("images/security-high-2.png",
+ "virus scan success");
}
JLabel virusLabel = new JLabel(new ImageIcon(virusSuccessIcon));
virusLabel.setToolTipText("virus scan success");
@@ -88,7 +81,8 @@ public class IconHelper {
public static JLabel getVirusUnknownIcon() {
if (virusUnknownIcon == null) {
- virusUnknownIcon = createImage("images/dialog-question.png", "virus scan unknown");
+ virusUnknownIcon = createImage("images/dialog-question.png",
+ "virus scan unknown");
}
JLabel virusLabel = new JLabel(new ImageIcon(virusUnknownIcon));
virusLabel.setToolTipText("virus scan status unknown");
@@ -99,7 +93,8 @@ public class IconHelper {
public static JLabel getFixityErrorIcon() {
if (checksumErrorIcon == null) {
- checksumErrorIcon = createImage("images/checksum-error.png", "fixity check fail");
+ checksumErrorIcon = createImage("images/checksum-error.png",
+ "fixity check fail");
}
JLabel virusLabel = new JLabel(new ImageIcon(checksumErrorIcon));
virusLabel.setToolTipText("fixity check error - missing checksum");
@@ -110,7 +105,8 @@ public class IconHelper {
public static JLabel getFixityOkIcon() {
if (checksumValidIcon == null) {
- checksumValidIcon = createImage("images/checksum-valid.png", "fixity check ok");
+ checksumValidIcon = createImage("images/checksum-valid.png",
+ "fixity check ok");
}
JLabel virusLabel = new JLabel(new ImageIcon(checksumValidIcon));
virusLabel.setToolTipText("fixity check success");
@@ -127,7 +123,8 @@ public class IconHelper {
policyIcon = createImage("images/policy.png", "policy");
}
JLabel policyLabel = new JLabel(new ImageIcon(policyIcon));
- policyLabel.setToolTipText("This collection has a bound policy - " + policyDescription);
+ policyLabel.setToolTipText("This collection has a bound policy - "
+ + policyDescription);
return policyLabel;
}
@@ -143,13 +140,15 @@ public class IconHelper {
public static Image getReplicationImage() {
if (replicationIcon == null) {
- replicationIcon = createImage("images/replication-status.png", "replicationicon");
+ replicationIcon = createImage("images/replication-status.png",
+ "replicationicon");
}
return replicationIcon;
}
/** Returns an ImageIcon, or null if the path was invalid. */
- protected static Image createImage(String path, String description) {
+ protected static Image createImage(final String path,
+ final String description) {
URL imageURL = iDrop.class.getResource(path);
if (imageURL == null) {
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
index 758b1da..686aea5 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
@@ -6,6 +6,7 @@ import java.util.Properties;
import org.apache.log4j.Level;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;
+import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
/**
* Access data about the configuration of Idrop
@@ -21,8 +22,8 @@ public class IdropConfig {
}
/**
- * Initialize this wrapper around properties with the <code>Properties</code> that represent the idrop
- * configuration.
+ * Initialize this wrapper around properties with the
+ * <code>Properties</code> that represent the idrop configuration.
*
* @param properties
*/
@@ -36,7 +37,8 @@ public class IdropConfig {
/**
* Does iDrop need to display policy-aware features?
*
- * @return <code>boolean</code> that will be <code>true</code> if policy features are displayed.
+ * @return <code>boolean</code> that will be <code>true</code> if policy
+ * features are displayed.
*/
public boolean isPolicyAware() {
boolean policyAware = false;
@@ -51,9 +53,11 @@ public class IdropConfig {
}
/**
- * Does iDrop need to display advanced options? Otherwise, a simpler client is presented
+ * Does iDrop need to display advanced options? Otherwise, a simpler client
+ * is presented
*
- * @return <code>boolean</code> that will be <code>true</code> if policy features are displayed.
+ * @return <code>boolean</code> that will be <code>true</code> if policy
+ * features are displayed.
*/
public boolean isAdvancedView() {
boolean advancedView = false;
@@ -100,10 +104,10 @@ public class IdropConfig {
*/
public boolean isLogSuccessfulTransfers() {
boolean logSuccessful = false;
- String logSuccessfulTransfers = idropProperties
- .getProperty(IdropPropertiesHelper.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
+ String logSuccessfulTransfers = idropProperties.getProperty(IdropPropertiesHelper.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
- if (logSuccessfulTransfers != null && logSuccessfulTransfers.equals("true")) {
+ if (logSuccessfulTransfers != null
+ && logSuccessfulTransfers.equals("true")) {
logSuccessful = true;
}
@@ -111,7 +115,8 @@ public class IdropConfig {
}
/**
- * Get the configured synch device name. If not set, this will return a <code>null</code>
+ * Get the configured synch device name. If not set, this will return a
+ * <code>null</code>
*
* @return
*/
@@ -119,22 +124,21 @@ public class IdropConfig {
return idropProperties.getProperty(IdropPropertiesHelper.SYNCH_DEVICE_NAME);
}
-
public boolean isShowStartupWizard() {
- boolean showWizard = false;
- String showStartup = idropProperties
- .getProperty(IdropPropertiesHelper.SHOW_STARTUP);
+ boolean showWizard = false;
+ String showStartup = idropProperties.getProperty(IdropPropertiesHelper.SHOW_STARTUP);
if (showStartup != null && showStartup.equals("true")) {
showWizard = true;
}
return showWizard;
-
+
}
+
/**
- * Should I have a rolling log in the user dir? Will return null of no logging desired, otherwise, will return a log
- * level
+ * Should I have a rolling log in the user dir? Will return null of no
+ * logging desired, otherwise, will return a log level
*
* @return
*/
@@ -169,10 +173,12 @@ public class IdropConfig {
rootLogger.setLevel(Level.ERROR);
}
- PatternLayout layout = new PatternLayout("%d %-4r [%t] %-5p %c %x - %m%n");
+ PatternLayout layout = new PatternLayout(
+ "%d %-4r [%t] %-5p %c %x - %m%n");
try {
- RollingFileAppender rfa = new RollingFileAppender(layout, sb.toString());
+ RollingFileAppender rfa = new RollingFileAppender(layout,
+ sb.toString());
rfa.setMaximumFileSize(1000000);
rootLogger.addAppender(rfa);
} catch (IOException e) {
@@ -180,4 +186,15 @@ public class IdropConfig {
}
}
+
+ public boolean isShowGuiAtStartup() {
+ boolean propBoolean = false;
+ String propString = idropProperties.getProperty(IdropConfigurationService.SHOW_GUI);
+
+ if (propString != null && propString.equals("true")) {
+ propBoolean = true;
+ }
+
+ return propBoolean;
+ }
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java
index 40154cc..a6dcf17 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java
@@ -14,27 +14,16 @@ import org.irods.jargon.idrop.exceptions.IdropException;
public class IdropPropertiesHelper {
public static final String POLICY_AWARE_PROPERTY = "policy.aware";
-
public static final String LOGIN_PRESET = "login.preset";
-
public static final String LOGIN_PRESET_HOST = "login.preset.host";
-
public static final String LOGIN_PRESET_PORT = "login.preset.port";
-
public static final String LOGIN_PRESET_ZONE = "login.preset.zone";
-
public static final String LOGIN_PRESET_RESOURCE = "login.preset.resource";
-
public static final String TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES = "transferengine.record.successful.files";
-
public static final String ADVANCED_VIEW_PROPERTY = "advanced.view";
-
public static final String TRANSFER_DATABASE_NAME = "transfer.database";
-
public static final String ROLLING_LOG_LEVEL = "rolling.log.level";
-
public static final String SYNCH_DEVICE_NAME = "synch.device.name";
-
public static final String SHOW_STARTUP = "show.startup";
/**
@@ -62,5 +51,4 @@ public class IdropPropertiesHelper {
return properties;
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LocalFileUtils.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LocalFileUtils.java
index e94a4ca..88b4832 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LocalFileUtils.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LocalFileUtils.java
@@ -14,8 +14,8 @@ public class LocalFileUtils {
public static List<String> listFileRootsForSystem() {
List<String> fileRoots = new ArrayList<String>();
File[] roots = File.listRoots();
- for (int i = 0; i < roots.length; i++) {
- fileRoots.add(roots[i].getPath());
+ for (File root : roots) {
+ fileRoots.add(root.getPath());
}
return fileRoots;
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 0ccedce..862d7ad 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
@@ -30,21 +30,19 @@ public class TreeUtils {
public static org.slf4j.Logger log = LoggerFactory.getLogger(TreeUtils.class);
- public static IRODSNode findChild(IRODSNode parent, String userObject) throws IdropException {
+ public static IRODSNode findChild(final IRODSNode parent,
+ final String userObject) throws IdropException {
log.debug("finding child of parent:{}", parent);
log.debug("user object:{}", userObject);
- String childString = "";
-
- // FIXME: children of archive1 is null, child count is empty so it does not look for nodes
-
- CollectionAndDataObjectListingEntry parentEntry = (CollectionAndDataObjectListingEntry) parent.getUserObject();
+ parent.getUserObject();
CollectionAndDataObjectListingEntry childEntry = null;
IRODSNode foundNode = null;
try {
parent.lazyLoadOfChildrenOfThisNode();
} catch (IdropException ex) {
- Logger.getLogger(TreeUtils.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(TreeUtils.class.getName()).log(Level.SEVERE, null,
+ ex);
throw new IdropException("unable to load children of node");
}
@@ -63,7 +61,9 @@ public class TreeUtils {
sb.append(childEntry.getParentPath());
sb.append('/');
sb.append(childEntry.getPathOrName());
- log.debug("looking for match when child entry is a file with abs path:{}", sb.toString());
+ log.debug(
+ "looking for match when child entry is a file with abs path:{}",
+ sb.toString());
if (userObject.equals(sb.toString())) {
foundNode = (IRODSNode) parent.getChildAt(i);
break;
@@ -73,14 +73,11 @@ public class TreeUtils {
return foundNode;
}
- public static LocalFileNode findChild(LocalFileNode parent, String userObject) throws IdropException {
+ public static LocalFileNode findChild(final LocalFileNode parent,
+ final String userObject) throws IdropException {
log.debug("finding child of parent:{}", parent);
log.debug("user object:{}", userObject);
- String childString = "";
-
- // FIXME: children of archive1 is null, child count is empty so it does not look for nodes
-
- File parentEntry = (File) parent.getUserObject();
+ parent.getUserObject();
File childEntry = null;
LocalFileNode foundNode = null;
@@ -99,7 +96,9 @@ public class TreeUtils {
} else {
log.debug("child entry is a data object");
- log.debug("looking for match when child entry is a file with abs path:{}", childEntry.getAbsolutePath());
+ log.debug(
+ "looking for match when child entry is a file with abs path:{}",
+ childEntry.getAbsolutePath());
if (userObject.equals(childEntry.getAbsolutePath())) {
foundNode = (LocalFileNode) parent.getChildAt(i);
break;
@@ -109,12 +108,12 @@ public class TreeUtils {
return foundNode;
}
- public static TreePath buildTreePathForLocalAbsolutePath(final JTree tree, final String absolutePath)
- throws IdropException {
+ public static TreePath buildTreePathForLocalAbsolutePath(final JTree tree,
+ final String absolutePath) throws IdropException {
LocalFileSystemModel fileSystemModel = (LocalFileSystemModel) tree.getModel();
LocalFileNode localNode = (LocalFileNode) fileSystemModel.getRoot();
TreePath calculatedTreePath = new TreePath(localNode);
- File rootEntry = (File) localNode.getUserObject();
+ localNode.getUserObject();
String[] pathComponents = absolutePath.split("/");
StringBuilder searchRoot = new StringBuilder();
@@ -128,7 +127,8 @@ public class TreeUtils {
String nextPathComponent;
for (int i = 0; i < pathComponents.length; i++) {
- // next element from userObjects is the child of the current node, note that for the first node (typically
+ // next element from userObjects is the child of the current node,
+ // note that for the first node (typically
// '/') a delimiting slash is not needed
if (searchRoot.length() > 1) {
searchRoot.append('/');
@@ -141,7 +141,9 @@ public class TreeUtils {
}
if (currentNode == null) {
- log.warn("cannot find node for path, will attempt to return parent {}:", searchRoot.toString());
+ log.warn(
+ "cannot find node for path, will attempt to return parent {}:",
+ searchRoot.toString());
break;
} else {
// root node is already part of the calculcated tree path
@@ -160,35 +162,41 @@ public class TreeUtils {
}
/**
- * Given an absolute path to a file from the iRODS view, build the corresponding <code>TreePath</code> that points
- * to the position in the tree model.
+ * Given an absolute path to a file from the iRODS view, build the
+ * corresponding <code>TreePath</code> that points to the position in the
+ * tree model.
*
* @param tree
* <code>JTree</code> that depicts the iRODS file hierarchy.
* @param irodsAbsolutePath
- * <code>String</code> that gives the absolute path to the iRODS file.
- * @return <code>TreePath</code> to the given node at the given absolute path in iRODS.
+ * <code>String</code> that gives the absolute path to the iRODS
+ * file.
+ * @return <code>TreePath</code> to the given node at the given absolute
+ * path in iRODS.
* @throws IdropException
*/
- public static TreePath buildTreePathForIrodsAbsolutePath(final JTree tree, final String irodsAbsolutePath)
- throws IdropException {
+ public static TreePath buildTreePathForIrodsAbsolutePath(final JTree tree,
+ final String irodsAbsolutePath) throws IdropException {
IRODSFileSystemModel irodsFileSystemModel = (IRODSFileSystemModel) tree.getModel();
- // the root of the model, which may not be a path underneath the root of the irods resource
+ // the root of the model, which may not be a path underneath the root of
+ // the irods resource
IRODSNode rootNode = (IRODSNode) irodsFileSystemModel.getRoot();
TreePath calculatedTreePath = new TreePath(rootNode);
CollectionAndDataObjectListingEntry rootEntry = (CollectionAndDataObjectListingEntry) rootNode.getUserObject();
String[] irodsPathComponents = irodsAbsolutePath.split("/");
/*
- * get an array that has the path components that descend from the root of the iRODS file system to the
- * subdirectory which the tree model considers the root of the tree
+ * get an array that has the path components that descend from the root
+ * of the iRODS file system to the subdirectory which the tree model
+ * considers the root of the tree
*/
- String[] irodsRootNodePathComponents = rootEntry.getPathOrName().split("/");
+ String[] irodsRootNodePathComponents = rootEntry.getPathOrName().split(
+ "/");
/*
- * determine the relative calculatedTreePath of the given iRODS file underneath the root. There are cases where
- * the root is not '/'.
+ * determine the relative calculatedTreePath of the given iRODS file
+ * underneath the root. There are cases where the root is not '/'.
*/
StringBuilder searchRoot = new StringBuilder();
@@ -197,16 +205,19 @@ public class TreeUtils {
searchRoot.append(entry.getPathOrName());
/*
- * calculatedTreePath now holds the path from the root of iRODS to the root of the tree, now accumulate any
- * TreePath entries that represent the path below the root of the tree contained in the absolute path. The
- * relative path starts at the path component in the position after the length of the root path.
+ * calculatedTreePath now holds the path from the root of iRODS to the
+ * root of the tree, now accumulate any TreePath entries that represent
+ * the path below the root of the tree contained in the absolute path.
+ * The relative path starts at the path component in the position after
+ * the length of the root path.
*/
int relativePathStartsAfter = irodsRootNodePathComponents.length - 1;
String nextPathComponent;
for (int i = (relativePathStartsAfter + 1); i < irodsPathComponents.length; i++) {
- // next element from userObjects is the child of the current node, note that for the first node (typically
+ // next element from userObjects is the child of the current node,
+ // note that for the first node (typically
// '/') a delimiting slash is not needed
if (searchRoot.length() > 1) {
searchRoot.append('/');
@@ -219,7 +230,9 @@ public class TreeUtils {
}
if (currentNode == null) {
- log.warn("cannot find node for path, will attempt to return parent {}:", searchRoot.toString());
+ log.warn(
+ "cannot find node for path, will attempt to return parent {}:",
+ searchRoot.toString());
break;
} else {
// root node is already part of the calculcated tree path
@@ -231,30 +244,35 @@ public class TreeUtils {
}
}
if (calculatedTreePath == null) {
- throw new IdropException("cannot find path to node:" + irodsAbsolutePath);
+ throw new IdropException("cannot find path to node:"
+ + irodsAbsolutePath);
}
return calculatedTreePath;
}
- public static TreePath buildTreePathForIrodsAbsolutePath(final Outline tree, final String irodsAbsolutePath)
+ public static TreePath buildTreePathForIrodsAbsolutePath(
+ final Outline tree, final String irodsAbsolutePath)
throws IdropException {
IRODSOutlineModel irodsFileSystemModel = (IRODSOutlineModel) tree.getModel();
- // the root of the model, which may not be a path underneath the root of the irods resource
+ // the root of the model, which may not be a path underneath the root of
+ // the irods resource
IRODSNode rootNode = (IRODSNode) irodsFileSystemModel.getRoot();
TreePath calculatedTreePath = new TreePath(rootNode);
CollectionAndDataObjectListingEntry rootEntry = (CollectionAndDataObjectListingEntry) rootNode.getUserObject();
String[] irodsPathComponents = irodsAbsolutePath.split("/");
/*
- * get an array that has the path components that descend from the root of the iRODS file system to the
- * subdirectory which the tree model considers the root of the tree
+ * get an array that has the path components that descend from the root
+ * of the iRODS file system to the subdirectory which the tree model
+ * considers the root of the tree
*/
- String[] irodsRootNodePathComponents = rootEntry.getPathOrName().split("/");
+ String[] irodsRootNodePathComponents = rootEntry.getPathOrName().split(
+ "/");
/*
- * determine the relative calculatedTreePath of the given iRODS file underneath the root. There are cases where
- * the root is not '/'.
+ * determine the relative calculatedTreePath of the given iRODS file
+ * underneath the root. There are cases where the root is not '/'.
*/
StringBuilder searchRoot = new StringBuilder();
@@ -263,16 +281,19 @@ public class TreeUtils {
searchRoot.append(entry.getPathOrName());
/*
- * calculatedTreePath now holds the path from the root of iRODS to the root of the tree, now accumulate any
- * TreePath entries that represent the path below the root of the tree contained in the absolute path. The
- * relative path starts at the path component in the position after the length of the root path.
+ * calculatedTreePath now holds the path from the root of iRODS to the
+ * root of the tree, now accumulate any TreePath entries that represent
+ * the path below the root of the tree contained in the absolute path.
+ * The relative path starts at the path component in the position after
+ * the length of the root path.
*/
int relativePathStartsAfter = irodsRootNodePathComponents.length - 1;
String nextPathComponent;
for (int i = (relativePathStartsAfter + 1); i < irodsPathComponents.length; i++) {
- // next element from userObjects is the child of the current node, note that for the first node (typically
+ // next element from userObjects is the child of the current node,
+ // note that for the first node (typically
// '/') a delimiting slash is not needed
if (searchRoot.length() > 1) {
searchRoot.append('/');
@@ -285,7 +306,9 @@ public class TreeUtils {
}
if (currentNode == null) {
- log.warn("cannot find node for path, will attempt to return parent {}:", searchRoot.toString());
+ log.warn(
+ "cannot find node for path, will attempt to return parent {}:",
+ searchRoot.toString());
break;
} else {
// root node is already part of the calculcated tree path
@@ -297,12 +320,14 @@ public class TreeUtils {
}
}
if (calculatedTreePath == null) {
- throw new IdropException("cannot find path to node:" + irodsAbsolutePath);
+ throw new IdropException("cannot find path to node:"
+ + irodsAbsolutePath);
}
return calculatedTreePath;
}
- public static void expandAll(JTree tree, TreePath parent, boolean expand) {
+ public static void expandAll(final JTree tree, final TreePath parent,
+ final boolean expand) {
// Traverse children
TreeNode node = (TreeNode) parent.getLastPathComponent();
if (node.getChildCount() >= 0) {
@@ -322,15 +347,17 @@ public class TreeUtils {
}
/**
- * Given a tree node, get the nodes that are in the given expansion state as a list of TreePath
+ * Given a tree node, get the nodes that are in the given expansion state as
+ * a list of TreePath
*
* @param tree
* <code>JTree</code> that will be inspected
* @param expanded
- * <code>boolean</code> that indicates the desired state that will be preserved in the tree paths
+ * <code>boolean</code> that indicates the desired state that
+ * will be preserved in the tree paths
* @return <code>TreePath[]</code> with the list of paths in the given state
*/
- public static TreePath[] getPaths(JTree tree, boolean expanded) {
+ public static TreePath[] getPaths(final JTree tree, final boolean expanded) {
TreeNode root = (TreeNode) tree.getModel().getRoot();
// Create array to hold the treepaths
@@ -343,7 +370,7 @@ public class TreeUtils {
return (TreePath[]) list.toArray(new TreePath[list.size()]);
}
- public static TreePath[] getPaths(Outline tree, boolean expanded) {
+ public static TreePath[] getPaths(final Outline tree, final boolean expanded) {
TreeNode root = (TreeNode) tree.getOutlineModel().getRoot();
// Create array to hold the treepaths
@@ -356,7 +383,8 @@ public class TreeUtils {
return (TreePath[]) list.toArray(new TreePath[list.size()]);
}
- private static void getPaths(JTree tree, TreePath parent, boolean expanded, List list) {
+ private static void getPaths(final JTree tree, final TreePath parent,
+ final boolean expanded, final List list) {
// Return if node is not expanded
if (expanded && !tree.isVisible(parent)) {
return;
@@ -376,7 +404,8 @@ public class TreeUtils {
}
}
- private static void getPaths(Outline tree, TreePath parent, boolean expanded, List list) {
+ private static void getPaths(final Outline tree, final TreePath parent,
+ final boolean expanded, final List list) {
// Return if node is not expanded
if (expanded && !tree.isVisible(parent)) {
return;
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/FileSystemModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/FileSystemModel.java
index 1ad44d0..d650d4e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/FileSystemModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/FileSystemModel.java
@@ -20,10 +20,9 @@ import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
public class FileSystemModel implements TreeModel {
private File root;
-
private List listeners = new ArrayList();
- public FileSystemModel(File rootDirectory) {
+ public FileSystemModel(final File rootDirectory) {
root = rootDirectory;
}
@@ -33,14 +32,14 @@ public class FileSystemModel implements TreeModel {
}
@Override
- public Object getChild(Object parent, int index) {
+ public Object getChild(final Object parent, final int index) {
File directory = (File) parent;
String[] children = directory.list();
return new TreeFile(directory, children[index]);
}
@Override
- public int getChildCount(Object parent) {
+ public int getChildCount(final Object parent) {
File file = (File) parent;
if (file.isDirectory()) {
String[] fileList = file.list();
@@ -52,7 +51,7 @@ public class FileSystemModel implements TreeModel {
}
@Override
- public boolean isLeaf(Object node) {
+ public boolean isLeaf(final Object node) {
if (node instanceof File) {
File file = (File) node;
return file.isFile();
@@ -62,7 +61,7 @@ public class FileSystemModel implements TreeModel {
}
@Override
- public int getIndexOfChild(Object parent, Object child) {
+ public int getIndexOfChild(final Object parent, final Object child) {
File directory = (File) parent;
File file = (File) child;
String[] children = directory.list();
@@ -76,21 +75,24 @@ public class FileSystemModel implements TreeModel {
}
@Override
- public void valueForPathChanged(TreePath path, Object value) {
+ public void valueForPathChanged(final TreePath path, final Object value) {
File oldFile = (File) path.getLastPathComponent();
String fileParentPath = oldFile.getParent();
String newFileName = (String) value;
File targetFile = new File(fileParentPath, newFileName);
oldFile.renameTo(targetFile);
File parent = new File(fileParentPath);
- int[] changedChildrenIndices = { getIndexOfChild(parent, targetFile) };
- Object[] changedChildren = { targetFile };
- fireTreeNodesChanged(path.getParentPath(), changedChildrenIndices, changedChildren);
+ int[] changedChildrenIndices = {getIndexOfChild(parent, targetFile)};
+ Object[] changedChildren = {targetFile};
+ fireTreeNodesChanged(path.getParentPath(), changedChildrenIndices,
+ changedChildren);
}
- private void fireTreeNodesChanged(TreePath parentPath, int[] indices, Object[] children) {
- TreeModelEvent event = new TreeModelEvent(this, parentPath, indices, children);
+ private void fireTreeNodesChanged(final TreePath parentPath,
+ final int[] indices, final Object[] children) {
+ TreeModelEvent event = new TreeModelEvent(this, parentPath, indices,
+ children);
Iterator iterator = listeners.iterator();
TreeModelListener listener = null;
while (iterator.hasNext()) {
@@ -100,18 +102,18 @@ public class FileSystemModel implements TreeModel {
}
@Override
- public void addTreeModelListener(TreeModelListener listener) {
+ public void addTreeModelListener(final TreeModelListener listener) {
listeners.add(listener);
}
@Override
- public void removeTreeModelListener(TreeModelListener listener) {
+ public void removeTreeModelListener(final TreeModelListener listener) {
listeners.remove(listener);
}
private class TreeFile extends File {
- public TreeFile(File parent, String child) {
+ public TreeFile(final File parent, final String child) {
super(parent, child);
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSFileSystemModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSFileSystemModel.java
index a0d8e64..f76266b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSFileSystemModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSFileSystemModel.java
@@ -20,60 +20,62 @@ import org.slf4j.LoggerFactory;
public class IRODSFileSystemModel extends DefaultTreeModel {
@Override
- public void removeNodeFromParent(MutableTreeNode mtn) {
+ public void removeNodeFromParent(final MutableTreeNode mtn) {
super.removeNodeFromParent(mtn);
}
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(IRODSFileSystemModel.class);
- private static class TreeModelListener implements javax.swing.event.TreeModelListener {
+ private static class TreeModelListener implements
+ javax.swing.event.TreeModelListener {
public TreeModelListener() {
}
@Override
- public void treeNodesChanged(TreeModelEvent tme) {
+ public void treeNodesChanged(final TreeModelEvent tme) {
}
@Override
- public void treeNodesInserted(TreeModelEvent tme) {
+ public void treeNodesInserted(final TreeModelEvent tme) {
}
@Override
- public void treeNodesRemoved(TreeModelEvent tme) {
+ public void treeNodesRemoved(final TreeModelEvent tme) {
}
@Override
- public void treeStructureChanged(TreeModelEvent tme) {
+ public void treeStructureChanged(final TreeModelEvent tme) {
}
}
@Override
- public Object getChild(Object parent, int index) {
+ public Object getChild(final Object parent, final int index) {
triggerLazyLoading(parent);
return super.getChild(parent, index);
}
@Override
- public int getChildCount(Object parent) {
+ public int getChildCount(final Object parent) {
triggerLazyLoading(parent);
return super.getChildCount(parent);
}
- private void triggerLazyLoading(Object parent) throws IdropRuntimeException {
+ private void triggerLazyLoading(final Object parent)
+ throws IdropRuntimeException {
// make sure children are loaded before counting
IRODSNode parentAsNode = (IRODSNode) parent;
try {
parentAsNode.lazyLoadOfChildrenOfThisNode();
} catch (IdropException ex) {
- Logger.getLogger(IRODSFileSystemModel.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSFileSystemModel.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
}
-
private final IRODSAccount irodsAccount;
- public IRODSFileSystemModel(final IRODSNode rootNode, final IRODSAccount irodsAccount) throws IdropException {
+ public IRODSFileSystemModel(final IRODSNode rootNode,
+ final IRODSAccount irodsAccount) throws IdropException {
super(rootNode);
if (irodsAccount == null) {
@@ -89,7 +91,8 @@ public class IRODSFileSystemModel extends DefaultTreeModel {
}
- public IRODSFileSystemModel(final IRODSAccount irodsAccount) throws IdropException {
+ public IRODSFileSystemModel(final IRODSAccount irodsAccount)
+ throws IdropException {
super(null);
if (irodsAccount == null) {
throw new IdropRuntimeException("null irodsAccount");
@@ -100,5 +103,4 @@ public class IRODSFileSystemModel extends DefaultTreeModel {
});
}
-
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSNode.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSNode.java
index d6876b3..90b5673 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSNode.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSNode.java
@@ -24,20 +24,15 @@ import org.slf4j.LoggerFactory;
public class IRODSNode extends DefaultMutableTreeNode {
private boolean cached = false;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(IRODSNode.class);
-
public final IRODSAccount irodsAccount;
-
public final IRODSFileSystem irodsFileSystem;
-
public boolean hasMore = true;
-
public boolean continuation = false;
-
private final IRODSTree irodsTree;
- public IRODSNode(final CollectionAndDataObjectListingEntry entry, final IRODSAccount irodsAccount,
+ public IRODSNode(final CollectionAndDataObjectListingEntry entry,
+ final IRODSAccount irodsAccount,
final IRODSFileSystem irodsFileSystem, final IRODSTree irodsTree) {
super(entry);
if (irodsAccount == null) {
@@ -55,7 +50,8 @@ public class IRODSNode extends DefaultMutableTreeNode {
}
/**
- * Load children of this node, and then close the connection (appropriate for the user expanding a node).
+ * Load children of this node, and then close the connection (appropriate
+ * for the user expanding a node).
*
* @throws IdropException
*/
@@ -69,35 +65,38 @@ public class IRODSNode extends DefaultMutableTreeNode {
}
/**
- * Load children of this node by accessing iRODS. Note that in a refresh situation, you do not want to continuously
- * open and close the connection, so there is an option to defer closing the connection to the caller.
+ * Load children of this node by accessing iRODS. Note that in a refresh
+ * situation, you do not want to continuously open and close the connection,
+ * so there is an option to defer closing the connection to the caller.
*
* @param closeTheConnectionAfterLoad
- * <code>boolean</code> that indicates that the connection will be closed by this method. If
- * <code>true</code> is passed, then this method will close the connection. If <code>false</code> is
- * passed, then the caller must close the connection.
+ * <code>boolean</code> that indicates that the connection will
+ * be closed by this method. If <code>true</code> is passed, then
+ * this method will close the connection. If <code>false</code>
+ * is passed, then the caller must close the connection.
* @throws IdropException
*/
- public void lazyLoadOfChildrenOfThisNode(final boolean closeTheConnectionAfterLoad) throws IdropException {
+ public void lazyLoadOfChildrenOfThisNode(
+ final boolean closeTheConnectionAfterLoad) throws IdropException {
if (cached) {
return;
}
log.debug("lazily loading children of:{}", this);
- log.debug("will I close this connection:{}", closeTheConnectionAfterLoad);
+ log.debug("will I close this connection:{}",
+ closeTheConnectionAfterLoad);
CollectionAndDataObjectListingEntry parentObject = (CollectionAndDataObjectListingEntry) this.getUserObject();
try {
irodsTree.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- CollectionAndDataObjectListAndSearchAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory()
- .getCollectionAndDataObjectListAndSearchAO(irodsAccount);
- List<CollectionAndDataObjectListingEntry> childCache = collectionAO
- .listDataObjectsAndCollectionsUnderPath(parentObject.getPathOrName());
+ CollectionAndDataObjectListAndSearchAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAndDataObjectListAndSearchAO(irodsAccount);
+ List<CollectionAndDataObjectListingEntry> childCache = collectionAO.listDataObjectsAndCollectionsUnderPath(parentObject.getPathOrName());
for (CollectionAndDataObjectListingEntry childEntry : childCache) {
- insert(new IRODSNode(childEntry, irodsAccount, irodsFileSystem, irodsTree), getChildCount());
+ insert(new IRODSNode(childEntry, irodsAccount, irodsFileSystem,
+ irodsTree), getChildCount());
}
if (children == null) {
@@ -107,8 +106,10 @@ public class IRODSNode extends DefaultMutableTreeNode {
cached = true;
} catch (Exception ex) {
- Logger.getLogger(IRODSNode.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropException("error occurred accessing collection data", ex);
+ Logger.getLogger(IRODSNode.class.getName()).log(Level.SEVERE, null,
+ ex);
+ throw new IdropException(
+ "error occurred accessing collection data", ex);
} finally {
if (closeTheConnectionAfterLoad) {
irodsFileSystem.closeAndEatExceptions(irodsAccount);
@@ -141,7 +142,7 @@ public class IRODSNode extends DefaultMutableTreeNode {
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (!(obj instanceof IRODSNode)) {
return false;
@@ -150,8 +151,7 @@ public class IRODSNode extends DefaultMutableTreeNode {
IRODSNode comparableAsNode = (IRODSNode) obj;
CollectionAndDataObjectListingEntry thisFile = (CollectionAndDataObjectListingEntry) getUserObject();
- CollectionAndDataObjectListingEntry thatFile = (CollectionAndDataObjectListingEntry) comparableAsNode
- .getUserObject();
+ CollectionAndDataObjectListingEntry thatFile = (CollectionAndDataObjectListingEntry) comparableAsNode.getUserObject();
return thisFile.equals(thatFile);
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
index ffe087e..3a38d09 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
@@ -39,20 +39,23 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
}
private iDrop idrop;
- public IRODSOutlineModel(iDrop idrop, TreeModel tm, TableModel tm1, boolean bln, String string) {
+ public IRODSOutlineModel(final iDrop idrop, final TreeModel tm,
+ final TableModel tm1, final boolean bln, final String string) {
super(tm, tm1, bln, string);
this.treeModel = (IRODSFileSystemModel) tm;
this.idrop = idrop;
}
- public IRODSOutlineModel(iDrop idrop, TreeModel tm, RowModel rm, boolean bln, String string) {
+ public IRODSOutlineModel(final iDrop idrop, final TreeModel tm,
+ final RowModel rm, final boolean bln, final String string) {
super(tm, rm, bln, string);
this.treeModel = (IRODSFileSystemModel) tm;
this.idrop = idrop;
}
- public void notifyFileShouldBeRemoved(final IRODSNode deletedNode) throws IdropException {
+ public void notifyFileShouldBeRemoved(final IRODSNode deletedNode)
+ throws IdropException {
if (deletedNode == null) {
return;
@@ -70,17 +73,16 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
@Override
public void run() {
- CollectionAndDataObjectListingEntry deletedEntry = (CollectionAndDataObjectListingEntry) deletedNode.getUserObject();
- CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) ((IRODSNode) parent).getUserObject();
+ deletedNode.getUserObject();
+ CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) (parent).getUserObject();
IRODSTree stagingViewTree = idrop.getIrodsTree();
- TreePath path;
-
try {
- path = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree,
- entry.getFormattedAbsolutePath());
+ TreeUtils.buildTreePathForIrodsAbsolutePath(
+ stagingViewTree, entry.getFormattedAbsolutePath());
} catch (IdropException ex) {
- Logger.getLogger(IRODSOutlineModel.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IRODSOutlineModel.class.getName()).log(
+ Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
@@ -90,8 +92,8 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
});
}
- public void notifyCompletionOfOperation(final IRODSTree irodsTree, final TransferStatus transferStatus)
- throws IdropException {
+ public void notifyCompletionOfOperation(final IRODSTree irodsTree,
+ final TransferStatus transferStatus) throws IdropException {
log.info("tree model notified of status:{}", transferStatus);
if (transferStatus.getTransferState() != TransferState.OVERALL_COMPLETION) {
@@ -102,12 +104,14 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
if (transferStatus.getTransferType() == TransferStatus.TransferType.PUT
|| transferStatus.getTransferType() == TransferStatus.TransferType.COPY) {
log.info("successful put transfer, find the parent tree node, and clear the children");
- notifyFileShouldBeAdded(irodsTree, transferStatus.getTargetFileAbsolutePath());
+ notifyFileShouldBeAdded(irodsTree,
+ transferStatus.getTargetFileAbsolutePath());
}
}
- public void notifyFileShouldBeAdded(final IRODSTree irodsTree, final String irodsFileAbsolutePath) {
+ public void notifyFileShouldBeAdded(final IRODSTree irodsTree,
+ final String irodsFileAbsolutePath) {
log.info("notifyFileShouldBeAdded() for node:{}", irodsFileAbsolutePath);
java.awt.EventQueue.invokeLater(new Runnable() {
@@ -118,13 +122,15 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
IRODSFileFactory irodsFileFactory = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount();
try {