This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new a7db41c HOP-3003 Fix layout of result of pipeline checks dialog
new 40b7ff0 Merge pull request #904 from nadment/HOP-3003
a7db41c is described below
commit a7db41c4dbeb6db62c1e43a27236c3e7b6c5c1c6
Author: nadment <[email protected]>
AuthorDate: Fri Jun 25 18:35:43 2021 +0200
HOP-3003 Fix layout of result of pipeline checks dialog
---
.../hop/ui/core/dialog/CheckResultDialog.java | 32 ++++++++++------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git
a/ui/src/main/java/org/apache/hop/ui/core/dialog/CheckResultDialog.java
b/ui/src/main/java/org/apache/hop/ui/core/dialog/CheckResultDialog.java
index d025611..31e93541 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/dialog/CheckResultDialog.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/dialog/CheckResultDialog.java
@@ -21,7 +21,6 @@ import org.apache.hop.core.Const;
import org.apache.hop.core.ICheckResult;
import org.apache.hop.core.ICheckResultSource;
import org.apache.hop.i18n.BaseMessages;
-import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.ui.core.PropsUi;
import org.apache.hop.ui.core.gui.GuiResource;
import org.apache.hop.ui.core.gui.WindowProperty;
@@ -30,8 +29,6 @@ import org.apache.hop.ui.core.widget.TableView;
import org.apache.hop.ui.hopgui.HopGui;
import org.apache.hop.ui.pipeline.transform.BaseTransformDialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
@@ -40,7 +37,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableItem;
@@ -119,16 +115,26 @@ public class CheckResultDialog extends Dialog {
wView.addListener(SWT.Selection, e -> view());
Button wEdit = new Button(shell, SWT.PUSH);
wEdit.setText(BaseMessages.getString(PKG,
"CheckResultDialog.Button.EditOriginTransform"));
- wEdit.addListener(SWT.Selection, e -> edit());
+ wEdit.addListener(SWT.Selection, e -> edit());
+
BaseTransformDialog.positionBottomButtons(
shell, new Button[] {wClose, wView, wEdit}, margin, null);
-
+
+ wNoOK = new Button(shell, SWT.CHECK);
+ wNoOK.setText(STRING_SHOW_SUCESSFUL);
+ FormData fd = new FormData();
+ fd.left = new FormAttachment(0, 0);
+ fd.bottom = new FormAttachment(wClose, -2 * margin);
+ wNoOK.setLayoutData(fd);
+ wNoOK.addListener(SWT.Selection, e -> noOK());
+
+
wlFields = new Label(shell, SWT.LEFT);
wlFields.setText(BaseMessages.getString(PKG,
"CheckResultDialog.Remarks.Label"));
props.setLook(wlFields);
FormData fdlFields = new FormData();
fdlFields.left = new FormAttachment(0, 0);
- fdlFields.right = new FormAttachment(middle, -margin);
+ fdlFields.right = new FormAttachment(100, 0);
fdlFields.top = new FormAttachment(0, margin);
wlFields.setLayoutData(fdlFields);
@@ -170,17 +176,9 @@ public class CheckResultDialog extends Dialog {
fdFields.left = new FormAttachment(0, 0);
fdFields.top = new FormAttachment(wlFields, margin);
fdFields.right = new FormAttachment(100, 0);
- fdFields.bottom = new FormAttachment(wClose, -2 * margin);
+ fdFields.bottom = new FormAttachment(wNoOK, -margin);
wFields.setLayoutData(fdFields);
-
- wNoOK = new Button(shell, SWT.CHECK);
- wNoOK.setText(STRING_SHOW_SUCESSFUL);
- FormData fd = new FormData();
- fd.left = new FormAttachment(0, 0);
- fd.top = new FormAttachment(wFields, margin);
- wNoOK.setLayoutData(fd);
- wNoOK.addListener(SWT.Selection, e -> noOK());
-
+
// Detect X or ALT-F4 or something that kills this window...
shell.addListener(SWT.Close, e -> close());