From 0ee097350fccc064d82882579a1170dae0d60b5e Mon Sep 17 00:00:00 2001 From: Philip Wenig Date: Wed, 5 Jan 2022 09:57:08 +0100 Subject: [PATCH] Fixed #181 - Peak Review [Template] - add option to adjust the positions --- .../ui/fieldeditors/AbstractFieldEditor.java | 8 +- .../ui/swt/TemplatePeakListEditor.java | 26 ++- .../ui/swt/TemplateReviewEditor.java | 176 ++++++++++-------- 3 files changed, 119 insertions(+), 91 deletions(-) diff --git a/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/fieldeditors/AbstractFieldEditor.java b/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/fieldeditors/AbstractFieldEditor.java index c149487d2..75ffdb9e6 100644 --- a/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/fieldeditors/AbstractFieldEditor.java +++ b/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/fieldeditors/AbstractFieldEditor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2020 Lablicate GmbH. + * Copyright (c) 2018, 2022 Lablicate GmbH. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -12,6 +12,7 @@ *******************************************************************************/ package net.openchrom.xxd.process.supplier.templates.ui.fieldeditors; +import org.eclipse.chemclipse.rcp.ui.icons.core.IApplicationImage; import org.eclipse.jface.preference.FieldEditor; public abstract class AbstractFieldEditor extends FieldEditor { @@ -36,4 +37,7 @@ public abstract class AbstractFieldEditor extends FieldEditor { public static final String MESSAGE_REMOVE_ALL = "Do you want to delete all template(s)?"; public static final String MESSAGE_EXPORT_SUCCESSFUL = "Templates have been exported successfully."; public static final String MESSAGE_EXPORT_FAILED = "Failed to export the templates."; -} + // + public static final String TOOLTIP_ADJUST_POSITION = "the position adjust toolbar."; + public static final String IMAGE_ADJUST_POSITION = IApplicationImage.IMAGE_ADJUST_CHROMATOGRAMS; +} \ No newline at end of file diff --git a/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/swt/TemplatePeakListEditor.java b/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/swt/TemplatePeakListEditor.java index 4777fae25..504205931 100644 --- a/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/swt/TemplatePeakListEditor.java +++ b/openchrom/plugins/net.openchrom.xxd.process.supplier.templates.ui/src/net/openchrom/xxd/process/supplier/templates/ui/swt/TemplatePeakListEditor.java @@ -16,6 +16,7 @@ import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.DIALOG_TITLE; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.EDIT_TOOLTIP; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.EXPORT_TITLE; +import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.IMAGE_ADJUST_POSITION; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.IMPORT_TITLE; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.MESSAGE_ADD; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.MESSAGE_EDIT; @@ -25,6 +26,7 @@ import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.MESSAGE_REMOVE_ALL; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.REMOVE_ALL_TOOLTIP; import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.REMOVE_TOOLTIP; +import static net.openchrom.xxd.process.supplier.templates.ui.fieldeditors.AbstractFieldEditor.TOOLTIP_ADJUST_POSITION; import java.io.File; import java.io.IOException; @@ -54,7 +56,6 @@ import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -90,9 +91,6 @@ public class TemplatePeakListEditor implements SettingsUIProvider.SettingsUICont private static final String CATEGORY = "Peak Detector"; private static final String DELETE = "Delete"; // - private static final String TOOLTIP_ADJUST_POSITION = "the position adjust toolbar."; - private static final String IMAGE_ADJUST_POSITION = IApplicationImage.IMAGE_ADJUST_CHROMATOGRAMS; - // private Listener listener; private List