directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1399724 - /directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
Date Thu, 18 Oct 2012 16:26:08 GMT
Author: pamarcelot
Date: Thu Oct 18 16:26:08 2012
New Revision: 1399724

URL: http://svn.apache.org/viewvc?rev=1399724&view=rev
Log:
Part of a fix for DIRSTUDIO-793 (Batch Operation define modification slowdown, needs scrollbar)

Modified:
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java?rev=1399724&r1=1399723&r2=1399724&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
Thu Oct 18 16:26:08 2012
@@ -31,10 +31,13 @@ import org.apache.directory.studio.ldapb
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
@@ -111,7 +114,17 @@ public class ModWidget extends BrowserWi
     {
         shell = parent.getShell();
 
-        modComposite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
+        ScrolledComposite sc = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL
);
+        sc.setLayout( new GridLayout() );
+        sc.setExpandHorizontal( true );
+        sc.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
+
+        modComposite = BaseWidgetUtils.createColumnContainer( sc, 3, 1 );
+        modComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
+        //        modComposite.setBackground( shell.getDisplay().getSystemColor( SWT.COLOR_RED
) );
+
+        sc.setContent( modComposite );
+
         addModSpec( modComposite, 0 );
 
         return modComposite;
@@ -223,6 +236,7 @@ public class ModWidget extends BrowserWi
         }
 
         shell.layout( true, true );
+        modComposite.setSize( modComposite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
     }
 
 
@@ -238,9 +252,11 @@ public class ModWidget extends BrowserWi
         final ModSpec modSpec = new ModSpec();
 
         modSpec.modGroup = BaseWidgetUtils.createGroup( modComposite, "", 1 ); //$NON-NLS-1$
+        modSpec.modGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         Composite modSpecComposite = BaseWidgetUtils.createColumnContainer( modSpec.modGroup,
2, 1 );
-        modSpec.modType = BaseWidgetUtils.createCombo( modSpecComposite, new String[]
+        modSpec.modType = BaseWidgetUtils.createReadonlyCombo( modSpecComposite, new String[]
             { "add", "replace", "delete" }, 0, 1 ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        modSpec.modType.setLayoutData( new GridData() );
         modSpec.modType.addModifyListener( this );
         String[] attributeDescriptions = SchemaUtils.getNamesAsArray( schema.getAttributeTypeDescriptions()
);
         Arrays.sort( attributeDescriptions );



Mime
View raw message