X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=eclipse%2Fruntime%2Forg.argeo.eclipse.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Feclipse%2Fui%2FEclipseUiUtils.java;fp=eclipse%2Fruntime%2Forg.argeo.eclipse.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Feclipse%2Fui%2FEclipseUiUtils.java;h=e70d819d19e69c922a6534256830a5a18d4b89d9;hb=5266ec50ddbf3247a5033d98a1dbceec6673a5b8;hp=333db5b8899a1b1a732a6b5c0f1110265bf143cb;hpb=a8233e9378854fc9ed1f4186095d06866cbea9f8;p=lgpl%2Fargeo-commons.git diff --git a/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java b/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java index 333db5b88..e70d819d1 100644 --- a/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java +++ b/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java @@ -28,7 +28,19 @@ public class EclipseUiUtils { lbl.setText(label); lbl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); Text txt = new Text(parent, SWT.LEAD | SWT.BORDER); - txt.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); + txt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + if (txt != null) + txt.addModifyListener(modifyListener); + return txt; + } + + public static Text createGridLP(Composite parent, String label, + ModifyListener modifyListener) { + Label lbl = new Label(parent, SWT.LEAD); + lbl.setText(label); + lbl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); + Text txt = new Text(parent, SWT.LEAD | SWT.BORDER | SWT.PASSWORD); + txt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); if (txt != null) txt.addModifyListener(modifyListener); return txt;