directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1495041 - in /directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets: ACIItemSourceEditorComposite.java ACIItemTabFolderComposite.java ACIItemVisualEditorComposite.java
Date Thu, 20 Jun 2013 15:02:37 GMT
Author: pamarcelot
Date: Thu Jun 20 15:02:37 2013
New Revision: 1495041

URL: http://svn.apache.org/r1495041
Log:
Fixed various graphical glitches in the ACI Editor with the use of the Tab Folder.

Modified:
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java?rev=1495041&r1=1495040&r2=1495041&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
Thu Jun 20 15:02:37 2013
@@ -36,7 +36,8 @@ import org.eclipse.jface.text.source.Sou
 import org.eclipse.jface.text.source.SourceViewerConfiguration;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 
 
@@ -47,7 +48,6 @@ import org.eclipse.swt.widgets.Composite
  */
 public class ACIItemSourceEditorComposite extends Composite
 {
-
     /** The source editor */
     private SourceViewer sourceEditor;
 
@@ -64,7 +64,7 @@ public class ACIItemSourceEditorComposit
     public ACIItemSourceEditorComposite( Composite parent, int style )
     {
         super( parent, style );
-        setLayout( new FillLayout() );
+        setLayout( new GridLayout() );
 
         createSourceEditor();
     }
@@ -78,6 +78,7 @@ public class ACIItemSourceEditorComposit
     {
         // create source editor
         sourceEditor = new SourceViewer( this, null, null, false, SWT.BORDER | SWT.V_SCROLL
| SWT.H_SCROLL );
+        sourceEditor.getControl().setLayoutData( new GridData( SWT.FILL, SWT.FILL, true,
true ) );
 
         // setup basic configuration
         configuration = new ACISourceViewerConfiguration();

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java?rev=1495041&r1=1495040&r2=1495041&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java
Thu Jun 20 15:02:37 2013
@@ -30,7 +30,6 @@ import org.eclipse.jface.dialogs.ErrorDi
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -47,7 +46,6 @@ import org.eclipse.swt.widgets.TabItem;
  */
 public class ACIItemTabFolderComposite extends Composite
 {
-
     /** The index of the visual tab */
     public static final int VISUAL_TAB_INDEX = 0;
 
@@ -85,16 +83,13 @@ public class ACIItemTabFolderComposite e
     public ACIItemTabFolderComposite( Composite parent, int style )
     {
         super( parent, style );
-        setLayoutData( new GridData( GridData.FILL_BOTH ) );
-        GridLayout layout = new GridLayout( 1, false );
-        layout.marginWidth = 0;
-        layout.marginHeight = 0;
+        GridLayout layout = new GridLayout();
+        layout.marginWidth = layout.marginHeight = 0;
         setLayout( layout );
+        setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         createTabFolder();
-
         createVisualTab();
-
         createSourceTab();
 
         initListeners();
@@ -124,11 +119,15 @@ public class ACIItemTabFolderComposite e
     private void createSourceTab()
     {
         // create inner container
-        sourceContainer = new Composite( tabFolder, SWT.BORDER );
-        sourceContainer.setLayout( new FillLayout() );
+        sourceContainer = new Composite( tabFolder, SWT.NONE );
+        GridLayout layout = new GridLayout();
+        layout.marginWidth = layout.marginHeight = 0;
+        sourceContainer.setLayout( layout );
+        sourceContainer.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         // create source editor
         sourceComposite = new ACIItemSourceEditorComposite( sourceContainer, SWT.NONE );
+        sourceComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         // create tab
         sourceTab = new TabItem( tabFolder, SWT.NONE, SOURCE_TAB_INDEX );
@@ -145,10 +144,12 @@ public class ACIItemTabFolderComposite e
     {
         // create inner container
         visualContainer = new Composite( tabFolder, SWT.NONE );
-        visualContainer.setLayout( new FillLayout() );
+        visualContainer.setLayout( new GridLayout() );
+        visualContainer.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         // create the visual ACIItem composite
         visualComposite = new ACIItemVisualEditorComposite( visualContainer, SWT.NONE );
+        visualComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         // create tab
         visualTab = new TabItem( tabFolder, SWT.NONE, VISUAL_TAB_INDEX );
@@ -164,11 +165,7 @@ public class ACIItemTabFolderComposite e
     private void createTabFolder()
     {
         tabFolder = new TabFolder( this, SWT.TOP );
-        GridLayout mainLayout = new GridLayout();
-        mainLayout.marginWidth = 0;
-        mainLayout.marginHeight = 0;
-        tabFolder.setLayout( mainLayout );
-        tabFolder.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+        tabFolder.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
     }
 
 
@@ -291,5 +288,4 @@ public class ACIItemTabFolderComposite e
         sourceComposite.format();
         //visualComposite.format();
     }
-
 }

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java?rev=1495041&r1=1495040&r2=1495041&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
Thu Jun 20 15:02:37 2013
@@ -52,7 +52,6 @@ import org.eclipse.swt.widgets.Composite
  */
 public class ACIItemVisualEditorComposite extends ScrolledComposite implements WidgetModifyListener
 {
-
     /** The inner composite for all the content */
     private Composite composite = null;
 
@@ -97,16 +96,9 @@ public class ACIItemVisualEditorComposit
      */
     private void createComposite()
     {
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 1;
-        GridData gridData = new GridData();
-        gridData.horizontalAlignment = GridData.FILL;
-        gridData.grabExcessHorizontalSpace = true;
-        gridData.verticalAlignment = GridData.CENTER;
-
         composite = new Composite( this, SWT.NONE );
-        composite.setLayout( gridLayout );
-        composite.setLayoutData( gridData );
+        composite.setLayout( new GridLayout() );
+        composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         generalComposite = new ACIItemGeneralComposite( composite, SWT.NONE );
         generalComposite.addWidgetModifyListener( this );



Mime
View raw message