This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new cf62271ffb issue #7188 : interface improvements (#7366)
cf62271ffb is described below

commit cf62271ffbdb4015fb1e191b09e3bee3ff7fe21c
Author: Matt Casters <[email protected]>
AuthorDate: Tue Jun 30 13:25:22 2026 +0200

    issue #7188 : interface improvements (#7366)
---
 .../pipeline/transforms/delete/DeleteDialog.java   | 169 ++++++++++++---------
 .../delete/messages/messages_en_US.properties      |   2 +
 .../delete/messages/messages_pt_BR.properties      |   2 +
 3 files changed, 105 insertions(+), 68 deletions(-)

diff --git 
a/plugins/transforms/delete/src/main/java/org/apache/hop/pipeline/transforms/delete/DeleteDialog.java
 
b/plugins/transforms/delete/src/main/java/org/apache/hop/pipeline/transforms/delete/DeleteDialog.java
index cc0c442782..cea01f0aa5 100644
--- 
a/plugins/transforms/delete/src/main/java/org/apache/hop/pipeline/transforms/delete/DeleteDialog.java
+++ 
b/plugins/transforms/delete/src/main/java/org/apache/hop/pipeline/transforms/delete/DeleteDialog.java
@@ -22,6 +22,7 @@ import java.util.Collections;
 import java.util.List;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.hop.core.Const;
+import org.apache.hop.core.Props;
 import org.apache.hop.core.database.Database;
 import org.apache.hop.core.database.DatabaseMeta;
 import org.apache.hop.core.exception.HopException;
@@ -32,12 +33,14 @@ import org.apache.hop.i18n.BaseMessages;
 import org.apache.hop.pipeline.PipelineMeta;
 import org.apache.hop.pipeline.transform.TransformMeta;
 import org.apache.hop.ui.core.ConstUi;
+import org.apache.hop.ui.core.FormDataBuilder;
 import org.apache.hop.ui.core.PropsUi;
 import org.apache.hop.ui.core.database.dialog.DatabaseExplorerDialog;
 import org.apache.hop.ui.core.dialog.BaseDialog;
 import org.apache.hop.ui.core.dialog.EnterSelectionDialog;
 import org.apache.hop.ui.core.dialog.ErrorDialog;
 import org.apache.hop.ui.core.dialog.MessageBox;
+import org.apache.hop.ui.core.gui.GuiResource;
 import org.apache.hop.ui.core.widget.ColumnInfo;
 import org.apache.hop.ui.core.widget.MetaSelectionLine;
 import org.apache.hop.ui.core.widget.TableView;
@@ -45,6 +48,8 @@ import org.apache.hop.ui.core.widget.TextVar;
 import org.apache.hop.ui.pipeline.transform.BaseTransformDialog;
 import org.apache.hop.ui.pipeline.transform.ITableItemInsertListener;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -52,6 +57,7 @@ import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TableItem;
@@ -108,13 +114,72 @@ public class DeleteDialog extends BaseTransformDialog {
         };
     changed = input.hasChanged();
 
+    CTabFolder wTabFolder = new CTabFolder(shell, SWT.BORDER);
+    PropsUi.setLook(wTabFolder, Props.WIDGET_STYLE_TAB);
+
+    addGeneralTab(wTabFolder, lsMod, lsTableMod, lsSelection);
+    addKeysTab(wTabFolder, lsMod);
+
+    wTabFolder.setLayoutData(
+        FormDataBuilder.builder()
+            .left()
+            .top(wSpacer, margin)
+            .right()
+            .bottom(wOk, -margin)
+            .result());
+    wTabFolder.setSelection(0);
+
+    //
+    // Search the fields in the background
+    //
+
+    final Runnable runnable =
+        () -> {
+          TransformMeta transformMeta = 
pipelineMeta.findTransform(transformName);
+          if (transformMeta != null) {
+            try {
+              IRowMeta row = pipelineMeta.getPrevTransformFields(variables, 
transformMeta);
+
+              // Remember these fields...
+              for (int i = 0; i < row.size(); i++) {
+                inputFields.add(row.getValueMeta(i).getName());
+              }
+              setComboBoxes();
+            } catch (HopException e) {
+              logError(BaseMessages.getString(PKG, 
"System.Dialog.GetFieldsFailed.Message"));
+            }
+          }
+        };
+    new Thread(runnable).start();
+
+    getData();
+    setTableFieldCombo();
+    setFlags();
+    focusTransformName();
+    BaseDialog.defaultShellHandling(shell, c -> ok(), c -> cancel());
+
+    return transformName;
+  }
+
+  private void addGeneralTab(
+      CTabFolder wTabFolder,
+      ModifyListener lsMod,
+      ModifyListener lsTableMod,
+      SelectionListener lsSelection) {
+    CTabItem wGeneralTab = new CTabItem(wTabFolder, SWT.NONE);
+    wGeneralTab.setFont(GuiResource.getInstance().getFontDefault());
+    wGeneralTab.setText(BaseMessages.getString(PKG, 
"DeleteDialog.GeneralTab.Title"));
+
+    Composite composite = new Composite(wTabFolder, SWT.NONE);
+    composite.setLayout(props.createFormLayout());
+    PropsUi.setLook(composite);
+
     // Connection line
-    wConnection = addConnectionLine(shell, wSpacer, input.getConnection(), 
lsMod);
-    wConnection.addModifyListener(lsMod);
+    wConnection = addConnectionLine(composite, null, input.getConnection(), 
lsMod);
     wConnection.addSelectionListener(lsSelection);
 
     // Schema line...
-    Label wlSchema = new Label(shell, SWT.RIGHT);
+    Label wlSchema = new Label(composite, SWT.RIGHT);
     wlSchema.setText(BaseMessages.getString(PKG, 
"DeleteDialog.TargetSchema.Label"));
     PropsUi.setLook(wlSchema);
     FormData fdlSchema = new FormData();
@@ -123,15 +188,16 @@ public class DeleteDialog extends BaseTransformDialog {
     fdlSchema.top = new FormAttachment(wConnection, margin);
     wlSchema.setLayoutData(fdlSchema);
 
-    Button wbSchema = new Button(shell, SWT.PUSH | SWT.CENTER);
+    Button wbSchema = new Button(composite, SWT.PUSH | SWT.CENTER);
     PropsUi.setLook(wbSchema);
     wbSchema.setText(BaseMessages.getString(PKG, "System.Button.Browse"));
     FormData fdbSchema = new FormData();
     fdbSchema.top = new FormAttachment(wConnection, margin);
     fdbSchema.right = new FormAttachment(100, 0);
     wbSchema.setLayoutData(fdbSchema);
+    wbSchema.addListener(SWT.Selection, e -> getSchemaNames());
 
-    wSchema = new TextVar(variables, shell, SWT.SINGLE | SWT.LEFT | 
SWT.BORDER);
+    wSchema = new TextVar(variables, composite, SWT.SINGLE | SWT.LEFT | 
SWT.BORDER);
     PropsUi.setLook(wSchema);
     wSchema.addModifyListener(lsTableMod);
     FormData fdSchema = new FormData();
@@ -141,7 +207,7 @@ public class DeleteDialog extends BaseTransformDialog {
     wSchema.setLayoutData(fdSchema);
 
     // Table line...
-    Label wlTable = new Label(shell, SWT.RIGHT);
+    Label wlTable = new Label(composite, SWT.RIGHT);
     wlTable.setText(BaseMessages.getString(PKG, 
"DeleteDialog.TargetTable.Label"));
     PropsUi.setLook(wlTable);
     FormData fdlTable = new FormData();
@@ -150,15 +216,16 @@ public class DeleteDialog extends BaseTransformDialog {
     fdlTable.top = new FormAttachment(wbSchema, margin);
     wlTable.setLayoutData(fdlTable);
 
-    Button wbTable = new Button(shell, SWT.PUSH | SWT.CENTER);
+    Button wbTable = new Button(composite, SWT.PUSH | SWT.CENTER);
     PropsUi.setLook(wbTable);
     wbTable.setText(BaseMessages.getString(PKG, "DeleteDialog.Browse.Button"));
     FormData fdbTable = new FormData();
     fdbTable.right = new FormAttachment(100, 0);
     fdbTable.top = new FormAttachment(wbSchema, margin);
     wbTable.setLayoutData(fdbTable);
+    wbTable.addListener(SWT.Selection, e -> getTableName());
 
-    wTable = new TextVar(variables, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
+    wTable = new TextVar(variables, composite, SWT.SINGLE | SWT.LEFT | 
SWT.BORDER);
     PropsUi.setLook(wTable);
     wTable.addModifyListener(lsTableMod);
     FormData fdTable = new FormData();
@@ -168,7 +235,7 @@ public class DeleteDialog extends BaseTransformDialog {
     wTable.setLayoutData(fdTable);
 
     // Commit line
-    Label wlCommit = new Label(shell, SWT.RIGHT);
+    Label wlCommit = new Label(composite, SWT.RIGHT);
     wlCommit.setText(BaseMessages.getString(PKG, "DeleteDialog.Commit.Label"));
     PropsUi.setLook(wlCommit);
     FormData fdlCommit = new FormData();
@@ -176,7 +243,7 @@ public class DeleteDialog extends BaseTransformDialog {
     fdlCommit.top = new FormAttachment(wTable, margin);
     fdlCommit.right = new FormAttachment(middle, -margin);
     wlCommit.setLayoutData(fdlCommit);
-    wCommit = new TextVar(variables, shell, SWT.SINGLE | SWT.LEFT | 
SWT.BORDER);
+    wCommit = new TextVar(variables, composite, SWT.SINGLE | SWT.LEFT | 
SWT.BORDER);
     PropsUi.setLook(wCommit);
     wCommit.addModifyListener(lsMod);
     FormData fdCommit = new FormData();
@@ -186,7 +253,7 @@ public class DeleteDialog extends BaseTransformDialog {
     wCommit.setLayoutData(fdCommit);
 
     // Batch delete
-    Label wlBatch = new Label(shell, SWT.RIGHT);
+    Label wlBatch = new Label(composite, SWT.RIGHT);
     wlBatch.setText(BaseMessages.getString(PKG, "DeleteDialog.Batch.Label"));
     PropsUi.setLook(wlBatch);
     FormData fdlBatch = new FormData();
@@ -194,7 +261,7 @@ public class DeleteDialog extends BaseTransformDialog {
     fdlBatch.top = new FormAttachment(wCommit, margin);
     fdlBatch.right = new FormAttachment(middle, -margin);
     wlBatch.setLayoutData(fdlBatch);
-    wBatch = new Button(shell, SWT.CHECK);
+    wBatch = new Button(composite, SWT.CHECK);
     PropsUi.setLook(wBatch);
     FormData fdBatch = new FormData();
     fdBatch.left = new FormAttachment(middle, 0);
@@ -210,12 +277,25 @@ public class DeleteDialog extends BaseTransformDialog {
           }
         });
 
-    Label wlKey = new Label(shell, SWT.NONE);
+    wGeneralTab.setControl(composite);
+  }
+
+  private void addKeysTab(CTabFolder wTabFolder, ModifyListener lsMod) {
+    Composite composite = new Composite(wTabFolder, SWT.NONE);
+    composite.setLayout(props.createFormLayout());
+    PropsUi.setLook(composite);
+
+    CTabItem tabItem = new CTabItem(wTabFolder, SWT.NONE);
+    tabItem.setFont(GuiResource.getInstance().getFontDefault());
+    tabItem.setText(BaseMessages.getString(PKG, "DeleteDialog.KeysTab.Title"));
+    tabItem.setControl(composite);
+
+    Label wlKey = new Label(composite, SWT.NONE);
     wlKey.setText(BaseMessages.getString(PKG, "DeleteDialog.Key.Label"));
     PropsUi.setLook(wlKey);
     FormData fdlKey = new FormData();
     fdlKey.left = new FormAttachment(0, 0);
-    fdlKey.top = new FormAttachment(wBatch, margin);
+    fdlKey.top = new FormAttachment(0, 0);
     wlKey.setLayoutData(fdlKey);
 
     int nrKeyCols = 4;
@@ -253,73 +333,26 @@ public class DeleteDialog extends BaseTransformDialog {
     wKey =
         new TableView(
             variables,
-            shell,
+            composite,
             SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | 
SWT.H_SCROLL,
             ciKey,
             nrKeyRows,
             lsMod,
             props);
 
-    wGet = new Button(shell, SWT.PUSH);
+    wGet = new Button(composite, SWT.PUSH);
     wGet.setText(BaseMessages.getString(PKG, "DeleteDialog.GetFields.Button"));
     wGet.addListener(SWT.Selection, e -> get());
-    fdGet = new FormData();
-    fdGet.right = new FormAttachment(100, 0);
-    fdGet.top = new FormAttachment(wlKey, margin);
-    wGet.setLayoutData(fdGet);
+    PropsUi.setLook(wGet);
+
+    setButtonPositions(new Button[] {wGet}, margin, null);
 
     FormData fdKey = new FormData();
     fdKey.left = new FormAttachment(0, 0);
     fdKey.top = new FormAttachment(wlKey, margin);
-    fdKey.right = new FormAttachment(wGet, -margin);
-    fdKey.bottom = new FormAttachment(100, -50);
+    fdKey.right = new FormAttachment(100, 0);
+    fdKey.bottom = new FormAttachment(wGet, -margin);
     wKey.setLayoutData(fdKey);
-
-    //
-    // Search the fields in the background
-    //
-
-    final Runnable runnable =
-        () -> {
-          TransformMeta transformMeta = 
pipelineMeta.findTransform(transformName);
-          if (transformMeta != null) {
-            try {
-              IRowMeta row = pipelineMeta.getPrevTransformFields(variables, 
transformMeta);
-
-              // Remember these fields...
-              for (int i = 0; i < row.size(); i++) {
-                inputFields.add(row.getValueMeta(i).getName());
-              }
-              setComboBoxes();
-            } catch (HopException e) {
-              logError(BaseMessages.getString(PKG, 
"System.Dialog.GetFieldsFailed.Message"));
-            }
-          }
-        };
-    new Thread(runnable).start();
-
-    wbSchema.addSelectionListener(
-        new SelectionAdapter() {
-          @Override
-          public void widgetSelected(SelectionEvent e) {
-            getSchemaNames();
-          }
-        });
-    wbTable.addSelectionListener(
-        new SelectionAdapter() {
-          @Override
-          public void widgetSelected(SelectionEvent e) {
-            getTableName();
-          }
-        });
-
-    getData();
-    setTableFieldCombo();
-    setFlags();
-    focusTransformName();
-    BaseDialog.defaultShellHandling(shell, c -> ok(), c -> cancel());
-
-    return transformName;
   }
 
   protected void setComboBoxes() {
diff --git 
a/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_en_US.properties
 
b/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_en_US.properties
index 40af50f72a..353d8ad091 100644
--- 
a/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_en_US.properties
+++ 
b/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_en_US.properties
@@ -51,6 +51,8 @@ DeleteDialog.Shell.Title=Delete
 DeleteDialog.TargetSchema.Label=Target schema
 DeleteDialog.TargetTable.Label=Target table
 DeleteDialog.TransformName.Label=Transform name
+DeleteDialog.GeneralTab.Title=General
+DeleteDialog.KeysTab.Title=Lookup keys
 DeleteMeta.CheckResult.AllFieldsFound=All fields found in the input stream.
 DeleteMeta.CheckResult.ConnectedTransformSuccessfully=Transform is connected 
to previous one, receiving {0} fields
 DeleteMeta.CheckResult.CouldNotReadTableInfo=Couldn''t read the table info, 
please check the table-name & permissions.
diff --git 
a/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_pt_BR.properties
 
b/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_pt_BR.properties
index 5813bc50a4..5b9e97e716 100644
--- 
a/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_pt_BR.properties
+++ 
b/plugins/transforms/delete/src/main/resources/org/apache/hop/pipeline/transforms/delete/messages/messages_pt_BR.properties
@@ -53,6 +53,8 @@ DeleteDialog.Shell.Title=Apagar
 DeleteDialog.TargetSchema.Label=Esquema alvo
 DeleteDialog.TargetTable.Label=Tabela de destino
 DeleteDialog.TransformName.Label=Nome do transform
+DeleteDialog.GeneralTab.Title=Geral
+DeleteDialog.KeysTab.Title=Chaves de busca
 DeleteMeta.CheckResult.AllFieldsFound=Todos os campos encontrados no fluxo de 
entrada.
 DeleteMeta.CheckResult.ConnectedTransformSuccessfully=Transforma\u00E7\u00E3o 
conectada \u00E0 anterior, recebendo {0} campos
 DeleteMeta.CheckResult.CouldNotReadTableInfo=N\u00E3o foi poss\u00EDvel ler a 
informa\u00E7\u00E3o da tabela, por favor, verifique o nome da tabela e as 
permiss\u00F5es.

Reply via email to