summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-08-03 15:29:49 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-08-03 15:29:49 (GMT)
commitf6dd0d54bfa36eac8eebae1969144f32f8202a41 (patch)
treeac0b2f3c023f424f227c61517143e213c0d7f651 /idrop-swing
parent5ed2d89203e2fb78a37f21859f6214a660deebf6 (diff)
downloadQCG-Data-f6dd0d54bfa36eac8eebae1969144f32f8202a41.zip
QCG-Data-f6dd0d54bfa36eac8eebae1969144f32f8202a41.tar.gz
QCG-Data-f6dd0d54bfa36eac8eebae1969144f32f8202a41.tar.bz2
added current grid to config and logout/relog in
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form194
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java256
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java52
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java68
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties15
6 files changed, 482 insertions, 105 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form
index 9fe2857..7f7ee04 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form
@@ -105,18 +105,188 @@
</Constraint>
</Constraints>
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="988" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="517" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- </Layout>
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlCurrentGrid">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Current Grid">
+ <ResourceString PropertyName="titleX" bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.pnlCurrentGrid.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </TitledBorder>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="lblHostLabel">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblHostLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblHost">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblHost.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblPortLabel">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblPortLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblPort">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblPort.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblZoneLabel">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblZoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblZone">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblZone.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblResourceLabel">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblResourceLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblResource">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblResource.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblUserNameLabel">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblUserNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblUserName">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.lblUserName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Container class="javax.swing.JPanel" name="pnlCurrentGridToolbar">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="5" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="20" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnLogout">
+ <Properties>
+ <Property name="mnemonic" type="int" value="108"/>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.btnLogout.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.btnLogout.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLogoutActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnChangePassword">
+ <Properties>
+ <Property name="mnemonic" type="int" value="99"/>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.btnChangePassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.btnChangePassword.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnChangePasswordActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlConfigTransfers">
<Constraints>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
index 8520f36..b7837c6 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
@@ -61,7 +61,7 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
@@ -71,6 +71,20 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
pnlConfigIdrop = new javax.swing.JPanel();
checkShowGUI = new javax.swing.JCheckBox();
pnlConfigGrids = new javax.swing.JPanel();
+ pnlCurrentGrid = new javax.swing.JPanel();
+ lblHostLabel = new javax.swing.JLabel();
+ lblHost = new javax.swing.JLabel();
+ lblPortLabel = new javax.swing.JLabel();
+ lblPort = new javax.swing.JLabel();
+ lblZoneLabel = new javax.swing.JLabel();
+ lblZone = new javax.swing.JLabel();
+ lblResourceLabel = new javax.swing.JLabel();
+ lblResource = new javax.swing.JLabel();
+ lblUserNameLabel = new javax.swing.JLabel();
+ lblUserName = new javax.swing.JLabel();
+ pnlCurrentGridToolbar = new javax.swing.JPanel();
+ btnLogout = new javax.swing.JButton();
+ btnChangePassword = new javax.swing.JButton();
pnlConfigTransfers = new javax.swing.JPanel();
checkLogSuccessfulTransfer = new javax.swing.JCheckBox();
checkVerifyChecksumOnTransfer = new javax.swing.JCheckBox();
@@ -138,16 +152,114 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigIdrop.TabConstraints.tabTitle"), pnlConfigIdrop); // NOI18N
- org.jdesktop.layout.GroupLayout pnlConfigGridsLayout = new org.jdesktop.layout.GroupLayout(pnlConfigGrids);
- pnlConfigGrids.setLayout(pnlConfigGridsLayout);
- pnlConfigGridsLayout.setHorizontalGroup(
- pnlConfigGridsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 988, Short.MAX_VALUE)
- );
- pnlConfigGridsLayout.setVerticalGroup(
- pnlConfigGridsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 517, Short.MAX_VALUE)
- );
+ pnlConfigGrids.setLayout(new java.awt.BorderLayout());
+
+ pnlCurrentGrid.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlCurrentGrid.border.title"))); // NOI18N
+ pnlCurrentGrid.setLayout(new java.awt.GridBagLayout());
+
+ lblHostLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblHostLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblHostLabel, gridBagConstraints);
+
+ lblHost.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblHost.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblHost, gridBagConstraints);
+
+ lblPortLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblPortLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblPortLabel, gridBagConstraints);
+
+ lblPort.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblPort.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblPort, gridBagConstraints);
+
+ lblZoneLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblZoneLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblZoneLabel, gridBagConstraints);
+
+ lblZone.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblZone.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblZone, gridBagConstraints);
+
+ lblResourceLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblResourceLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblResourceLabel, gridBagConstraints);
+
+ lblResource.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblResource.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblResource, gridBagConstraints);
+
+ lblUserNameLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblUserNameLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblUserNameLabel, gridBagConstraints);
+
+ lblUserName.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblUserName.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblUserName, gridBagConstraints);
+
+ btnLogout.setMnemonic('l');
+ btnLogout.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnLogout.text")); // NOI18N
+ btnLogout.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnLogout.toolTipText")); // NOI18N
+ btnLogout.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnLogoutActionPerformed(evt);
+ }
+ });
+ pnlCurrentGridToolbar.add(btnLogout);
+
+ btnChangePassword.setMnemonic('c');
+ btnChangePassword.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChangePassword.text")); // NOI18N
+ btnChangePassword.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChangePassword.toolTipText")); // NOI18N
+ btnChangePassword.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnChangePasswordActionPerformed(evt);
+ }
+ });
+ pnlCurrentGridToolbar.add(btnChangePassword);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ gridBagConstraints.insets = new java.awt.Insets(20, 0, 0, 0);
+ pnlCurrentGrid.add(pnlCurrentGridToolbar, gridBagConstraints);
+
+ pnlConfigGrids.add(pnlCurrentGrid, java.awt.BorderLayout.CENTER);
tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigGrids.TabConstraints.tabTitle"), pnlConfigGrids); // NOI18N
@@ -385,13 +497,13 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
pack();
- }// </editor-fold>//GEN-END:initComponents
+ }// </editor-fold>
- private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
+ private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {
this.dispose();
- }//GEN-LAST:event_btnOKActionPerformed
+ }
- private void checkShowGUIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkShowGUIActionPerformed
+ private void checkShowGUIActionPerformed(java.awt.event.ActionEvent evt) {
log.info("updating show gui at startup to:{}", checkShowGUI.isSelected());
try {
idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.SHOW_GUI, Boolean.toString(checkShowGUI.isSelected()));
@@ -399,9 +511,9 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
log.error("error setting show gui property", ex);
throw new IdropRuntimeException(ex);
}
- }//GEN-LAST:event_checkShowGUIActionPerformed
+ }
- private void checkLogSuccessfulTransferActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkLogSuccessfulTransferActionPerformed
+ private void checkLogSuccessfulTransferActionPerformed(java.awt.event.ActionEvent evt) {
log.info("updating log successful transfers to:{}", checkLogSuccessfulTransfer.isSelected());
try {
idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES, Boolean.toString(checkShowGUI.isSelected()));
@@ -410,9 +522,9 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
throw new IdropRuntimeException(ex);
}
- }//GEN-LAST:event_checkLogSuccessfulTransferActionPerformed
+ }
- private void pnlConfigSynchComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_pnlConfigSynchComponentShown
+ private void pnlConfigSynchComponentShown(java.awt.event.ComponentEvent evt) {
log.info("lazily loading synch data");
final IDROPConfigurationPanel thisPanel = this;
@@ -448,26 +560,26 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
}
});
- }//GEN-LAST:event_pnlConfigSynchComponentShown
+ }
- private void txtLocalPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLocalPathActionPerformed
+ private void txtLocalPathActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
-}//GEN-LAST:event_txtLocalPathActionPerformed
+}
- private void btnChooseLocalSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnChooseLocalSynchActionPerformed
+ private void btnChooseLocalSynchActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
JFileChooser localFileChooser = new JFileChooser();
localFileChooser.setMultiSelectionEnabled(false);
localFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int returnVal = localFileChooser.showOpenDialog(this);
txtLocalPath.setText(localFileChooser.getSelectedFile().getAbsolutePath());
-}//GEN-LAST:event_btnChooseLocalSynchActionPerformed
+}
- private void txtIrodsPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtIrodsPathActionPerformed
+ private void txtIrodsPathActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
-}//GEN-LAST:event_txtIrodsPathActionPerformed
+}
- private void btnChooseIrodsSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnChooseIrodsSynchActionPerformed
+ private void btnChooseIrodsSynchActionPerformed(java.awt.event.ActionEvent evt) {
try {
IRODSFinderDialog irodsFileSystemChooserView = new IRODSFinderDialog(null, true, idropCore);
final Toolkit toolkit = Toolkit.getDefaultToolkit();
@@ -489,13 +601,13 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
} finally {
idropCore.getIrodsFileSystem().closeAndEatExceptions();
}
-}//GEN-LAST:event_btnChooseIrodsSynchActionPerformed
+}
/**
* Delete the selected synchronization
* @param evt
*/
- private void btnDeleteSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteSynchActionPerformed
+ private void btnDeleteSynchActionPerformed(java.awt.event.ActionEvent evt) {
final IDROPConfigurationPanel thisPanel = this;
@@ -553,13 +665,13 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
}
}
});
- }//GEN-LAST:event_btnDeleteSynchActionPerformed
+ }
/**
* Called to clear and prepare for adding a new synchronization
* @param evt
*/
- private void btnNewSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewSynchActionPerformed
+ private void btnNewSynchActionPerformed(java.awt.event.ActionEvent evt) {
clearAndResetSynchPanel();
if (jTableSynch.getModel().getRowCount() > 0) {
jTableSynch.getSelectionModel().removeIndexInterval(0, jTableSynch.getModel().getRowCount() - 1);
@@ -569,13 +681,13 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
btnUpdateSynch.setEnabled(true);
btnSynchNow.setEnabled(false);
MessageManager.showMessage(this, "Enter the data for the new Synchronization and press Update to save", MessageManager.TITLE_MESSAGE);
- }//GEN-LAST:event_btnNewSynchActionPerformed
+ }
/**
* User signals that the displayed synchronization should be updated
* @param evt
*/
- private void btnUpdateSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateSynchActionPerformed
+ private void btnUpdateSynchActionPerformed(java.awt.event.ActionEvent evt) {
final IDROPConfigurationPanel thisPanel = this;
@@ -692,13 +804,13 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
});
- }//GEN-LAST:event_btnUpdateSynchActionPerformed
+ }
/**
* Force a synhronization process on the selected synchronization
* @param evt
*/
- private void btnSynchNowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSynchNowActionPerformed
+ private void btnSynchNowActionPerformed(java.awt.event.ActionEvent evt) {
log.info("synch now button pressed");
if (selectedSynchronization == null) {
MessageManager.showWarning(this, "Please select a synhronization", MessageManager.TITLE_MESSAGE);
@@ -720,9 +832,9 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
throw new IdropRuntimeException(ex);
}
}
- }//GEN-LAST:event_btnSynchNowActionPerformed
+ }
- private void checkVerifyChecksumOnTransferActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkVerifyChecksumOnTransferActionPerformed
+ private void checkVerifyChecksumOnTransferActionPerformed(java.awt.event.ActionEvent evt) {
log.info("updating verify checksom to:{}", checkVerifyChecksumOnTransfer.isSelected());
try {
idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.VERIFY_CHECKSUM_ON_TRANSFER, Boolean.toString(checkVerifyChecksumOnTransfer.isSelected()));
@@ -730,15 +842,49 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
log.error("error setting show gui property", ex);
throw new IdropRuntimeException(ex);
}
- }//GEN-LAST:event_checkVerifyChecksumOnTransferActionPerformed
+ }
+
+ private void btnLogoutActionPerformed(java.awt.event.ActionEvent evt) {
+ log.info("logging out to log in to a new grid");
+
+ final IDROPConfigurationPanel thisPanel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ IRODSAccount savedAccount = idropCore.getIrodsAccount();
+ idropCore.setIrodsAccount(null);
+ iDrop idrop = (iDrop) thisPanel.getParent();
+ LoginDialog loginDialog = new LoginDialog(thisPanel, idropCore);
+ loginDialog.setVisible(true);
+
+ if (idropCore.getIrodsAccount() == null) {
+ log.warn("no account, reverting");
+ idropCore.setIrodsAccount(savedAccount);
+ } else {
+ idrop.reinitializeForChangedIRODSAccount();
+ }
+ refreshAccountData();
+ }
+ });
+
+ }
+
+ private void btnChangePasswordActionPerformed(java.awt.event.ActionEvent evt) {
+ log.info("changing password");
+ }
protected JTable getSynchTable() {
return jTableSynch;
}
- // Variables declaration - do not modify//GEN-BEGIN:variables
+ // Variables declaration - do not modify
+ private javax.swing.JButton btnChangePassword;
private javax.swing.JButton btnChooseIrodsSynch;
private javax.swing.JButton btnChooseLocalSynch;
private javax.swing.JButton btnDeleteSynch;
+ private javax.swing.JButton btnLogout;
private javax.swing.JButton btnNewSynch;
private javax.swing.JButton btnOK;
private javax.swing.JButton btnSynchNow;
@@ -749,7 +895,17 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel5;
private javax.swing.JComboBox jcomboSynchFrequency;
+ private javax.swing.JLabel lblHost;
+ private javax.swing.JLabel lblHostLabel;
+ private javax.swing.JLabel lblPort;
+ private javax.swing.JLabel lblPortLabel;
+ private javax.swing.JLabel lblResource;
+ private javax.swing.JLabel lblResourceLabel;
private javax.swing.JLabel lblSynchName;
+ private javax.swing.JLabel lblUserName;
+ private javax.swing.JLabel lblUserNameLabel;
+ private javax.swing.JLabel lblZone;
+ private javax.swing.JLabel lblZoneLabel;
private javax.swing.JPanel panelSynchToolbar;
private javax.swing.JPanel pnlBottom;
private javax.swing.JPanel pnlCenter;
@@ -759,6 +915,8 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
private javax.swing.JPanel pnlConfigSynchDetails;
private javax.swing.JPanel pnlConfigSynchListing;
private javax.swing.JPanel pnlConfigTransfers;
+ private javax.swing.JPanel pnlCurrentGrid;
+ private javax.swing.JPanel pnlCurrentGridToolbar;
private javax.swing.JPanel pnlIrodsSynch;
private javax.swing.JPanel pnlLocalSynch;
private javax.swing.JPanel pnlSynchData;
@@ -774,13 +932,14 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
private javax.swing.JTextField txtIrodsPath;
private javax.swing.JTextField txtLocalPath;
private javax.swing.JTextField txtSynchName;
- // End of variables declaration//GEN-END:variables
+ // End of variables declaration
private void initWithConfigData() {
IdropConfig idropConfig = idropCore.getIdropConfig();
checkShowGUI.setSelected(idropConfig.isShowGuiAtStartup());
checkLogSuccessfulTransfer.setSelected(idropConfig.isLogSuccessfulTransfers());
checkVerifyChecksumOnTransfer.setSelected(idropConfig.isVerifyChecksum());
+ refreshAccountData();
}
/**
@@ -804,6 +963,23 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
jcomboSynchFrequency.setSelectedIndex(0);
}
+ private void refreshAccountData() {
+
+ if (idropCore.getIrodsAccount() == null) {
+ lblHost.setText("");
+ lblPort.setText("");
+ lblZone.setText("");
+ lblResource.setText("");
+ lblUserName.setText("");
+ } else {
+ lblHost.setText(idropCore.getIrodsAccount().getHost());
+ lblPort.setText(String.valueOf(idropCore.getIrodsAccount().getPort()));
+ lblZone.setText(idropCore.getIrodsAccount().getZone());
+ lblResource.setText(idropCore.getIrodsAccount().getDefaultStorageResource());
+ lblUserName.setText(idropCore.getIrodsAccount().getUserName());
+ }
+ }
+
class SynchListSelectionHandler implements ListSelectionListener {
private final IDROPConfigurationPanel idropConfigurationPanel;
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 4831cdf..01cbcec 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
@@ -28,22 +28,24 @@ import org.slf4j.LoggerFactory;
*/
public class LoginDialog extends JDialog {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private iDrop iDrop = null;
+ private JDialog parentDialog = null;
+ private IDROPCore idropCore = null;
public static org.slf4j.Logger log = LoggerFactory.getLogger(LoginDialog.class);
- public LoginDialog(final iDrop iDrop) {
- super(iDrop, true);
- this.iDrop = iDrop;
+ public LoginDialog(final JDialog parentDialog, final IDROPCore idropCore) {
+ super(parentDialog, true);
+ if (idropCore == null) {
+ throw new IllegalArgumentException("null idropCore");
+ }
+ this.parentDialog = parentDialog;
+ this.idropCore = idropCore;
initComponents();
- if (iDrop.getiDropCore().getIdropConfig().isLoginPreset()) {
+ if (idropCore.getIdropConfig().isLoginPreset()) {
loginUsingPreset();
} else {
- loginNormally(iDrop);
+ loginNormally();
}
registerKeystrokeListener();
@@ -51,17 +53,17 @@ public class LoginDialog extends JDialog {
}
private void loginNormally(
- final org.irods.jargon.idrop.desktop.systraygui.iDrop iDrop) {
+ ) {
// predispose based on preferences
- String host = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_HOST);
+ String host = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_HOST);
txtHost.setText(host);
- String port = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_PORT);
+ String port = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_PORT);
txtPort.setText(port);
- String zone = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_ZONE);
+ String zone = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_ZONE);
txtZone.setText(zone);
- String resource = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_RESOURCE);
+ String resource = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_RESOURCE);
txtResource.setText(resource);
- String username = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_NAME);
+ String username = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_NAME);
txtUserName.setText(username);
}
@@ -87,7 +89,7 @@ public class LoginDialog extends JDialog {
private boolean processLogin() throws NumberFormatException {
// validate various inputs based on whether a full login, or a uid only
// login is indicated
- if (!iDrop.getiDropCore().getIdropConfig().isLoginPreset()) {
+ if (!idropCore.getIdropConfig().isLoginPreset()) {
txtHost.setBackground(Color.white);
txtPort.setBackground(Color.white);
txtZone.setBackground(Color.white);
@@ -123,15 +125,15 @@ public class LoginDialog extends JDialog {
final IRODSAccount irodsAccount;
try {
// validated, now try to log in
- if (iDrop.getiDropCore().getIdropConfig().isLoginPreset()) {
+ if (idropCore.getIdropConfig().isLoginPreset()) {
log.debug("creating account with presets");
- String presetHost = iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_HOST);
+ String presetHost = idropCore.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(idropCore.getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_PORT));
log.info("presetPort:{}", presetPort);
- String presetZone = iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_ZONE);
+ String presetZone = idropCore.getIdropConfig().getIdropProperties().getProperty(IdropPropertiesHelper.LOGIN_PRESET_ZONE);
log.info("presetZone:{}", presetZone);
- String presetResource = iDrop.getiDropCore().getIdropConfig().getIdropProperties().getProperty(
+ String presetResource = idropCore.getIdropConfig().getIdropProperties().getProperty(
IdropPropertiesHelper.LOGIN_PRESET_RESOURCE);
log.info("presetResource:{}", presetResource);
sb.append('/');
@@ -156,19 +158,19 @@ public class LoginDialog extends JDialog {
} catch (JargonException ex) {
Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,
null, ex);
- iDrop.showIdropException(ex);
+ MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
return true;
}
IRODSFileSystem irodsFileSystem = null;
try {
- irodsFileSystem = iDrop.getiDropCore().getIrodsFileSystem();
+ irodsFileSystem = idropCore.getIrodsFileSystem();
final UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
userAO.findByName(txtUserName.getText());
- iDrop.setIrodsAccount(irodsAccount);
+ idropCore.setIrodsAccount(irodsAccount);
try {
- iDrop.getiDropCore().getIdropConfigurationService().saveLogin(irodsAccount);
+ idropCore.getIdropConfigurationService().saveLogin(irodsAccount);
} catch (IdropException ex) {
throw new IdropRuntimeException("error saving irodsAccount", ex);
}
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 9e2a2e5..0431c67 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
@@ -141,7 +141,7 @@ public class StartupSequencer {
log.info("logging in in splash background thread");
idropSplashWindow.setStatus("Logging in...", ++count);
- final LoginDialog loginDialog = new LoginDialog(idrop);
+ final LoginDialog loginDialog = new LoginDialog(null, idropCore);
Toolkit tk = idrop.getToolkit();
int x = (tk.getScreenSize().width - loginDialog.getWidth()) / 2;
int y = (tk.getScreenSize().height - loginDialog.getHeight()) / 2;
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 62ef2c4..d523550 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
@@ -157,16 +157,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
int showX = (width / 2) - (this.getWidth() / 2);
int showY = (height / 2) - (this.getHeight() / 2);
this.setLocation(showX, showY);
- /*
- * 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);
- */
+
if (!getiDropCore().getIdropConfig().isAdvancedView()) {
toolBarInfo.setVisible(false);
}
@@ -213,8 +204,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
receivedStartupSignal = true;
-
-
iDropCore.getIconManager().setRunningStatus(
iDropCore.getTransferManager().getRunningStatus());
iDropCore.getIconManager().setErrorStatus(
@@ -526,17 +515,29 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
if (e.getActionCommand().equals("Exit")) {
shutdownWithConfirmation();
} else if (e.getActionCommand().equals("Logout")) {
- this.setIrodsAccount(null);
- this.signalChangeInAccountSoCachedDataCanBeCleared();
- LoginDialog loginDialog = new LoginDialog(this);
- loginDialog.setVisible(true);
-
- if (getIrodsAccount() == null) {
- log.warn("no account, exiting");
- System.exit(0);
- } else {
- this.setVisible(false);
+ log.info("logging out to log in to a new grid");
+
+ final iDrop thisPanel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ IRODSAccount savedAccount = iDropCore.getIrodsAccount();
+ iDropCore.setIrodsAccount(null);
+ LoginDialog loginDialog = new LoginDialog(null, iDropCore);
+ loginDialog.setLocationRelativeTo(null);
+ loginDialog.setVisible(true);
+
+ if (iDropCore.getIrodsAccount() == null) {
+ log.warn("no account, reverting");
+ iDropCore.setIrodsAccount(savedAccount);
+ } else {
+ thisPanel.reinitializeForChangedIRODSAccount();
+ }
}
+ });
} else if (e.getActionCommand().equals("About")) {
AboutDialog aboutDialog = new AboutDialog(this, true);
@@ -890,6 +891,8 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
IRODSNode rootNode = new IRODSNode(root,
getIrodsAccount(), getiDropCore().getIrodsFileSystem(), irodsTree);
irodsTree.setRefreshingTree(true);
+ scrollIrodsTree.setViewportView(irodsTree);
+
// irodsTree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
}
IRODSNode rootNode = new IRODSNode(root, getIrodsAccount(),
@@ -916,7 +919,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
throw new IdropRuntimeException(ex);
}
- scrollIrodsTree.setViewportView(getTreeStagingResource());
/*
* TreePath currentPath;
*
@@ -2222,13 +2224,25 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
/**
* Method to clear any cached values when an account changes. Some data is
- * cached and lazily loaded
+ * cached and lazily loaded. Rebuilds gui state for new grid.
*/
- public void signalChangeInAccountSoCachedDataCanBeCleared() {
+ public void reinitializeForChangedIRODSAccount() {
log.info("clearing any cached data associated with the account");
+ final iDrop idropGui = this;
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+ //scrollIrodsTree.removeAll();
+ // irodsTree=null;
+ //scrollIrodsTree.getViewport().validate();
+ lastCachedInfoItem = null;
+ idropGui.buildTargetTree();
+ idropGui.toggleIrodsDetails.setSelected(false);
+ handleInfoPanelShowOrHide();
+ }
+ });
- irodsTree = null;
- lastCachedInfoItem = null;
}
/**
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
index c69d7d8..5c22f8e 100644
--- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
@@ -34,3 +34,18 @@ IDROPConfigurationPanel.lblSynchName.text=Name this synchronization folder:
IDROPConfigurationPanel.txtSynchName.text=
IDROPConfigurationPanel.btnDeleteSynch.toolTipText=Delete the selected synchronization
IDROPConfigurationPanel.btnDeleteSynch.text=Delete
+IDROPConfigurationPanel.pnlCurrentGrid.border.title=Current Grid
+IDROPConfigurationPanel.lblHostLabel.text=Host:
+IDROPConfigurationPanel.lblHost.text=host
+IDROPConfigurationPanel.lblPortLabel.text=Port:
+IDROPConfigurationPanel.lblPort.text=port
+IDROPConfigurationPanel.lblZoneLabel.text=Zone:
+IDROPConfigurationPanel.lblZone.text=zone
+IDROPConfigurationPanel.lblResourceLabel.text=Default Resource:
+IDROPConfigurationPanel.lblResource.text=resource
+IDROPConfigurationPanel.lblUserNameLabel.text=User Name:
+IDROPConfigurationPanel.lblUserName.text=user name
+IDROPConfigurationPanel.btnLogout.text=Login to Another Grid
+IDROPConfigurationPanel.btnLogout.toolTipText=Log in to a different grid
+IDROPConfigurationPanel.btnChangePassword.text=Change Password
+IDROPConfigurationPanel.btnChangePassword.toolTipText=Change the password for this grid