summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-08-08 16:55:05 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-08-08 16:55:05 (GMT)
commit3ea904e32737e7d2fc057b44402c61935b6ce89a (patch)
tree176b71eb76dcbe47ccab07b4d2bae84e8aaa950e
parent5863a59bc93b400be638ac8b306ab7b930af737c (diff)
downloadQCG-Data-3ea904e32737e7d2fc057b44402c61935b6ce89a.zip
QCG-Data-3ea904e32737e7d2fc057b44402c61935b6ce89a.tar.gz
QCG-Data-3ea904e32737e7d2fc057b44402c61935b6ce89a.tar.bz2
dont allow synch or updates while synch in progress
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java38
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form68
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java56
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java57
4 files changed, 81 insertions, 138 deletions
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 d659a35..3fb8f60 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
@@ -806,13 +806,17 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
}
try {
thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- idropCore.getIdropConfigurationService().updateSynchronization(synchronization);
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+ log.info("deleting synchronization:{}", synchronization);
+
+ if (synchConfigurationService.isSynchRunning(synchronization)) {
+ MessageManager.showMessage(thisPanel, "Cannot delete the synchronization, a synch is currently running", MessageManager.TITLE_MESSAGE);
+ return;
+ }
ListSelectionModel lsm = (ListSelectionModel) thisPanel.getSynchTable().getSelectionModel();
SynchConfigTableModel model = (SynchConfigTableModel) thisPanel.getSynchTable().getModel();
- SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
- log.info("deleting synchronization:{}", synchronization);
synchConfigurationService.deleteSynchronization(synchronization);
log.info("synch deleted, refreshing model");
List<Synchronization> synchronizations = synchConfigurationService.listAllSynchronizations();
@@ -825,9 +829,7 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
btnUpdateSynch.setEnabled(false);
btnSynchNow.setEnabled(false);
refreshSynchConfigPanel();
- } catch (IdropException ex) {
- MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
- } catch (SynchException ex) {
+ } catch (Exception ex) {
MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
} finally {
thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
@@ -901,6 +903,9 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
if (isNew) {
log.info("adding new synch");
}
+
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+
// edits pass, do update
log.info("saving synch data");
Synchronization synchronization = selectedSynchronization;
@@ -931,15 +936,18 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
try {
thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ if (synchConfigurationService.isSynchRunning(selectedSynchronization)) {
+ MessageManager.showMessage(thisPanel, "Cannot update the synchronization, a synch is currently running", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
idropCore.getIdropConfigurationService().updateSynchronization(synchronization);
MessageManager.showMessage(thisPanel, "Configuration updated", MessageManager.TITLE_MESSAGE);
ListSelectionModel lsm = (ListSelectionModel) thisPanel.getSynchTable().getSelectionModel();
SynchConfigTableModel model = (SynchConfigTableModel) thisPanel.getSynchTable().getModel();
if (isNew) {
- SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
-
-
+
List<Synchronization> synchronizations = synchConfigurationService.listAllSynchronizations();
model.setSynchronizations(synchronizations);
@@ -963,14 +971,12 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
}
}
-
btnDeleteSynch.setEnabled(true);
btnUpdateSynch.setEnabled(true);
btnSynchNow.setEnabled(true);
} catch (IdropException ex) {
MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
-
} catch (SynchException ex) {
MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
} finally {
@@ -983,7 +989,7 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
}
/**
- * Force a synhronization process on the selected synchronization
+ * Force a synchronization process on the selected synchronization
* @param evt
*/
private void btnSynchNowActionPerformed(java.awt.event.ActionEvent evt) {
@@ -1007,8 +1013,14 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.OK_OPTION) {
try {
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+
+ if (synchConfigurationService.isSynchRunning(selectedSynchronization)) {
+ MessageManager.showMessage(this, "Cannot schedule the synchronization, a synch is currently running", MessageManager.TITLE_MESSAGE);
+ return;
+ }
idropCore.getTransferManager().enqueueASynch(selectedSynchronization, selectedSynchronization.buildIRODSAccountFromSynchronizationData());
- } catch (JargonException ex) {
+ } catch (Exception ex) {
log.error("error starting synch", ex);
MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
throw new IdropRuntimeException(ex);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form
index 2e5800e..36dfd17 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.form
@@ -218,12 +218,6 @@
<Container class="javax.swing.JToolBar" name="toolbarQueueManagement">
<Properties>
<Property name="rollover" type="boolean" value="true"/>
- <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
<Constraints>
@@ -340,9 +334,6 @@
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPaneMaster">
<Properties>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
<AuxValues>
@@ -358,7 +349,6 @@
<SubComponents>
<Component class="javax.swing.JTable" name="jTableMaster">
<Properties>
- <Property name="autoCreateRowSorter" type="boolean" value="true"/>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="4" rowCount="4">
<Column editable="true" title="Title 1" type="java.lang.Object"/>
@@ -367,6 +357,7 @@
<Column editable="true" title="Title 4" type="java.lang.Object"/>
</Table>
</Property>
+ <Property name="autoCreateRowSorter" type="boolean" value="true"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
@@ -383,11 +374,6 @@
</SubComponents>
</Container>
<Container class="javax.swing.JTabbedPane" name="tabDetails">
- <Properties>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
<JSplitPaneConstraints position="bottom"/>
@@ -415,12 +401,6 @@
<SubComponents>
<Container class="javax.swing.JPanel" name="pnlTransferInfo">
<Properties>
- <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
<Constraints>
@@ -437,12 +417,6 @@
<Container class="javax.swing.JPanel" name="pnlTransferInfoBasicStats">
<Properties>
<Property name="focusable" type="boolean" value="false"/>
- <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
@@ -703,12 +677,12 @@
</Constraint>
</Constraints>
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="pnlTransferOverview">
<Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="941" ipadY="24" insetsTop="5" insetsLeft="21" insetsBottom="0" insetsRight="21" anchor="18" weightX="0.0" weightY="0.0"/>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
</Constraint>
</Constraints>
@@ -793,12 +767,12 @@
</Container>
<Container class="javax.swing.JPanel" name="jPanel1">
<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="0" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="South"/>
</Constraint>
</Constraints>
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
<SubComponents>
<Component class="javax.swing.JProgressBar" name="transferStatusProgressBar">
<Properties>
@@ -807,13 +781,14 @@
<BevelBorder bevelType="1"/>
</Border>
</Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[150, 24]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[600, 24]"/>
+ </Property>
<Property name="stringPainted" type="boolean" value="true"/>
</Properties>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="0" gridY="0" gridWidth="0" gridHeight="1" fill="1" ipadX="844" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="5" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
- </Constraint>
- </Constraints>
</Component>
</SubComponents>
</Container>
@@ -823,12 +798,6 @@
</Container>
<Container class="javax.swing.JPanel" name="pnlTransferDetailsTable">
<Properties>
- <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
<Constraints>
@@ -842,14 +811,6 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="pnlViewRadio">
- <Properties>
- <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
- </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="North"/>
@@ -890,9 +851,6 @@
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="null"/>
- </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
<Constraints>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java
index 10b17e1..f65ceed 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/QueueManagerDialog.java
@@ -271,7 +271,7 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
setTitle("iDrop - Transfer Manager");
setBounds(new java.awt.Rectangle(0, 22, 0, 0));
- pnlCenter.setLayout(new java.awt.GridLayout());
+ pnlCenter.setLayout(new java.awt.GridLayout(1, 0));
jSplitPane1.setDividerLocation(200);
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
@@ -290,8 +290,6 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
pnlToolbar.add(lblHeader, gridBagConstraints);
toolbarQueueManagement.setRollover(true);
- toolbarQueueManagement.setMinimumSize(null);
- toolbarQueueManagement.setPreferredSize(null);
toolbarQueueManagement.setRequestFocusEnabled(false);
toolbarQueueManagement.add(jSeparator2);
@@ -401,10 +399,8 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
pnlTop.add(pnlToolbar, java.awt.BorderLayout.NORTH);
- jScrollPaneMaster.setPreferredSize(null);
jScrollPaneMaster.setRequestFocusEnabled(false);
- jTableMaster.setAutoCreateRowSorter(true);
jTableMaster.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
@@ -416,6 +412,7 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
+ jTableMaster.setAutoCreateRowSorter(true);
jTableMaster.setMaximumSize(null);
jTableMaster.setMinimumSize(null);
jTableMaster.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
@@ -425,19 +422,13 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
jSplitPane1.setTopComponent(pnlTop);
- tabDetails.setPreferredSize(null);
-
pnlTransferDetailsSummary.setPreferredSize(new java.awt.Dimension(0, 0));
pnlTransferDetailsSummary.setLayout(new java.awt.BorderLayout());
- pnlTransferInfo.setMinimumSize(null);
- pnlTransferInfo.setPreferredSize(null);
pnlTransferInfo.setRequestFocusEnabled(false);
- pnlTransferInfo.setLayout(new java.awt.GridLayout());
+ pnlTransferInfo.setLayout(new java.awt.GridLayout(1, 0));
pnlTransferInfoBasicStats.setFocusable(false);
- pnlTransferInfoBasicStats.setMinimumSize(null);
- pnlTransferInfoBasicStats.setPreferredSize(null);
pnlTransferInfoBasicStats.setLayout(new java.awt.GridBagLayout());
lblTransferTypeLabel.setText("Transfer Type:");
@@ -627,7 +618,7 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
pnlTransferProgress.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
pnlTransferProgress.setPreferredSize(new java.awt.Dimension(200, 100));
pnlTransferProgress.setRequestFocusEnabled(false);
- pnlTransferProgress.setLayout(new java.awt.GridBagLayout());
+ pnlTransferProgress.setLayout(new java.awt.BorderLayout());
pnlTransferOverview.setLayout(new java.awt.GridBagLayout());
@@ -663,49 +654,23 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
pnlTransferOverview.add(pnlTransferFileInfo, gridBagConstraints);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.gridwidth = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.ipadx = 941;
- gridBagConstraints.ipady = 24;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
- gridBagConstraints.insets = new java.awt.Insets(5, 21, 0, 21);
- pnlTransferProgress.add(pnlTransferOverview, gridBagConstraints);
-
- jPanel1.setLayout(new java.awt.GridBagLayout());
+ pnlTransferProgress.add(pnlTransferOverview, java.awt.BorderLayout.CENTER);
transferStatusProgressBar.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+ transferStatusProgressBar.setMinimumSize(new java.awt.Dimension(150, 24));
+ transferStatusProgressBar.setPreferredSize(new java.awt.Dimension(600, 24));
transferStatusProgressBar.setStringPainted(true);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.ipadx = 844;
- gridBagConstraints.insets = new java.awt.Insets(11, 0, 5, 0);
- jPanel1.add(transferStatusProgressBar, gridBagConstraints);
+ jPanel1.add(transferStatusProgressBar);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- pnlTransferProgress.add(jPanel1, gridBagConstraints);
+ pnlTransferProgress.add(jPanel1, java.awt.BorderLayout.SOUTH);
pnlTransferDetailsSummary.add(pnlTransferProgress, java.awt.BorderLayout.SOUTH);
tabDetails.addTab("TransferSummary", null, pnlTransferDetailsSummary, "Summary information about the selected transfer");
- pnlTransferDetailsTable.setMinimumSize(null);
- pnlTransferDetailsTable.setPreferredSize(null);
pnlTransferDetailsTable.setRequestFocusEnabled(false);
pnlTransferDetailsTable.setLayout(new java.awt.BorderLayout());
- pnlViewRadio.setMinimumSize(null);
- pnlViewRadio.setPreferredSize(null);
-
btnGroupDetailsDisplay.add(radioShowAll);
radioShowAll.setText("Show all items");
radioShowAll.setToolTipText("List all transfer items in detail");
@@ -730,7 +695,6 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
pnlTransferDetailsTable.add(pnlViewRadio, java.awt.BorderLayout.NORTH);
jScrollPaneDetails.setMinimumSize(null);
- jScrollPaneDetails.setPreferredSize(null);
jScrollPaneDetails.setRequestFocusEnabled(false);
jTableDetails.setModel(new javax.swing.table.DefaultTableModel(
@@ -1012,7 +976,7 @@ public class QueueManagerDialog extends javax.swing.JDialog implements ListSelec
if (masterTableModel.getRowCount() > 0) {
if (selectedRow == -1) {
- selectedRow = 0;
+ jTableMaster.setRowSelectionInterval(0, 0);
}
selectedMasterTableObject = (LocalIRODSTransfer) masterTableModel.getTransferAtRow(jTableMaster.convertRowIndexToModel(selectedRow));
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java
index 9a06bcc..9d34c76 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java
@@ -578,6 +578,36 @@ public class SetupWizard extends javax.swing.JDialog {
this.dispose();
}
+
+ private FrequencyType getSynchFrequencyFromGUI() {
+ FrequencyType currentFrequencyType = null;
+ if (jcomboSynchFrequency.getSelectedIndex() == 0) {
+ currentFrequencyType = FrequencyType.EVERY_HOUR;
+ } else if (jcomboSynchFrequency.getSelectedIndex() == 1) {
+ currentFrequencyType = FrequencyType.EVERY_WEEK;
+ } else if (jcomboSynchFrequency.getSelectedIndex() == 2) {
+ currentFrequencyType = FrequencyType.EVERY_DAY;
+ } else if (jcomboSynchFrequency.getSelectedIndex() == 3) {
+ currentFrequencyType = FrequencyType.EVERY_TWO_MINUTES;
+ }
+ return currentFrequencyType;
+ }
+
+ private SynchronizationType getSynchTypeFromGUI() throws IdropRuntimeException {
+ SynchronizationType currentSynchronizationType;
+ if (radioBackup.isSelected()) {
+ currentSynchronizationType = SynchronizationType.ONE_WAY_LOCAL_TO_IRODS;
+ } else if (radioFeed.isSelected()) {
+ currentSynchronizationType = SynchronizationType.ONE_WAY_IRODS_TO_LOCAL;
+ } else if (radioSynch.isSelected()) {
+ currentSynchronizationType = SynchronizationType.BI_DIRECTIONAL;
+ } else {
+ log.error("unknown synchronization type in GUI");
+ throw new IdropRuntimeException("unknown synchroization type in GUI");
+ }
+ return currentSynchronizationType;
+ }
+
private void saveSynch() {
if (txtLocalPath.getText().trim().length() == 0 && txtIrodsPath.getText().trim().length() == 0) {
log.info("ignoring synch for now");
@@ -608,30 +638,9 @@ public class SetupWizard extends javax.swing.JDialog {
synchronization.setIrodsUserName(idropCore.getIrodsAccount().getUserName());
synchronization.setIrodsZone(idropCore.getIrodsAccount().getZone());
synchronization.setName("Default");
-
- if (synchronization.getFrequencyType() == FrequencyType.EVERY_HOUR) {
- jcomboSynchFrequency.setSelectedIndex(0);
- } else if (synchronization.getFrequencyType() == FrequencyType.EVERY_WEEK) {
- jcomboSynchFrequency.setSelectedIndex(1);
- } else if (synchronization.getFrequencyType() == FrequencyType.EVERY_DAY) {
- jcomboSynchFrequency.setSelectedIndex(2);
- } else if (synchronization.getFrequencyType() == FrequencyType.EVERY_TWO_MINUTES) {
- jcomboSynchFrequency.setSelectedIndex(3);
- } else {
- log.error("unknown frequency type for synch:{}", synchronization.getFrequencyType());
- throw new IdropRuntimeException("unknown frequency type for synch");
- }
-
- if (synchronization.getSynchronizationMode() == SynchronizationType.BI_DIRECTIONAL) {
- radioSynch.setSelected(true);
- } else if (synchronization.getSynchronizationMode() == SynchronizationType.ONE_WAY_IRODS_TO_LOCAL) {
- radioFeed.setSelected(true);
- } else if (synchronization.getSynchronizationMode() == SynchronizationType.ONE_WAY_LOCAL_TO_IRODS) {
- radioBackup.setSelected(true);
- } else {
- log.error("unknown synchronization mode for synch:{}", synchronization.getSynchronizationMode());
- throw new IdropRuntimeException("unknown synchronization mode");
- }
+
+ synchronization.setFrequencyType(getSynchFrequencyFromGUI());
+ synchronization.setSynchronizationMode(getSynchTypeFromGUI());
this.idropConfigurationService.createNewSynchronization(synchronization);
advanceTab();