summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2012-05-23 12:52:32 (GMT)
committer mconway <michael.c.conway@gmail.com>2012-05-23 12:52:32 (GMT)
commit275690f51abdfdda0b351588b347a69697cd2c40 (patch)
tree9349513c018c61e28a3549806d6241be11d11b71 /idrop-swing
parent392937382ac2c007d1e81990da8fab724dd9e71b (diff)
downloadQCG-Data-275690f51abdfdda0b351588b347a69697cd2c40.zip
QCG-Data-275690f51abdfdda0b351588b347a69697cd2c40.tar.gz
QCG-Data-275690f51abdfdda0b351588b347a69697cd2c40.tar.bz2
[#775] 1.1.0 refactoring activities
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form156
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java126
2 files changed, 138 insertions, 144 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
index 0e86a6d..a011763 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
@@ -24,6 +24,66 @@
</Container>
<Component class="javax.swing.ButtonGroup" name="buttonGroupLandF">
</Component>
+ <Container class="javax.swing.JPanel" name="pnlInfoMetadata">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="lblMetadataInfo">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Lucida Grande" size="13" style="1"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="ff" green="0" id="blue" palette="1" red="0" type="palette"/>
+ </Property>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/edit-4.png"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="iRODS AVU Metadata"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlInfoSharing">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="lblInfoSharing">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Lucida Grande" size="13" style="1"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="ff" green="0" id="blue" palette="1" red="0" type="palette"/>
+ </Property>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/share.png"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Access Permissions and Tickets"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlInfoReplication">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="lblMetadataInfo1">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Lucida Grande" size="13" style="1"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="ff" green="0" id="blue" palette="1" red="0" type="palette"/>
+ </Property>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/edit-copy-3.png"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="File Replication"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
<Menu class="javax.swing.JMenuBar" name="jMenuBar1">
<SubComponents>
<Menu class="javax.swing.JMenu" name="jMenuFile">
@@ -1472,99 +1532,6 @@
</Container>
</SubComponents>
</Container>
- <Container class="javax.swing.JPanel" name="pnlInfoMetadata">
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Metadata" toolTip="AVU Metadata edit and display">
- <Property name="tabTitle" type="java.lang.String" value="Metadata"/>
- <Property name="tabIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
- <Image iconType="3" name="/edit-4.png"/>
- </Property>
- <Property name="tabToolTip" type="java.lang.String" value="AVU Metadata edit and display"/>
- </JTabbedPaneConstraints>
- </Constraint>
- </Constraints>
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="lblMetadataInfo">
- <Properties>
- <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
- <Font name="Lucida Grande" size="13" style="1"/>
- </Property>
- <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
- <Color blue="ff" green="0" id="blue" palette="1" red="0" type="palette"/>
- </Property>
- <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
- <Image iconType="3" name="/edit-4.png"/>
- </Property>
- <Property name="text" type="java.lang.String" value="iRODS AVU Metadata"/>
- </Properties>
- </Component>
- </SubComponents>
- </Container>
- <Container class="javax.swing.JPanel" name="pnlInfoSharing">
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Sharing and Tickets" toolTip="ACL permissions and tickets">
- <Property name="tabTitle" type="java.lang.String" value="Sharing and Tickets"/>
- <Property name="tabIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
- <Image iconType="3" name="/share.png"/>
- </Property>
- <Property name="tabToolTip" type="java.lang.String" value="ACL permissions and tickets"/>
- </JTabbedPaneConstraints>
- </Constraint>
- </Constraints>
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="lblInfoSharing">
- <Properties>
- <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
- <Font name="Lucida Grande" size="13" style="1"/>
- </Property>
- <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
- <Color blue="ff" green="0" id="blue" palette="1" red="0" type="palette"/>
- </Property>
- <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
- <Image iconType="3" name="/share.png"/>
- </Property>
- <Property name="text" type="java.lang.String" value="Access Permissions and Tickets"/>
- </Properties>
- </Component>
- </SubComponents>
- </Container>
- <Container class="javax.swing.JPanel" name="pnlInfoReplication">
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Replication" toolTip="Replication of data">
- <Property name="tabTitle" type="java.lang.String" value="Replication"/>
- <Property name="tabIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
- <Image iconType="3" name="/edit-copy-3.png"/>
- </Property>
- <Property name="tabToolTip" type="java.lang.String" value="Replication of data"/>
- </JTabbedPaneConstraints>
- </Constraint>
- </Constraints>
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="lblMetadataInfo1">
- <Properties>
- <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
- <Font name="Lucida Grande" size="13" style="1"/>
- </Property>
- <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
- <Color blue="ff" green="0" id="blue" palette="1" red="0" type="palette"/>
- </Property>
- <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
- <Image iconType="3" name="/edit-copy-3.png"/>
- </Property>
- <Property name="text" type="java.lang.String" value="File Replication"/>
- </Properties>
- </Component>
- </SubComponents>
- </Container>
</SubComponents>
</Container>
</SubComponents>
@@ -1763,6 +1730,9 @@
<AccessibilityProperties>
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Switch the grid or iRODS account information"/>
</AccessibilityProperties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnManageGridsActionPerformed"/>
+ </Events>
</Component>
</SubComponents>
</Container>
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 44ad29d..98ba10f 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
@@ -188,11 +188,46 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
}
setUpAccountGutter();
+
+ setVisibleComponentsAtStartup();
setVisible(true);
}
+ private void displayAndProcessSignOn() {
+ 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();
+ }
+ }
+ });
+ }
+
+ /**
+ * Startup exit to set visibility of components in iDrop GUI at startup. Here is where the initial visible status
+ * of components can be specified.
+ */
+ private void setVisibleComponentsAtStartup() {
+ this.btnSetRootCustomTargetTree.setVisible(false);
+
+ }
+
protected void signalIdropCoreReadyAndSplashComplete() {
if (receivedStartupSignal) {
log.info("already received startup signal");
@@ -590,27 +625,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
} else if (e.getActionCommand().equals("Logout")) {
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();
- }
- }
- });
+ displayAndProcessSignOn();
} else if (e.getActionCommand().equals("About")) {
AboutDialog aboutDialog = new AboutDialog(this, true);
@@ -1301,6 +1316,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
searchTablePopupMenu = new javax.swing.JPopupMenu();
menuItemShowInHierarchy = new javax.swing.JMenuItem();
buttonGroupLandF = new javax.swing.ButtonGroup();
+ pnlInfoMetadata = new javax.swing.JPanel();
+ lblMetadataInfo = new javax.swing.JLabel();
+ pnlInfoSharing = new javax.swing.JPanel();
+ lblInfoSharing = new javax.swing.JLabel();
+ pnlInfoReplication = new javax.swing.JPanel();
+ lblMetadataInfo1 = new javax.swing.JLabel();
iDropToolbar = new javax.swing.JPanel();
pnlToolbarSizer = new javax.swing.JPanel();
pnlTopToolbarSearchArea = new javax.swing.JPanel();
@@ -1382,12 +1403,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
lblDataType = new javax.swing.JLabel();
lblDataStatusLabel = new javax.swing.JLabel();
lblDataStatus = new javax.swing.JLabel();
- pnlInfoMetadata = new javax.swing.JPanel();
- lblMetadataInfo = new javax.swing.JLabel();
- pnlInfoSharing = new javax.swing.JPanel();
- lblInfoSharing = new javax.swing.JLabel();
- pnlInfoReplication = new javax.swing.JPanel();
- lblMetadataInfo1 = new javax.swing.JLabel();
pnlIdropBottom = new javax.swing.JPanel();
pnlBottomGutter = new javax.swing.JPanel();
pnlHostInfo = new javax.swing.JPanel();
@@ -1443,6 +1458,24 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
});
searchTablePopupMenu.add(menuItemShowInHierarchy);
+ lblMetadataInfo.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblMetadataInfo.setForeground(java.awt.Color.blue);
+ lblMetadataInfo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edit-4.png"))); // NOI18N
+ lblMetadataInfo.setText("iRODS AVU Metadata");
+ pnlInfoMetadata.add(lblMetadataInfo);
+
+ lblInfoSharing.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblInfoSharing.setForeground(java.awt.Color.blue);
+ lblInfoSharing.setIcon(new javax.swing.ImageIcon(getClass().getResource("/share.png"))); // NOI18N
+ lblInfoSharing.setText("Access Permissions and Tickets");
+ pnlInfoSharing.add(lblInfoSharing);
+
+ lblMetadataInfo1.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblMetadataInfo1.setForeground(java.awt.Color.blue);
+ lblMetadataInfo1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edit-copy-3.png"))); // NOI18N
+ lblMetadataInfo1.setText("File Replication");
+ pnlInfoReplication.add(lblMetadataInfo1);
+
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("iDrop - iRODS Cloud Browser");
setMinimumSize(new java.awt.Dimension(600, 600));
@@ -2142,30 +2175,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
tabInfo.addTab("Info", new javax.swing.ImageIcon(getClass().getResource("/help-contents.png")), pnlInfoInner); // NOI18N
- lblMetadataInfo.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblMetadataInfo.setForeground(java.awt.Color.blue);
- lblMetadataInfo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edit-4.png"))); // NOI18N
- lblMetadataInfo.setText("iRODS AVU Metadata");
- pnlInfoMetadata.add(lblMetadataInfo);
-
- tabInfo.addTab("Metadata", new javax.swing.ImageIcon(getClass().getResource("/edit-4.png")), pnlInfoMetadata, "AVU Metadata edit and display"); // NOI18N
-
- lblInfoSharing.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblInfoSharing.setForeground(java.awt.Color.blue);
- lblInfoSharing.setIcon(new javax.swing.ImageIcon(getClass().getResource("/share.png"))); // NOI18N
- lblInfoSharing.setText("Access Permissions and Tickets");
- pnlInfoSharing.add(lblInfoSharing);
-
- tabInfo.addTab("Sharing and Tickets", new javax.swing.ImageIcon(getClass().getResource("/share.png")), pnlInfoSharing, "ACL permissions and tickets"); // NOI18N
-
- lblMetadataInfo1.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblMetadataInfo1.setForeground(java.awt.Color.blue);
- lblMetadataInfo1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edit-copy-3.png"))); // NOI18N
- lblMetadataInfo1.setText("File Replication");
- pnlInfoReplication.add(lblMetadataInfo1);
-
- tabInfo.addTab("Replication", new javax.swing.ImageIcon(getClass().getResource("/edit-copy-3.png")), pnlInfoReplication, "Replication of data"); // NOI18N
-
pnlIrodsInfo.add(tabInfo, java.awt.BorderLayout.NORTH);
tabInfo.getAccessibleContext().setAccessibleName("Info");
@@ -2231,6 +2240,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
btnManageGrids.setIcon(new javax.swing.ImageIcon(getClass().getResource("/im-user.png"))); // NOI18N
btnManageGrids.setMnemonic('S');
btnManageGrids.setLabel("Switch Grid Account");
+ btnManageGrids.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnManageGridsActionPerformed(evt);
+ }
+ });
pnlStatusIcon.add(btnManageGrids);
btnManageGrids.getAccessibleContext().setAccessibleDescription("Switch the grid or iRODS account information");
@@ -2572,6 +2586,16 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
buildTargetTree();
}//GEN-LAST:event_btnGoRootTargetTreeActionPerformed
+
+ /**
+ * Signal to switch grids
+ * @param evt
+ */
+ private void btnManageGridsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnManageGridsActionPerformed
+ displayAndProcessSignOn();
+
+ }//GEN-LAST:event_btnManageGridsActionPerformed
+
private void btnShowTransferManagerActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnShowTransferManagerActionPerformed