提交 d5efa37a 编写于 作者: S Serge Rider

Stream consumer settings page layout fix


Former-commit-id: 9aa7c9a0
上级 289ff753
......@@ -21,6 +21,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
......@@ -74,7 +75,9 @@ public class StreamConsumerPageSettings extends ActiveWizardPage<DataTransferWiz
{
Composite generalSettings = UIUtils.createControlGroup(composite, DTMessages.data_transfer_wizard_settings_group_general, 5, GridData.FILL_HORIZONTAL, 0);
((GridLayout)generalSettings.getLayout()).verticalSpacing = 0;
((GridLayout)generalSettings.getLayout()).marginHeight = 0;
((GridLayout)generalSettings.getLayout()).marginWidth = 0;
{
formatProfilesCombo = UIUtils.createLabelCombo(generalSettings, DTMessages.data_transfer_wizard_settings_label_formatting, SWT.DROP_DOWN | SWT.READ_ONLY);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
......@@ -113,7 +116,12 @@ public class StreamConsumerPageSettings extends ActiveWizardPage<DataTransferWiz
reloadFormatProfiles();
lobExtractType = UIUtils.createLabelCombo(generalSettings, DTMessages.data_transfer_wizard_settings_label_binaries, SWT.DROP_DOWN | SWT.READ_ONLY);
UIUtils.createControlLabel(generalSettings, DTMessages.data_transfer_wizard_settings_label_binaries);
Composite binariesPanel = UIUtils.createComposite(generalSettings, 4);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 4;
binariesPanel.setLayoutData(gd);
lobExtractType = new Combo(binariesPanel, SWT.DROP_DOWN | SWT.READ_ONLY);
lobExtractType.setItems(
DTMessages.data_transfer_wizard_settings_binaries_item_set_to_null,
DTMessages.data_transfer_wizard_settings_binaries_item_save_to_file,
......@@ -130,8 +138,8 @@ public class StreamConsumerPageSettings extends ActiveWizardPage<DataTransferWiz
}
});
lobEncodingLabel = UIUtils.createControlLabel(generalSettings, DTMessages.data_transfer_wizard_settings_label_encoding);
lobEncodingCombo = new Combo(generalSettings, SWT.DROP_DOWN | SWT.READ_ONLY);
lobEncodingLabel = UIUtils.createControlLabel(binariesPanel, DTMessages.data_transfer_wizard_settings_label_encoding);
lobEncodingCombo = new Combo(binariesPanel, SWT.DROP_DOWN | SWT.READ_ONLY);
lobEncodingCombo.setItems(
"Base64", //$NON-NLS-1$
"Hex", //$NON-NLS-1$
......@@ -148,7 +156,6 @@ public class StreamConsumerPageSettings extends ActiveWizardPage<DataTransferWiz
}
}
});
UIUtils.createEmptyLabel(generalSettings, 1, 1);
}
}
......
......@@ -188,7 +188,10 @@ class TaskConfigurationWizardPageTask extends ActiveWizardPage
modifyListener.modifyText(e);
});
taskDescriptionText = UIUtils.createLabelText(formPanel, "Description", task == null ? "" : CommonUtils.notEmpty(task.getDescription()), SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
UIUtils.createControlLabel(formPanel, "Description").setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
taskDescriptionText = new Text(formPanel, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
taskDescriptionText.setText(task == null ? "" : CommonUtils.notEmpty(task.getDescription()));
taskDescriptionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
((GridData) taskDescriptionText.getLayoutData()).heightHint = taskDescriptionText.getLineHeight() * 5;
taskDescriptionText.addModifyListener(e -> {
taskDescription = taskDescriptionText.getText();
......
......@@ -532,7 +532,9 @@ public class UIUtils {
public static Label createControlLabel(Composite parent, String label, int hSpan) {
Label textLabel = new Label(parent, SWT.NONE);
textLabel.setText(label + ": "); //$NON-NLS-1$
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING /*| GridData.HORIZONTAL_ALIGN_END*/);
// Vert align center. Because height of single line control may differ from label height. This makes form ugly.
// For multiline texts we need to set vert align manually.
GridData gd = new GridData(GridData.VERTICAL_ALIGN_CENTER /*| GridData.HORIZONTAL_ALIGN_END*/);
gd.horizontalSpan = hSpan;
textLabel.setLayoutData(gd);
return textLabel;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册