directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1300631 - /directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java
Date Wed, 14 Mar 2012 16:47:10 GMT
Author: pamarcelot
Date: Wed Mar 14 16:47:09 2012
New Revision: 1300631

URL: http://svn.apache.org/viewvc?rev=1300631&view=rev
Log:
Made the following methods return the label they create instead of void:
- createRadioIndent(...)
- createSpacer(...)
- createSeparator(...)

It could be useful to get the associated label to tweak the display and positioning.

Modified:
    directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java

Modified: directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java?rev=1300631&r1=1300630&r2=1300631&view=diff
==============================================================================
--- directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java
(original)
+++ directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java
Wed Mar 14 16:47:09 2012
@@ -475,18 +475,20 @@ public class BaseWidgetUtils
 
 
     /**
-     * Adds some space to indent radio buttons.
+     * Adds some space to .
      *
      * @param parent the parent
      * @param span the horizontal span
+     * @return the create label representing the radio buttons indent
      */
-    public static void createRadioIndent( Composite parent, int span )
+    public static Label createRadioIndent( Composite parent, int span )
     {
         Label l = new Label( parent, SWT.NONE );
         GridData gd = new GridData();
         gd.horizontalSpan = span;
         gd.horizontalIndent = 22;
         l.setLayoutData( gd );
+        return l;
     }
 
 
@@ -495,31 +497,33 @@ public class BaseWidgetUtils
      *
      * @param parent the parent
      * @param span the horizontal span
+     * @return the create label representing the spacer
      */
-    public static void createSpacer( Composite parent, int span )
+    public static Label createSpacer( Composite parent, int span )
     {
         Label l = new Label( parent, SWT.NONE );
-        // GridData gd = new GridData(GridData.FILL_HORIZONTAL);
         GridData gd = new GridData();
         gd.horizontalSpan = span;
         gd.heightHint = 1;
         l.setLayoutData( gd );
+        return l;
     }
 
 
     /**
-     * Creates a separator line.
+     * Creates a separator.
      *
      * @param parent the parent
      * @param span the horizontal span
+     * @return the create label representing the separator
      */
-    public static void createSeparator( Composite parent, int span )
+    public static Label createSeparator( Composite parent, int span )
     {
         Label l = new Label( parent, SWT.SEPARATOR | SWT.HORIZONTAL );
         GridData gd = new GridData( GridData.FILL_HORIZONTAL );
         gd.horizontalSpan = span;
-        // gd.heightHint = 1;
         l.setLayoutData( gd );
+        return l;
     }
 
 



Mime
View raw message