summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--idrop-swing/pom.xml21
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.form192
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.java332
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java4
4 files changed, 363 insertions, 186 deletions
diff --git a/idrop-swing/pom.xml b/idrop-swing/pom.xml
index 7c8728f..e01aa6a 100644
--- a/idrop-swing/pom.xml
+++ b/idrop-swing/pom.xml
@@ -23,23 +23,6 @@
<scope>runtime</scope>
</dependency>
-->
- <!-- <dependency>
- <groupId>com.jgoodies</groupId>
- <artifactId>validation</artifactId>
- </dependency>
- <dependency>
- <groupId>cookxml</groupId>
- <artifactId>cookswing</artifactId>
- </dependency>
- <dependency>
- <groupId>cookxml</groupId>
- <artifactId>cookxml</artifactId>
- </dependency>
- <dependency>
- <groupId>cookxml</groupId>
- <artifactId>cookswing</artifactId>
- </dependency>
- -->
<dependency>
<groupId>org.irods.jargon</groupId>
<artifactId>jargon-data-utils</artifactId>
@@ -229,6 +212,4 @@
</plugin>
</plugins>
</build>
-</project>
-
-
+</project> \ No newline at end of file
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.form
index e735bfa..3621570 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/ChangePasswordDialog.form
@@ -27,50 +27,144 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
- <Container class="javax.swing.JTabbedPane" name="tabPreferences">
- <Events>
- <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="tabPreferencesStateChanged"/>
- </Events>
+ <Container class="javax.swing.JPanel" name="pnlCurrentGrid">
<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.support.JTabbedPaneSupportLayout"/>
+ <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="pnlPasswords">
<Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Passwords" toolTip="Manage passwords">
- <Property name="tabTitle" type="java.lang.String" value="Passwords"/>
- <Property name="tabToolTip" type="java.lang.String" value="Manage passwords"/>
- </JTabbedPaneConstraints>
+ <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.DesignGridBagLayout"/>
<SubComponents>
- <Component class="javax.swing.JLabel" name="lblCurrentAccountLabel">
- <Properties>
- <Property name="text" type="java.lang.String" value="Current account:"/>
- </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="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="13" weightX="0.0" weightY="0.0"/>
- </Constraint>
- </Constraints>
- </Component>
- <Component class="javax.swing.JLabel" name="lblCurrentAccount">
- <Properties>
- <Property name="text" type="java.lang.String" value="XXXX"/>
- </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="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
- </Constraint>
- </Constraints>
- </Component>
<Component class="javax.swing.JLabel" name="lblNewPassword">
<Properties>
<Property name="text" type="java.lang.String" value="New password:"/>
@@ -111,21 +205,37 @@
</Constraint>
</Constraints>
</Component>
- <Component class="javax.swing.JButton" name="btnUpdatePassword">
- <Properties>
- <Property name="mnemonic" type="int" value="80"/>
- <Property name="text" type="java.lang.String" value="Update Password"/>
- <Property name="toolTipText" type="java.lang.String" value="Change the current password to the new values"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnUpdatePasswordActionPerformed"/>
- </Events>
+ <Container class="javax.swing.JPanel" name="pnlPasswordButtons">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="2" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="0" gridY="3" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
- </Component>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnUpdatePassword">
+ <Properties>
+ <Property name="mnemonic" type="int" value="80"/>
+ <Property name="text" type="java.lang.String" value="Update Password"/>
+ <Property name="toolTipText" type="java.lang.String" value="Change the current password to the new values"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnUpdatePasswordActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnCancel">
+ <Properties>
+ <Property name="mnemonic" type="int" value="99"/>
+ <Property name="text" type="java.lang.String" value="Cancel"/>
+ <Property name="toolTipText" type="java.lang.String" value="Cancel the password change"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCancelActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
</SubComponents>
</Container>
</SubComponents>
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 e7f6e04..e702bb2 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
@@ -33,6 +33,7 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
super(idrop, modal);
this.idrop = idrop;
initComponents();
+ setUpPasswordPanel();
}
/**
@@ -42,107 +43,183 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
*/
@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(
- 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()) {
- setUpPasswordPanel();
- }
- }// GEN-LAST:event_tabPreferencesStateChanged
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ 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();
+ pnlPasswords = new javax.swing.JPanel();
+ lblNewPassword = new javax.swing.JLabel();
+ passwdNewPassword = new javax.swing.JPasswordField();
+ lblConfirmPassword = new javax.swing.JLabel();
+ passwdConfirmPassword = new javax.swing.JPasswordField();
+ pnlPasswordButtons = new javax.swing.JPanel();
+ btnUpdatePassword = new javax.swing.JButton();
+ btnCancel = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("iDrop - Change Password");
+ setAlwaysOnTop(true);
+ setMinimumSize(new java.awt.Dimension(551, 400));
+
+ pnlCurrentGrid.setLayout(new java.awt.GridBagLayout());
+
+ lblHostLabel.setText(org.openide.util.NbBundle.getMessage(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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(ChangePasswordDialog.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);
+
+ pnlPasswords.setLayout(new java.awt.GridBagLayout());
+
+ 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() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnUpdatePasswordActionPerformed(evt);
+ }
+ });
+ pnlPasswordButtons.add(btnUpdatePassword);
+
+ btnCancel.setMnemonic('c');
+ btnCancel.setText("Cancel");
+ btnCancel.setToolTipText("Cancel the password change");
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlPasswordButtons.add(btnCancel);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ pnlPasswords.add(pnlPasswordButtons, gridBagConstraints);
+
+ 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(pnlPasswords, gridBagConstraints);
+
+ getContentPane().add(pnlCurrentGrid, java.awt.BorderLayout.CENTER);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed
+ this.dispose();
+ }//GEN-LAST:event_btnCancelActionPerformed
private void btnUpdatePasswordActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdatePasswordActionPerformed
@@ -214,9 +291,9 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
irodsAccount.getZone(),
irodsAccount.getDefaultStorageResource());
idrop.setIrodsAccount(newAccount);
+ idrop.reinitializeForChangedIRODSAccount();
JOptionPane.showMessageDialog(this, "Password was changed");
- passwdNewPassword.setText("");
- passwdConfirmPassword.setText("");
+
} catch (JargonException ex) {
Logger.getLogger(ChangePasswordDialog.class.getName()).log(
@@ -224,12 +301,17 @@ public class ChangePasswordDialog extends javax.swing.JDialog {
} finally {
idrop.getiDropCore().closeIRODSConnection(
idrop.getiDropCore().getIrodsAccount());
+ this.dispose();
}
}// GEN-LAST:event_btnUpdatePasswordActionPerformed
private void setUpPasswordPanel() {
- String acctUri = idrop.getIrodsAccount().toString();
- lblCurrentAccount.setText(acctUri);
+ IRODSAccount account = idrop.getIrodsAccount();
+ lblHost.setText(account.getHost());
+ lblPort.setText(String.valueOf(account.getPort()));
+ lblZone.setText(account.getZone());
+ lblResource.setText(account.getZone());
+ lblUserName.setText(account.getUserName());
initializePasswordColors();
}
@@ -237,23 +319,25 @@ 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;
-
- private javax.swing.JLabel lblConfirmPassword;
-
- private javax.swing.JLabel lblCurrentAccount;
-
- private javax.swing.JLabel lblCurrentAccountLabel;
-
- private javax.swing.JLabel lblNewPassword;
-
- private javax.swing.JPasswordField passwdConfirmPassword;
-
- private javax.swing.JPasswordField passwdNewPassword;
-
- private javax.swing.JPanel pnlPasswords;
-
- private javax.swing.JTabbedPane tabPreferences;
- // End of variables declaration//GEN-END:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnUpdatePassword;
+ private javax.swing.JLabel lblConfirmPassword;
+ private javax.swing.JLabel lblHost;
+ private javax.swing.JLabel lblHostLabel;
+ private javax.swing.JLabel lblNewPassword;
+ private javax.swing.JLabel lblPort;
+ private javax.swing.JLabel lblPortLabel;
+ private javax.swing.JLabel lblResource;
+ private javax.swing.JLabel lblResourceLabel;
+ private javax.swing.JLabel lblUserName;
+ private javax.swing.JLabel lblUserNameLabel;
+ private javax.swing.JLabel lblZone;
+ private javax.swing.JLabel lblZoneLabel;
+ private javax.swing.JPasswordField passwdConfirmPassword;
+ private javax.swing.JPasswordField passwdNewPassword;
+ private javax.swing.JPanel pnlCurrentGrid;
+ private javax.swing.JPanel pnlPasswordButtons;
+ private javax.swing.JPanel pnlPasswords;
+ // End of variables declaration//GEN-END:variables
}
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 b7837c6..8a9648f 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
@@ -873,7 +873,9 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
}
private void btnChangePasswordActionPerformed(java.awt.event.ActionEvent evt) {
- log.info("changing password");
+ ChangePasswordDialog changePasswordDialog = new ChangePasswordDialog((iDrop) this.getParent(), true);
+ changePasswordDialog.setLocationRelativeTo(this);
+ changePasswordDialog.setVisible(true);
}
protected JTable getSynchTable() {