directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1155343 - /directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/BaseWidgetUtils.java
Date Tue, 09 Aug 2011 13:00:39 GMT
Author: pamarcelot
Date: Tue Aug  9 13:00:39 2011
New Revision: 1155343

URL: http://svn.apache.org/viewvc?rev=1155343&view=rev
Log:
Added a new utility method.

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=1155343&r1=1155342&r2=1155343&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
Tue Aug  9 13:00:39 2011
@@ -77,8 +77,25 @@ public class BaseWidgetUtils
      */
     public static Composite createColumnContainer( Composite parent, int columnCount, int
span )
     {
+        return createColumnContainer( parent, columnCount, false, span );
+    }
+
+
+    /**
+     * Creates a SWT {@link Composite} under the given parent. 
+     * A GridLayout with the given number of columns is used.
+     *
+     * @param parent the parent
+     * @param columnCount the number of columns
+     * @param makeColumnsEqualWidth if the columns width should be equal
+     * @param span the horizontal span
+     * @return the created composite
+     */
+    public static Composite createColumnContainer( Composite parent, int columnCount, boolean
makeColumnsEqualWidth,
+        int span )
+    {
         Composite container = new Composite( parent, SWT.NONE );
-        GridLayout gl = new GridLayout( columnCount, false );
+        GridLayout gl = new GridLayout( columnCount, makeColumnsEqualWidth );
         gl.marginHeight = gl.marginWidth = 0;
         container.setLayout( gl );
         GridData gd = new GridData( GridData.FILL_HORIZONTAL );



Mime
View raw message