X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=base%2Fruntime%2Forg.argeo.eclipse.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Feclipse%2Fui%2FEclipseUiUtils.java;h=8e1c7e63210cd34b75caff9b901d6f9bdf0585ec;hb=3a3d316af102ba410d1d9e6de349d0c8f7ac044f;hp=03d0c3883b3f940ff6556dbdd17de7c56c791fd2;hpb=07b21659cba964ffdc81403718d0962c2d09175d;p=lgpl%2Fargeo-commons.git diff --git a/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java b/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java index 03d0c3883..8e1c7e632 100644 --- a/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java +++ b/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2012 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,9 +39,10 @@ public class EclipseUiUtils { * be null * @return the created text * - * @deprecated use {@link #createGridLT(Composite, String)} instead */ - @Deprecated + // FIXME why was this deprecated. + // * @ deprecated use { @ link #createGridLT(Composite, String)} instead + // @ Deprecated public static Text createGridLT(Composite parent, String label, ModifyListener modifyListener) { Label lbl = new Label(parent, SWT.LEAD); @@ -54,6 +55,10 @@ public class EclipseUiUtils { return txt; } + /** + * Create a label and a text field for a grid layout, the text field + * grabbing excess horizontal + */ public static Text createGridLT(Composite parent, String label) { return createGridLT(parent, label, null); } @@ -70,6 +75,10 @@ public class EclipseUiUtils { return txt; } + /** + * Create a label and a text field with password display for a grid layout, + * the text field grabbing excess horizontal + */ public static Text createGridLP(Composite parent, String label, ModifyListener modifyListener) { Label lbl = new Label(parent, SWT.LEAD); @@ -82,20 +91,22 @@ public class EclipseUiUtils { return txt; } + /** Shortcut to retrieve default italic font from display */ public static Font getItalicFont(Composite parent) { return JFaceResources.getFontRegistry().defaultFontDescriptor() .setStyle(SWT.ITALIC).createFont(parent.getDisplay()); } + /** Shortcut to retrieve default bold font from display */ public static Font getBoldFont(Composite parent) { return JFaceResources.getFontRegistry().defaultFontDescriptor() .setStyle(SWT.BOLD).createFont(parent.getDisplay()); } + /** Shortcut to retrieve default bold italic font from display */ public static Font getBoldItalicFont(Composite parent) { return JFaceResources.getFontRegistry().defaultFontDescriptor() .setStyle(SWT.BOLD | SWT.ITALIC) .createFont(parent.getDisplay()); } - -} +} \ No newline at end of file