| ... |
... |
@@ -28,22 +28,28 @@ import fr.ird.observe.application.swing.ui.ObserveKeyStrokes; |
|
28
|
28
|
import fr.ird.observe.application.swing.ui.UIHelper;
|
|
29
|
29
|
import fr.ird.observe.application.swing.ui.admin.config.ConfigUI;
|
|
30
|
30
|
import fr.ird.observe.application.swing.ui.admin.config.SelectDataUI;
|
|
|
31
|
+import fr.ird.observe.application.swing.ui.admin.consolidate.ConsolidateUI;
|
|
|
32
|
+import fr.ird.observe.application.swing.ui.admin.export.ExportUI;
|
|
31
|
33
|
import fr.ird.observe.application.swing.ui.admin.resume.ShowResumeUI;
|
|
32
|
34
|
import fr.ird.observe.application.swing.ui.admin.save.SaveLocalUI;
|
|
|
35
|
+import fr.ird.observe.application.swing.ui.admin.synchronize.data.DataSynchroUI;
|
|
|
36
|
+import fr.ird.observe.application.swing.ui.admin.synchronize.referential.legacy.SynchronizeUI;
|
|
|
37
|
+import fr.ird.observe.application.swing.ui.admin.synchronize.referential.ng.ReferentialSynchroUI;
|
|
|
38
|
+import fr.ird.observe.application.swing.ui.admin.validate.ValidateUI;
|
|
|
39
|
+import java.awt.Component;
|
|
|
40
|
+import java.util.Arrays;
|
|
|
41
|
+import java.util.Date;
|
|
|
42
|
+import javax.swing.Icon;
|
|
|
43
|
+import javax.swing.JCheckBox;
|
|
|
44
|
+import javax.swing.JComponent;
|
|
|
45
|
+import javax.swing.border.TitledBorder;
|
|
|
46
|
+import org.apache.commons.logging.Log;
|
|
|
47
|
+import org.apache.commons.logging.LogFactory;
|
|
33
|
48
|
import org.nuiton.jaxx.runtime.spi.UIHandler;
|
|
34
|
49
|
import org.nuiton.jaxx.runtime.swing.wizard.WizardUILancher;
|
|
35
|
50
|
import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardExtUtil;
|
|
36
|
51
|
import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState;
|
|
37
|
|
-import org.apache.commons.logging.Log;
|
|
38
|
|
-import org.apache.commons.logging.LogFactory;
|
|
39
|
52
|
|
|
40
|
|
-import javax.swing.Icon;
|
|
41
|
|
-import javax.swing.JCheckBox;
|
|
42
|
|
-import javax.swing.JComponent;
|
|
43
|
|
-import javax.swing.border.TitledBorder;
|
|
44
|
|
-import java.awt.Component;
|
|
45
|
|
-import java.util.Arrays;
|
|
46
|
|
-import java.util.Date;
|
|
47
|
53
|
|
|
48
|
54
|
import static org.nuiton.i18n.I18n.t;
|
|
49
|
55
|
|
| ... |
... |
@@ -225,11 +231,74 @@ public class AdminUIHandler implements UIHandler<AdminUI> { |
|
225
|
231
|
|
|
226
|
232
|
}
|
|
227
|
233
|
|
|
|
234
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.REFERENTIAL_SYNCHRONIZE.ordinal() && newStep == AdminStep.REFERENTIAL_SYNCHRONIZE) {
|
|
|
235
|
+
|
|
|
236
|
+ if (ui.getModel().getStepState(AdminStep.REFERENTIAL_SYNCHRONIZE) == WizardState.PENDING) {
|
|
|
237
|
+ ReferentialSynchroUI tabUI = (ReferentialSynchroUI) ui.getStepUI(AdminStep.REFERENTIAL_SYNCHRONIZE);
|
|
|
238
|
+ tabUI.getStartAction().doClick();
|
|
|
239
|
+ }
|
|
|
240
|
+
|
|
|
241
|
+ }
|
|
|
242
|
+
|
|
|
243
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.DATA_SYNCHRONIZE.ordinal() && newStep == AdminStep.DATA_SYNCHRONIZE) {
|
|
|
244
|
+
|
|
|
245
|
+ if (ui.getModel().getStepState(AdminStep.DATA_SYNCHRONIZE) == WizardState.PENDING) {
|
|
|
246
|
+ DataSynchroUI tabUI = (DataSynchroUI) ui.getStepUI(AdminStep.DATA_SYNCHRONIZE);
|
|
|
247
|
+ tabUI.getStartAction().doClick();
|
|
|
248
|
+ }
|
|
|
249
|
+
|
|
|
250
|
+ }
|
|
|
251
|
+
|
|
|
252
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.CONSOLIDATE.ordinal() && newStep == AdminStep.CONSOLIDATE) {
|
|
|
253
|
+
|
|
|
254
|
+ if (ui.getModel().getStepState(AdminStep.CONSOLIDATE) == WizardState.PENDING) {
|
|
|
255
|
+ ConsolidateUI tabUI = (ConsolidateUI) ui.getStepUI(AdminStep.CONSOLIDATE);
|
|
|
256
|
+ tabUI.getStartButton().doClick();
|
|
|
257
|
+ }
|
|
|
258
|
+
|
|
|
259
|
+ }
|
|
|
260
|
+
|
|
|
261
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.SYNCHRONIZE.ordinal() && newStep == AdminStep.SYNCHRONIZE) {
|
|
|
262
|
+
|
|
|
263
|
+ if (ui.getModel().getStepState(AdminStep.SYNCHRONIZE) == WizardState.PENDING) {
|
|
|
264
|
+ SynchronizeUI tabUI = (SynchronizeUI) ui.getStepUI(AdminStep.SYNCHRONIZE);
|
|
|
265
|
+ tabUI.getStartAction().doClick();
|
|
|
266
|
+ }
|
|
|
267
|
+
|
|
|
268
|
+ }
|
|
|
269
|
+
|
|
|
270
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.VALIDATE.ordinal() && newStep == AdminStep.VALIDATE) {
|
|
|
271
|
+
|
|
|
272
|
+ if (ui.getModel().getStepState(AdminStep.VALIDATE) == WizardState.PENDING) {
|
|
|
273
|
+ ValidateUI tabUI = (ValidateUI) ui.getStepUI(AdminStep.VALIDATE);
|
|
|
274
|
+ tabUI.getStartButton().doClick();
|
|
|
275
|
+ }
|
|
|
276
|
+
|
|
|
277
|
+ }
|
|
|
278
|
+
|
|
|
279
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.SAVE_LOCAL.ordinal() && newStep == AdminStep.SAVE_LOCAL) {
|
|
|
280
|
+
|
|
|
281
|
+ if (ui.getModel().getStepState(AdminStep.SAVE_LOCAL) == WizardState.PENDING) {
|
|
|
282
|
+ SaveLocalUI tabUI = (SaveLocalUI) ui.getStepUI(AdminStep.SAVE_LOCAL);
|
|
|
283
|
+ tabUI.getStartAction().doClick();
|
|
|
284
|
+ }
|
|
|
285
|
+
|
|
|
286
|
+ }
|
|
|
287
|
+
|
|
|
288
|
+ if (oldStep != null && oldStep.ordinal() < AdminStep.EXPORT_DATA.ordinal() && newStep == AdminStep.EXPORT_DATA) {
|
|
|
289
|
+
|
|
|
290
|
+ if (ui.getModel().getStepState(AdminStep.EXPORT_DATA) == WizardState.PENDING) {
|
|
|
291
|
+ ExportUI tabUI = (ExportUI) ui.getStepUI(AdminStep.EXPORT_DATA);
|
|
|
292
|
+ tabUI.getPrepareAction().doClick();
|
|
|
293
|
+ }
|
|
|
294
|
+
|
|
|
295
|
+ }
|
|
|
296
|
+
|
|
228
|
297
|
if (c != null && c.getStep() == AdminStep.SAVE_LOCAL) {
|
|
229
|
298
|
|
|
230
|
299
|
// on met a jour le descriptif
|
|
231
|
|
- SaveLocalUI saveUI = (SaveLocalUI) ui.getStepUI(AdminStep.SAVE_LOCAL);
|
|
232
|
|
- saveUI.getHandler().updateText();
|
|
|
300
|
+ SaveLocalUI tabUI = (SaveLocalUI) ui.getStepUI(AdminStep.SAVE_LOCAL);
|
|
|
301
|
+ tabUI.getHandler().updateText();
|
|
233
|
302
|
}
|
|
234
|
303
|
if (c != null && c.getStep() == AdminStep.SHOW_RESUME) {
|
|
235
|
304
|
|
| ... |
... |
@@ -259,7 +328,7 @@ public class AdminUIHandler implements UIHandler<AdminUI> { |
|
259
|
328
|
|
|
260
|
329
|
/**
|
|
261
|
330
|
* Call back lorsque l'état du modèle a changé.
|
|
262
|
|
- *
|
|
|
331
|
+ * <p>
|
|
263
|
332
|
* Ici, on va rendre accessible (ou pas) les onglets selon l'état du modèle.
|
|
264
|
333
|
*
|
|
265
|
334
|
* @param newState le nouvel état.
|