This is an automated email from the ASF dual-hosted git repository. nadment pushed a commit to branch HOP2043 in repository https://gitbox.apache.org/repos/asf/hop.git
commit 2bd089048077421c526a64ef2e751ba4f2179d79 Author: Nicolas Adment <[email protected]> AuthorDate: Sun Dec 11 15:39:45 2022 +0100 Fix #2043 : Align connection meta line --- .../hop/www/async/AsyncWebServiceEditor.java | 24 +++++++-------- .../hop/ui/core/database/DatabaseMetaEditor.java | 18 ++++++------ .../hop/ui/core/gui/GuiCompositeWidgets.java | 18 ++++++------ .../hop/ui/core/widget/MetaSelectionLine.java | 7 +++-- .../config/PipelineRunConfigurationEditor.java | 26 ++++++++--------- .../config/WorkflowRunConfigurationEditor.java | 30 +++++++++---------- .../hop/ui/www/service/WebServiceEditor.java | 34 +++++++++++----------- 7 files changed, 79 insertions(+), 78 deletions(-) diff --git a/plugins/misc/async/src/main/java/org/apache/hop/www/async/AsyncWebServiceEditor.java b/plugins/misc/async/src/main/java/org/apache/hop/www/async/AsyncWebServiceEditor.java index dadc895e1f..9ad4bc595f 100644 --- a/plugins/misc/async/src/main/java/org/apache/hop/www/async/AsyncWebServiceEditor.java +++ b/plugins/misc/async/src/main/java/org/apache/hop/www/async/AsyncWebServiceEditor.java @@ -88,13 +88,13 @@ public class AsyncWebServiceEditor extends MetadataEditor<AsyncWebService> { FormData fdlName = new FormData(); fdlName.top = new FormAttachment(wIcon, margin); fdlName.left = new FormAttachment(0, 0); - fdlName.right = new FormAttachment(middle, 0); + fdlName.right = new FormAttachment(middle, -margin); wlName.setLayoutData(fdlName); wName = new Text(parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wName); FormData fdName = new FormData(); fdName.top = new FormAttachment(wlName, 0, SWT.CENTER); - fdName.left = new FormAttachment(middle, margin); + fdName.left = new FormAttachment(middle, 0); fdName.right = new FormAttachment(100, 0); wName.setLayoutData(fdName); @@ -113,13 +113,13 @@ public class AsyncWebServiceEditor extends MetadataEditor<AsyncWebService> { wlEnabled.setText("Enabled?"); FormData fdlEnabled = new FormData(); fdlEnabled.left = new FormAttachment(0, 0); - fdlEnabled.right = new FormAttachment(middle, 0); + fdlEnabled.right = new FormAttachment(middle, -margin); fdlEnabled.top = new FormAttachment(lastControl, margin); wlEnabled.setLayoutData(fdlEnabled); wEnabled = new Button(parent, SWT.CHECK | SWT.LEFT); PropsUi.setLook(wEnabled); FormData fdEnabled = new FormData(); - fdEnabled.left = new FormAttachment(middle, margin); + fdEnabled.left = new FormAttachment(middle, 0); fdEnabled.right = new FormAttachment(100, 0); fdEnabled.top = new FormAttachment(wlEnabled, 0, SWT.CENTER); wEnabled.setLayoutData(fdEnabled); @@ -130,7 +130,7 @@ public class AsyncWebServiceEditor extends MetadataEditor<AsyncWebService> { wlFilename.setText("Filename"); FormData fdlFilename = new FormData(); fdlFilename.left = new FormAttachment(0, 0); - fdlFilename.right = new FormAttachment(middle, 0); + fdlFilename.right = new FormAttachment(middle, -margin); fdlFilename.top = new FormAttachment(lastControl, 2 * margin); wlFilename.setLayoutData(fdlFilename); @@ -164,7 +164,7 @@ public class AsyncWebServiceEditor extends MetadataEditor<AsyncWebService> { wFilename = new TextVar(manager.getVariables(), parent, SWT.SINGLE | SWT.BORDER | SWT.LEFT); PropsUi.setLook(wFilename); FormData fdFilename = new FormData(); - fdFilename.left = new FormAttachment(middle, margin); + fdFilename.left = new FormAttachment(middle, 0); fdFilename.right = new FormAttachment(wboFilename, -margin); fdFilename.top = new FormAttachment(wlFilename, 0, SWT.CENTER); wFilename.setLayoutData(fdFilename); @@ -194,13 +194,13 @@ public class AsyncWebServiceEditor extends MetadataEditor<AsyncWebService> { wlStatusVars.setText("Status variables (, separated)"); FormData fdlStatusVars = new FormData(); fdlStatusVars.left = new FormAttachment(0, 0); - fdlStatusVars.right = new FormAttachment(middle, 0); + fdlStatusVars.right = new FormAttachment(middle, -margin); fdlStatusVars.top = new FormAttachment(lastControl, 2 * margin); wlStatusVars.setLayoutData(fdlStatusVars); - wStatusVars = new TextVar(manager.getVariables(), parent, SWT.CHECK | SWT.LEFT); + wStatusVars = new TextVar(manager.getVariables(), parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wStatusVars); FormData fdStatusVars = new FormData(); - fdStatusVars.left = new FormAttachment(middle, margin); + fdStatusVars.left = new FormAttachment(middle, 0); fdStatusVars.right = new FormAttachment(100, 0); fdStatusVars.top = new FormAttachment(wlStatusVars, 0, SWT.CENTER); wStatusVars.setLayoutData(fdStatusVars); @@ -213,13 +213,13 @@ public class AsyncWebServiceEditor extends MetadataEditor<AsyncWebService> { wlContentVar.setText("Content variable"); FormData fdlContentVar = new FormData(); fdlContentVar.left = new FormAttachment(0, 0); - fdlContentVar.right = new FormAttachment(middle, 0); + fdlContentVar.right = new FormAttachment(middle, -margin); fdlContentVar.top = new FormAttachment(lastControl, 2 * margin); wlContentVar.setLayoutData(fdlContentVar); - wContentVar = new TextVar(manager.getVariables(), parent, SWT.CHECK | SWT.LEFT); + wContentVar = new TextVar(manager.getVariables(), parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wContentVar); FormData fdContentVar = new FormData(); - fdContentVar.left = new FormAttachment(middle, margin); + fdContentVar.left = new FormAttachment(middle, 0); fdContentVar.right = new FormAttachment(100, 0); fdContentVar.top = new FormAttachment(wlContentVar, 0, SWT.CENTER); wContentVar.setLayoutData(fdContentVar); diff --git a/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java b/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java index cd3942627f..b9cee7a216 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java @@ -157,7 +157,7 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { // middle = props.getMiddlePct(); - margin = props.getMargin(); + margin = PropsUi.getMargin(); Label wIcon = new Label(parent, SWT.RIGHT); wIcon.setImage(getImage()); @@ -259,7 +259,7 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { FormData fdlConnectionType = new FormData(); fdlConnectionType.top = new FormAttachment(0, margin); fdlConnectionType.left = new FormAttachment(0, 0); // First one in the left top corner - fdlConnectionType.right = new FormAttachment(middle, 0); + fdlConnectionType.right = new FormAttachment(middle, -margin); wlConnectionType.setLayoutData(fdlConnectionType); ToolBar wToolBar = new ToolBar(wGeneralComp, SWT.FLAT | SWT.HORIZONTAL); @@ -279,7 +279,7 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { PropsUi.setLook(wConnectionType); FormData fdConnectionType = new FormData(); fdConnectionType.top = new FormAttachment(wlConnectionType, 0, SWT.CENTER); - fdConnectionType.left = new FormAttachment(middle, margin); // To the right of the label + fdConnectionType.left = new FormAttachment(middle, 0); // To the right of the label fdConnectionType.right = new FormAttachment(wToolBar, -margin); wConnectionType.setLayoutData(fdConnectionType); Control lastControl = wConnectionType; @@ -292,14 +292,14 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { FormData fdlUsername = new FormData(); fdlUsername.top = new FormAttachment(lastControl, margin * 2); // At the bottom of this tab fdlUsername.left = new FormAttachment(0, 0); // First one in the left top corner - fdlUsername.right = new FormAttachment(middle, 0); + fdlUsername.right = new FormAttachment(middle, -margin); wlUsername.setLayoutData(fdlUsername); wUsername = new TextVar(manager.getVariables(), wGeneralComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wUsername); FormData fdUsername = new FormData(); fdUsername.top = new FormAttachment(wlUsername, 0, SWT.CENTER); - fdUsername.left = new FormAttachment(middle, margin); // To the right of the label + fdUsername.left = new FormAttachment(middle, 0); // To the right of the label fdUsername.right = new FormAttachment(100, 0); wUsername.setLayoutData(fdUsername); lastControl = wUsername; @@ -312,7 +312,7 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { FormData fdlPassword = new FormData(); fdlPassword.top = new FormAttachment(lastControl, margin * 2); // At the bottom of this tab fdlPassword.left = new FormAttachment(0, 0); // First one in the left top corner - fdlPassword.right = new FormAttachment(middle, 0); + fdlPassword.right = new FormAttachment(middle, -margin); wlPassword.setLayoutData(fdlPassword); wPassword = new TextVar(manager.getVariables(), wGeneralComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); @@ -320,7 +320,7 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { PropsUi.setLook(wPassword); FormData fdPassword = new FormData(); fdPassword.top = new FormAttachment(wlPassword, 0, SWT.CENTER); - fdPassword.left = new FormAttachment(middle, margin); // To the right of the label + fdPassword.left = new FormAttachment(middle, 0); // To the right of the label fdPassword.right = new FormAttachment(100, 0); wPassword.setLayoutData(fdPassword); lastControl = wPassword; @@ -367,14 +367,14 @@ public class DatabaseMetaEditor extends MetadataEditor<DatabaseMeta> { FormData fdlManualUrl = new FormData(); fdlManualUrl.top = new FormAttachment(lastControl, margin * 2); // At the bottom of this tab fdlManualUrl.left = new FormAttachment(0, 0); // First one in the left top corner - fdlManualUrl.right = new FormAttachment(middle, 0); + fdlManualUrl.right = new FormAttachment(middle, -margin); wlManualUrl.setLayoutData(fdlManualUrl); wManualUrl = new TextVar(manager.getVariables(), wGeneralComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wManualUrl); FormData fdManualUrl = new FormData(); fdManualUrl.top = new FormAttachment(wlManualUrl, 0, SWT.CENTER); - fdManualUrl.left = new FormAttachment(middle, margin); // To the right of the label + fdManualUrl.left = new FormAttachment(middle, 0); // To the right of the label fdManualUrl.right = new FormAttachment(100, 0); wManualUrl.setLayoutData(fdManualUrl); wManualUrl.addListener(SWT.Modify, e -> enableFields()); diff --git a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiCompositeWidgets.java b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiCompositeWidgets.java index 8a9810e281..6b4fe511ac 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiCompositeWidgets.java +++ b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiCompositeWidgets.java @@ -160,11 +160,11 @@ public class GuiCompositeWidgets { FormData fdLabel = new FormData(); fdLabel.left = new FormAttachment(0, 0); if (lastControl == null) { - fdLabel.top = new FormAttachment(0, props.getMargin()); + fdLabel.top = new FormAttachment(0, PropsUi.getMargin()); } else { - fdLabel.top = new FormAttachment(lastControl, props.getMargin() + extraVerticalMargin); + fdLabel.top = new FormAttachment(lastControl, PropsUi.getMargin() + extraVerticalMargin); } - fdLabel.right = new FormAttachment(props.getMiddlePct(), 0); + fdLabel.right = new FormAttachment(props.getMiddlePct(), -PropsUi.getMargin()); label.setLayoutData(fdLabel); labelsMap.put(guiElements.getId(), label); } @@ -269,7 +269,7 @@ public class GuiCompositeWidgets { guiElements.getLabel(), guiElements.getToolTip(), false, - false); + true); widgetsMap.put(guiElements.getId(), metaSelectionLine); @@ -573,7 +573,7 @@ public class GuiCompositeWidgets { fdControl.top = new FormAttachment(label, 0, SWT.CENTER); } else { if (lastControl != null) { - fdControl.top = new FormAttachment(lastControl, props.getMargin()); + fdControl.top = new FormAttachment(lastControl, PropsUi.getMargin()); } else { fdControl.top = new FormAttachment(0, 0); } @@ -585,7 +585,7 @@ public class GuiCompositeWidgets { PropsUi props, Control lastControl, Label label, Control control, Control rightControl) { FormData fdControl = new FormData(); if (label != null) { - fdControl.left = new FormAttachment(props.getMiddlePct(), props.getMargin()); + fdControl.left = new FormAttachment(props.getMiddlePct(), 0); if (rightControl == null) { fdControl.right = new FormAttachment(100, 0); } else { @@ -593,14 +593,14 @@ public class GuiCompositeWidgets { } fdControl.top = new FormAttachment(label, 0, SWT.CENTER); } else { - fdControl.left = new FormAttachment(props.getMiddlePct(), props.getMargin()); + fdControl.left = new FormAttachment(props.getMiddlePct(), 0); if (rightControl == null) { fdControl.right = new FormAttachment(100, 0); } else { fdControl.right = new FormAttachment(rightControl, -5); } if (lastControl != null) { - fdControl.top = new FormAttachment(lastControl, props.getMargin()); + fdControl.top = new FormAttachment(lastControl, PropsUi.getMargin()); } else { fdControl.top = new FormAttachment(0, 0); } @@ -613,7 +613,7 @@ public class GuiCompositeWidgets { fdControl.left = new FormAttachment(0, 0); fdControl.right = new FormAttachment(100, 0); if (lastControl != null) { - fdControl.top = new FormAttachment(lastControl, props.getMargin()); + fdControl.top = new FormAttachment(lastControl, PropsUi.getMargin()); } else { fdControl.top = new FormAttachment(0, 0); } diff --git a/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java b/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java index 7cadaba4c3..6603fea160 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java +++ b/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java @@ -192,8 +192,9 @@ public class MetaSelectionLine<T extends IHopMetadata> extends Composite { fdToolBar.right = new FormAttachment(100, 0); fdToolBar.top = new FormAttachment(0, 0); wToolBar.setLayoutData(fdToolBar); - wToolBar.setBackground(GuiResource.getInstance().getColorBackground()); - wToolBar.setForeground(GuiResource.getInstance().getColorBackground()); + //wToolBar.setBackgroundMode(SWT.INHERIT_DEFAULT); + wToolBar.setBackground(GuiResource.getInstance().getColorGreen()); + //wToolBar.setForeground(GuiResource.getInstance().getColorBackground()); // Add more toolbar items from plugins. // @@ -211,7 +212,7 @@ public class MetaSelectionLine<T extends IHopMetadata> extends Composite { if (leftAlignedLabel) { fdCombo.left = new FormAttachment(wLabel, margin, SWT.RIGHT); } else { - fdCombo.left = new FormAttachment(middle, leftAlignedLabel ? 0 : margin); + fdCombo.left = new FormAttachment(middle, 0); } fdCombo.right = new FormAttachment(wToolBar, -margin); fdCombo.top = new FormAttachment(wLabel, 0, SWT.CENTER); diff --git a/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java b/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java index f04575c6c4..d580c903e4 100644 --- a/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java @@ -180,15 +180,15 @@ public class PipelineRunConfigurationEditor extends MetadataEditor<PipelineRunCo PropsUi.setLook(wlName); wlName.setText(BaseMessages.getString(PKG, "PipelineRunConfigurationDialog.label.name")); FormData fdlName = new FormData(); - fdlName.top = new FormAttachment(0, margin * 2); + fdlName.top = new FormAttachment(0, margin); fdlName.left = new FormAttachment(0, 0); // First one in the left top corner - fdlName.right = new FormAttachment(middle, 0); + fdlName.right = new FormAttachment(middle, -margin); wlName.setLayoutData(fdlName); wName = new Text(wMainComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wName); FormData fdName = new FormData(); fdName.top = new FormAttachment(wlName, 0, SWT.CENTER); - fdName.left = new FormAttachment(middle, margin); // To the right of the label + fdName.left = new FormAttachment(middle, 0); // To the right of the label fdName.right = new FormAttachment(100, 0); wName.setLayoutData(fdName); Control lastControl = wName; @@ -198,15 +198,15 @@ public class PipelineRunConfigurationEditor extends MetadataEditor<PipelineRunCo wlDescription.setText( BaseMessages.getString(PKG, "PipelineRunConfigurationDialog.label.Description")); FormData fdlDescription = new FormData(); - fdlDescription.top = new FormAttachment(lastControl, margin * 2); + fdlDescription.top = new FormAttachment(lastControl, margin); fdlDescription.left = new FormAttachment(0, 0); // First one in the left top corner - fdlDescription.right = new FormAttachment(middle, 0); + fdlDescription.right = new FormAttachment(middle, -margin); wlDescription.setLayoutData(fdlDescription); wDescription = new Text(wMainComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wDescription); FormData fdDescription = new FormData(); fdDescription.top = new FormAttachment(wlDescription, 0, SWT.CENTER); - fdDescription.left = new FormAttachment(middle, margin); // To the right of the label + fdDescription.left = new FormAttachment(middle, 0); // To the right of the label fdDescription.right = new FormAttachment(100, 0); wDescription.setLayoutData(fdDescription); lastControl = wDescription; @@ -216,15 +216,15 @@ public class PipelineRunConfigurationEditor extends MetadataEditor<PipelineRunCo wlDefault.setText( BaseMessages.getString(PKG, "PipelineRunConfigurationDialog.label.Default")); FormData fdlDefault = new FormData(); - fdlDefault.top = new FormAttachment(lastControl, margin * 2); + fdlDefault.top = new FormAttachment(lastControl, margin); fdlDefault.left = new FormAttachment(0, 0); // First one in the left top corner - fdlDefault.right = new FormAttachment(middle, 0); + fdlDefault.right = new FormAttachment(middle, -margin); wlDefault.setLayoutData(fdlDefault); wDefault = new Button(wMainComp, SWT.CHECK | SWT.LEFT ); PropsUi.setLook(wDefault); FormData fdDefault = new FormData(); fdDefault.top = new FormAttachment(wlDefault, 0, SWT.CENTER); - fdDefault.left = new FormAttachment(middle, margin); // To the right of the label + fdDefault.left = new FormAttachment(middle, 0); // To the right of the label fdDefault.right = new FormAttachment(100, 0); wDefault.setLayoutData(fdDefault); lastControl = wlDefault; @@ -244,7 +244,7 @@ public class PipelineRunConfigurationEditor extends MetadataEditor<PipelineRunCo PKG, "PipelineRunConfigurationDialog.toolTip.ExecutionInfoLocation")); PropsUi.setLook(wExecutionInfoLocation); FormData fdExecutionInfoLocation = new FormData(); - fdExecutionInfoLocation.top = new FormAttachment(lastControl, 2*margin); + fdExecutionInfoLocation.top = new FormAttachment(lastControl, margin); fdExecutionInfoLocation.left = new FormAttachment(0, 0); // To the right of the label fdExecutionInfoLocation.right = new FormAttachment(100, 0); wExecutionInfoLocation.setLayoutData(fdExecutionInfoLocation); @@ -275,9 +275,9 @@ public class PipelineRunConfigurationEditor extends MetadataEditor<PipelineRunCo wlPluginType.setText( BaseMessages.getString(PKG, "PipelineRunConfigurationDialog.label.EngineType")); FormData fdlPluginType = new FormData(); - fdlPluginType.top = new FormAttachment(lastControl, margin * 2); + fdlPluginType.top = new FormAttachment(lastControl, margin); fdlPluginType.left = new FormAttachment(0, 0); // First one in the left top corner - fdlPluginType.right = new FormAttachment(middle, 0); + fdlPluginType.right = new FormAttachment(middle, -margin); wlPluginType.setLayoutData(fdlPluginType); wPluginType = new ComboVar(manager.getVariables(), wMainComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); @@ -285,7 +285,7 @@ public class PipelineRunConfigurationEditor extends MetadataEditor<PipelineRunCo wPluginType.setItems(getPluginTypes()); FormData fdPluginType = new FormData(); fdPluginType.top = new FormAttachment(wlPluginType, 0, SWT.CENTER); - fdPluginType.left = new FormAttachment(middle, margin); // To the right of the label + fdPluginType.left = new FormAttachment(middle, 0); // To the right of the label fdPluginType.right = new FormAttachment(100, 0); wPluginType.setLayoutData(fdPluginType); lastControl = wPluginType; diff --git a/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java b/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java index e07fdfc59e..4e70976cf4 100644 --- a/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java @@ -135,7 +135,7 @@ public class WorkflowRunConfigurationEditor extends MetadataEditor<WorkflowRunCo // int middle = props.getMiddlePct(); - int margin = props.getMargin(); + int margin = PropsUi.getMargin(); // The generic widgets: name, description and workflow engine type // @@ -145,15 +145,15 @@ public class WorkflowRunConfigurationEditor extends MetadataEditor<WorkflowRunCo PropsUi.setLook(wlName); wlName.setText(BaseMessages.getString(PKG, "WorkflowRunConfigurationDialog.label.name")); FormData fdlName = new FormData(); - fdlName.top = new FormAttachment(0, margin * 2); + fdlName.top = new FormAttachment(0, margin); fdlName.left = new FormAttachment(0, 0); // First one in the left top corner - fdlName.right = new FormAttachment(middle, 0); + fdlName.right = new FormAttachment(middle, -margin); wlName.setLayoutData(fdlName); wName = new Text(parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wName); FormData fdName = new FormData(); fdName.top = new FormAttachment(wlName, 0, SWT.CENTER); - fdName.left = new FormAttachment(middle, margin); // To the right of the label + fdName.left = new FormAttachment(middle, 0); // To the right of the label fdName.right = new FormAttachment(100, 0); wName.setLayoutData(fdName); Control lastControl = wName; @@ -163,15 +163,15 @@ public class WorkflowRunConfigurationEditor extends MetadataEditor<WorkflowRunCo wlDescription.setText( BaseMessages.getString(PKG, "WorkflowRunConfigurationDialog.label.Description")); FormData fdlDescription = new FormData(); - fdlDescription.top = new FormAttachment(lastControl, margin * 2); + fdlDescription.top = new FormAttachment(lastControl, margin); fdlDescription.left = new FormAttachment(0, 0); // First one in the left top corner - fdlDescription.right = new FormAttachment(middle, 0); + fdlDescription.right = new FormAttachment(middle, -margin); wlDescription.setLayoutData(fdlDescription); wDescription = new Text(parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wDescription); FormData fdDescription = new FormData(); fdDescription.top = new FormAttachment(wlDescription, 0, SWT.CENTER); - fdDescription.left = new FormAttachment(middle, margin); // To the right of the label + fdDescription.left = new FormAttachment(middle, 0); // To the right of the label fdDescription.right = new FormAttachment(100, 0); wDescription.setLayoutData(fdDescription); lastControl = wDescription; @@ -181,15 +181,15 @@ public class WorkflowRunConfigurationEditor extends MetadataEditor<WorkflowRunCo wlDefault.setText( BaseMessages.getString(PKG, "WorkflowRunConfigurationDialog.label.Default")); FormData fdlDefault = new FormData(); - fdlDefault.top = new FormAttachment(lastControl, margin * 2); + fdlDefault.top = new FormAttachment(lastControl, margin); fdlDefault.left = new FormAttachment(0, 0); // First one in the left top corner - fdlDefault.right = new FormAttachment(middle, 0); + fdlDefault.right = new FormAttachment(middle, -margin); wlDefault.setLayoutData(fdlDefault); wDefault = new Button(parent, SWT.CHECK | SWT.LEFT ); PropsUi.setLook(wDefault); FormData fdDefault = new FormData(); fdDefault.top = new FormAttachment(wlDefault, 0, SWT.CENTER); - fdDefault.left = new FormAttachment(middle, margin); // To the right of the label + fdDefault.left = new FormAttachment(middle, 0); // To the right of the label fdDefault.right = new FormAttachment(100, 0); wDefault.setLayoutData(fdDefault); lastControl = wlDefault; @@ -206,10 +206,10 @@ public class WorkflowRunConfigurationEditor extends MetadataEditor<WorkflowRunCo BaseMessages.getString( PKG, "WorkflowRunConfigurationDialog.label.ExecutionInfoLocation"), BaseMessages.getString( - PKG, "WorkflowRunConfigurationDialog.toolTip.ExecutionInfoLocation")); + PKG, "WorkflowRunConfigurationDialog.toolTip.ExecutionInfoLocation"), false, true); PropsUi.setLook(wExecutionInfoLocation); FormData fdExecutionInfoLocation = new FormData(); - fdExecutionInfoLocation.top = new FormAttachment(lastControl, 2*margin); + fdExecutionInfoLocation.top = new FormAttachment(lastControl, margin); fdExecutionInfoLocation.left = new FormAttachment(0, 0); // To the right of the label fdExecutionInfoLocation.right = new FormAttachment(100, 0); wExecutionInfoLocation.setLayoutData(fdExecutionInfoLocation); @@ -222,16 +222,16 @@ public class WorkflowRunConfigurationEditor extends MetadataEditor<WorkflowRunCo wlPluginType.setText( BaseMessages.getString(PKG, "WorkflowRunConfigurationDialog.label.EngineType")); FormData fdlPluginType = new FormData(); - fdlPluginType.top = new FormAttachment(lastControl, margin * 2); + fdlPluginType.top = new FormAttachment(lastControl, margin); fdlPluginType.left = new FormAttachment(0, 0); // First one in the left top corner - fdlPluginType.right = new FormAttachment(middle, 0); + fdlPluginType.right = new FormAttachment(middle, -margin); wlPluginType.setLayoutData(fdlPluginType); wPluginType = new ComboVar(manager.getVariables(), parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wPluginType); wPluginType.setItems(getPluginTypes()); FormData fdPluginType = new FormData(); fdPluginType.top = new FormAttachment(wlPluginType, 0, SWT.CENTER); - fdPluginType.left = new FormAttachment(middle, margin); // To the right of the label + fdPluginType.left = new FormAttachment(middle, 0); // To the right of the label fdPluginType.right = new FormAttachment(100, 0); wPluginType.setLayoutData(fdPluginType); lastControl = wPluginType; diff --git a/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java b/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java index 40748ecfb2..c136a19f39 100644 --- a/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/www/service/WebServiceEditor.java @@ -80,7 +80,7 @@ public class WebServiceEditor extends MetadataEditor<WebService> { PropsUi props = PropsUi.getInstance(); int middle = props.getMiddlePct(); - int margin = props.getMargin(); + int margin = PropsUi.getMargin(); Label wIcon = new Label(parent, SWT.RIGHT); wIcon.setImage(getImage()); @@ -97,13 +97,13 @@ public class WebServiceEditor extends MetadataEditor<WebService> { FormData fdlName = new FormData(); fdlName.top = new FormAttachment(wIcon, margin); fdlName.left = new FormAttachment(0, 0); - fdlName.right = new FormAttachment(middle, 0); + fdlName.right = new FormAttachment(middle, -margin); wlName.setLayoutData(fdlName); wName = new Text(parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wName); FormData fdName = new FormData(); fdName.top = new FormAttachment(wlName, 0, SWT.CENTER); - fdName.left = new FormAttachment(middle, margin); + fdName.left = new FormAttachment(middle, 0); fdName.right = new FormAttachment(100, 0); wName.setLayoutData(fdName); @@ -122,13 +122,13 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wlEnabled.setText(BaseMessages.getString(PKG, "WebServiceEditor.Enabled.Label")); FormData fdlEnabled = new FormData(); fdlEnabled.left = new FormAttachment(0, 0); - fdlEnabled.right = new FormAttachment(middle, 0); + fdlEnabled.right = new FormAttachment(middle, -margin); fdlEnabled.top = new FormAttachment(lastControl, margin); wlEnabled.setLayoutData(fdlEnabled); wEnabled = new Button(parent, SWT.CHECK | SWT.LEFT); PropsUi.setLook(wEnabled); FormData fdEnabled = new FormData(); - fdEnabled.left = new FormAttachment(middle, margin); + fdEnabled.left = new FormAttachment(middle, 0); fdEnabled.right = new FormAttachment(100, 0); fdEnabled.top = new FormAttachment(wlEnabled, 0, SWT.CENTER); wEnabled.setLayoutData(fdEnabled); @@ -139,7 +139,7 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wlFilename.setText(BaseMessages.getString(PKG, "WebServiceEditor.Filename.Label")); FormData fdlFilename = new FormData(); fdlFilename.left = new FormAttachment(0, 0); - fdlFilename.right = new FormAttachment(middle, 0); + fdlFilename.right = new FormAttachment(middle, -margin); fdlFilename.top = new FormAttachment(lastControl, 2 * margin); wlFilename.setLayoutData(fdlFilename); @@ -173,7 +173,7 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wFilename = new TextVar(manager.getVariables(), parent, SWT.SINGLE | SWT.BORDER | SWT.LEFT); PropsUi.setLook(wFilename); FormData fdFilename = new FormData(); - fdFilename.left = new FormAttachment(middle, margin); + fdFilename.left = new FormAttachment(middle, 0); fdFilename.right = new FormAttachment(wboFilename, -margin); fdFilename.top = new FormAttachment(wlFilename, 0, SWT.CENTER); wFilename.setLayoutData(fdFilename); @@ -204,13 +204,13 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wlTransform.setText(BaseMessages.getString(PKG, "WebServiceEditor.Transform.Label")); FormData fdlTransform = new FormData(); fdlTransform.left = new FormAttachment(0, 0); - fdlTransform.right = new FormAttachment(middle, 0); + fdlTransform.right = new FormAttachment(middle, -margin); fdlTransform.top = new FormAttachment(lastControl, 2 * margin); wlTransform.setLayoutData(fdlTransform); wTransform = new TextVar(manager.getVariables(), parent, SWT.SINGLE | SWT.BORDER | SWT.LEFT); PropsUi.setLook(wTransform); FormData fdTransform = new FormData(); - fdTransform.left = new FormAttachment(middle, margin); + fdTransform.left = new FormAttachment(middle, 0); fdTransform.right = new FormAttachment(100, 0); fdTransform.top = new FormAttachment(wlTransform, 0, SWT.CENTER); wTransform.setLayoutData(fdTransform); @@ -223,13 +223,13 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wlField.setText(BaseMessages.getString(PKG, "WebServiceEditor.Field.Label")); FormData fdlField = new FormData(); fdlField.left = new FormAttachment(0, 0); - fdlField.right = new FormAttachment(middle, 0); + fdlField.right = new FormAttachment(middle, -margin); fdlField.top = new FormAttachment(lastControl, 2 * margin); wlField.setLayoutData(fdlField); wField = new TextVar(manager.getVariables(), parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); PropsUi.setLook(wField); FormData fdField = new FormData(); - fdField.left = new FormAttachment(middle, margin); + fdField.left = new FormAttachment(middle, 0); fdField.right = new FormAttachment(100, 0); fdField.top = new FormAttachment(wlField, 0, SWT.CENTER); wField.setLayoutData(fdField); @@ -242,13 +242,13 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wlContentType.setText(BaseMessages.getString(PKG, "WebServiceEditor.ContentType.Label")); FormData fdlContentType = new FormData(); fdlContentType.left = new FormAttachment(0, 0); - fdlContentType.right = new FormAttachment(middle, 0); + fdlContentType.right = new FormAttachment(middle, -margin); fdlContentType.top = new FormAttachment(lastControl, 2 * margin); wlContentType.setLayoutData(fdlContentType); wContentType = new ComboVar(manager.getVariables(), parent, SWT.LEFT | SWT.BORDER); PropsUi.setLook(wContentType); FormData fdContentType = new FormData(); - fdContentType.left = new FormAttachment(middle, margin); + fdContentType.left = new FormAttachment(middle, 0); fdContentType.right = new FormAttachment(100, 0); fdContentType.top = new FormAttachment(wlContentType, 0, SWT.CENTER); wContentType.setLayoutData(fdContentType); @@ -265,13 +265,13 @@ public class WebServiceEditor extends MetadataEditor<WebService> { wlListStatus.setText(BaseMessages.getString(PKG, "WebServiceEditor.ListStatus.Label")); FormData fdlListStatus = new FormData(); fdlListStatus.left = new FormAttachment(0, 0); - fdlListStatus.right = new FormAttachment(middle, 0); + fdlListStatus.right = new FormAttachment(middle, -margin); fdlListStatus.top = new FormAttachment(lastControl, margin); wlListStatus.setLayoutData(fdlListStatus); wListStatus = new Button(parent, SWT.CHECK | SWT.LEFT); PropsUi.setLook(wListStatus); FormData fdListStatus = new FormData(); - fdListStatus.left = new FormAttachment(middle, margin); + fdListStatus.left = new FormAttachment(middle, 0); fdListStatus.right = new FormAttachment(100, 0); fdListStatus.top = new FormAttachment(wlListStatus, 0, SWT.CENTER); wListStatus.setLayoutData(fdListStatus); @@ -287,7 +287,7 @@ public class WebServiceEditor extends MetadataEditor<WebService> { BaseMessages.getString(PKG, "WebServiceEditor.BodyContentVariable.Tooltip")); FormData fdlBodyContentVariable = new FormData(); fdlBodyContentVariable.left = new FormAttachment(0, 0); - fdlBodyContentVariable.right = new FormAttachment(middle, 0); + fdlBodyContentVariable.right = new FormAttachment(middle, -margin); fdlBodyContentVariable.top = new FormAttachment(lastControl, 2 * margin); wlBodyContentVariable.setLayoutData(fdlBodyContentVariable); wBodyContentVariable = @@ -296,7 +296,7 @@ public class WebServiceEditor extends MetadataEditor<WebService> { BaseMessages.getString(PKG, "WebServiceEditor.BodyContentVariable.Tooltip")); PropsUi.setLook(wBodyContentVariable); FormData fdBodyContentVariable = new FormData(); - fdBodyContentVariable.left = new FormAttachment(middle, margin); + fdBodyContentVariable.left = new FormAttachment(middle, 0); fdBodyContentVariable.right = new FormAttachment(100, 0); fdBodyContentVariable.top = new FormAttachment(wlBodyContentVariable, 0, SWT.CENTER); wBodyContentVariable.setLayoutData(fdBodyContentVariable);
