]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/EclipseUiUtils.java
Add dep folder
[lgpl/argeo-commons.git] / base / runtime / org.argeo.eclipse.ui / src / main / java / org / argeo / eclipse / ui / EclipseUiUtils.java
index 03d0c3883b3f940ff6556dbdd17de7c56c791fd2..8e1c7e63210cd34b75caff9b901d6f9bdf0585ec 100644 (file)
@@ -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