directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r491663 - in /directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor: dialogs/ widgets/
Date Mon, 01 Jan 2007 22:30:18 GMT
Author: seelmann
Date: Mon Jan  1 14:30:18 2007
New Revision: 491663

URL: http://svn.apache.org/viewvc?view=rev&rev=491663
Log:
Fixed some display problems on windows

Modified:
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ACIItemDialog.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ItemPermissionDialog.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/UserPermissionDialog.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
    directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ACIItemDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ACIItemDialog.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ACIItemDialog.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ACIItemDialog.java
Mon Jan  1 14:30:18 2007
@@ -111,8 +111,8 @@
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
         GridData gd = new GridData( GridData.FILL_BOTH );
-        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 3 / 2;
-        gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 3 / 2;
+        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 4 / 3;
+        gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 4 / 3;
         composite.setLayoutData( gd );
 
         tabFolderComposite = new ACIItemTabFolderComposite( composite, SWT.NONE );

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ItemPermissionDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ItemPermissionDialog.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ItemPermissionDialog.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/ItemPermissionDialog.java
Mon Jan  1 14:30:18 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.ldap.aci.ItemPermission;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -127,6 +128,8 @@
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
         GridData gd = new GridData( GridData.FILL_BOTH );
+        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
);
+        gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 4 / 3;
         composite.setLayoutData( gd );
 
         // precedence

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/UserPermissionDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/UserPermissionDialog.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/UserPermissionDialog.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/UserPermissionDialog.java
Mon Jan  1 14:30:18 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.UserPermission;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -127,6 +128,8 @@
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
         GridData gd = new GridData( GridData.FILL_BOTH );
+        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
);
+        gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 4 / 3;
         composite.setLayoutData( gd );
 
         // precedence

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
Mon Jan  1 14:30:18 2007
@@ -59,8 +59,6 @@
  */
 public class ACIItemGrantsAndDenialsComposite extends Composite
 {
-    /** The inner composite for all the content */
-    private Composite composite = null;
 
     /** The description label */
     private Label label = null;
@@ -206,48 +204,24 @@
         super( parent, style );
 
         GridLayout layout = new GridLayout();
-        layout.horizontalSpacing = 0;
-        layout.verticalSpacing = 0;
-        layout.marginHeight = 0;
-        layout.marginWidth = 0;
+        layout.makeColumnsEqualWidth = false;
+        layout.numColumns = 2;        
         setLayout( layout );
 
         GridData layoutData = new GridData();
-        layoutData.horizontalAlignment = GridData.FILL;
         layoutData.grabExcessHorizontalSpace = true;
-        layoutData.verticalAlignment = GridData.CENTER;
+        layoutData.grabExcessVerticalSpace = true;
+        layoutData.horizontalAlignment = GridData.FILL;
+        layoutData.verticalAlignment = GridData.FILL;
         setLayoutData( layoutData );
 
-        createComposite();
-    }
-
-
-    /**
-     * This method initializes composite	
-     *
-     */
-    private void createComposite()
-    {
         GridData labelGridData = new GridData();
         labelGridData.horizontalSpan = 2;
         labelGridData.verticalAlignment = GridData.CENTER;
         labelGridData.grabExcessHorizontalSpace = true;
         labelGridData.horizontalAlignment = GridData.FILL;
 
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.makeColumnsEqualWidth = false;
-        gridLayout.numColumns = 2;
-
-        GridData gridData = new GridData();
-        gridData.horizontalAlignment = GridData.FILL;
-        gridData.grabExcessHorizontalSpace = true;
-        gridData.verticalAlignment = GridData.BEGINNING;
-
-        composite = new Composite( this, SWT.NONE );
-        composite.setLayoutData( gridData );
-        composite.setLayout( gridLayout );
-
-        label = new Label( composite, SWT.NONE );
+        label = new Label( this, SWT.NONE );
         label.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.description")
); //$NON-NLS-1$
         label.setLayoutData( labelGridData );
 
@@ -263,13 +237,14 @@
      */
     private void createTree()
     {
-        GridData tableGridData = new GridData();
+        GridData tableGridData = new GridData(GridData.FILL_BOTH);
         tableGridData.grabExcessHorizontalSpace = true;
+        tableGridData.grabExcessVerticalSpace = true;
         tableGridData.verticalAlignment = GridData.FILL;
         tableGridData.horizontalAlignment = GridData.FILL;
         //tableGridData.heightHint = 100;
 
-        tree = new Tree( composite, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
| SWT.FULL_SELECTION
+        tree = new Tree( this, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION
             | SWT.HIDE_SELECTION );
         tree.setHeaderVisible( true );
         tree.setLayoutData( tableGridData );
@@ -278,12 +253,12 @@
         TreeColumn c1 = new TreeColumn( tree, SWT.LEFT, 0 );
         c1.setText( COLUMNS[0] );
         c1.setWidth( 160 );
-        TreeColumn c2 = new TreeColumn( tree, SWT.CENTER, 1 );
+        TreeColumn c2 = new TreeColumn( tree, SWT.LEFT, 1 );
         c2.setText( COLUMNS[1] );
         c2.setWidth( 80 );
-        TreeColumn c3 = new TreeColumn( tree, SWT.LEFT, 2 );
-        c3.setText( " " ); //$NON-NLS-1$
-        c3.setWidth( 1 );
+//        TreeColumn c3 = new TreeColumn( tree, SWT.LEFT, 2 );
+//        c3.setText( " " ); //$NON-NLS-1$
+//        c3.setWidth( 0 );
 
         treeViewer = new TreeViewer( tree );
         treeViewer.setUseHashlookup( true );
@@ -358,7 +333,7 @@
         gridData.grabExcessVerticalSpace = false;
         gridData.verticalAlignment = GridData.FILL;
 
-        buttonComposite = new Composite( composite, SWT.NONE );
+        buttonComposite = new Composite( this, SWT.NONE );
         buttonComposite.setLayoutData( gridData );
         buttonComposite.setLayout( gridLayout );
 

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
Mon Jan  1 14:30:18 2007
@@ -251,7 +251,7 @@
         table = new Table( composite, SWT.BORDER );
         table.setHeaderVisible( false );
         table.setLayoutData( tableGridData );
-        table.setLinesVisible( true );
+        table.setLinesVisible( false );
         tableViewer = new TableViewer( table );
         tableViewer.setContentProvider( new ArrayContentProvider() );
         tableViewer.setLabelProvider( new LabelProvider() );

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
Mon Jan  1 14:30:18 2007
@@ -337,7 +337,7 @@
         table = new Table( composite, SWT.BORDER | SWT.CHECK );
         table.setHeaderVisible( false );
         table.setLayoutData( tableGridData );
-        table.setLinesVisible( true );
+        table.setLinesVisible( false );
         tableViewer = new CheckboxTableViewer( table );
         tableViewer.setContentProvider( new ArrayContentProvider() );
         tableViewer.setLabelProvider( new ProtectedItemsLabelProvider() );
@@ -433,7 +433,7 @@
             public void widgetSelected( SelectionEvent e )
             {
                 tableViewer.setCheckedElements( protectedItemWrappers );
-                tableViewer.refresh();
+                refreshTable();
             }
         } );
 
@@ -445,7 +445,7 @@
             public void widgetSelected( SelectionEvent e )
             {
                 tableViewer.setCheckedElements( new ProtectedItem[0] );
-                tableViewer.refresh();
+                refreshTable();
             }
         } );
 
@@ -460,7 +460,7 @@
                 elements.addAll( Arrays.asList( protectedItemWrappers ) );
                 elements.removeAll( Arrays.asList( tableViewer.getCheckedElements() ) );
                 tableViewer.setCheckedElements( elements.toArray() );
-                tableViewer.refresh();
+                refreshTable();
             }
         } );
 
@@ -527,7 +527,7 @@
             }
         }
 
-        tableViewer.refresh();
+        refreshTable();
     }
 
 
@@ -616,7 +616,7 @@
      */
     private void protectedItemChecked()
     {
-        tableViewer.refresh();
+        refreshTable();
     }
 
 
@@ -632,8 +632,17 @@
         if ( dialog.open() == TextDialog.OK )
         {
             protectedItemWrapper.protectedItemValue = dialog.getText();
-            tableViewer.refresh();
+            refreshTable();
         }
+    }
+    
+    
+    /**
+     * Refreshes the table viewer.
+     */
+    private void refreshTable()
+    {
+        tableViewer.refresh();
     }
 
 }

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
Mon Jan  1 14:30:18 2007
@@ -297,7 +297,7 @@
         table = new Table( composite, SWT.BORDER | SWT.CHECK );
         table.setHeaderVisible( false );
         table.setLayoutData( tableGridData );
-        table.setLinesVisible( true );
+        table.setLinesVisible( false );
         tableViewer = new CheckboxTableViewer( table );
         tableViewer.setContentProvider( new ArrayContentProvider() );
         tableViewer.setLabelProvider( new UserClassesLabelProvider() );
@@ -393,7 +393,7 @@
             public void widgetSelected( SelectionEvent e )
             {
                 tableViewer.setCheckedElements( userClassWrappers );
-                tableViewer.refresh();
+                refreshTable();
             }
         } );
 
@@ -405,7 +405,7 @@
             public void widgetSelected( SelectionEvent e )
             {
                 tableViewer.setCheckedElements( new ProtectedItem[0] );
-                tableViewer.refresh();
+                refreshTable();
             }
         } );
 
@@ -420,7 +420,7 @@
                 elements.addAll( Arrays.asList( userClassWrappers ) );
                 elements.removeAll( Arrays.asList( tableViewer.getCheckedElements() ) );
                 tableViewer.setCheckedElements( elements.toArray() );
-                tableViewer.refresh();
+                refreshTable();
             }
         } );
 
@@ -486,7 +486,7 @@
             }
         }
 
-        tableViewer.refresh();
+        refreshTable();
     }
 
 
@@ -574,7 +574,7 @@
      */
     private void userClassChecked()
     {
-        tableViewer.refresh();
+        refreshTable();
     }
 
 
@@ -590,9 +590,18 @@
         if ( dialog.open() == TextDialog.OK )
         {
             userClassWrapper.userClassValue = dialog.getText();
-            tableViewer.refresh();
+            refreshTable();
         }
 
+    }
+    
+    
+    /**
+     * Refreshes the table viewer.
+     */
+    private void refreshTable()
+    {
+        tableViewer.refresh();
     }
 
 }

Modified: directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java?view=diff&rev=491663&r1=491662&r2=491663
==============================================================================
--- directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
(original)
+++ directory/sandbox/seelmann/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
Mon Jan  1 14:30:18 2007
@@ -251,7 +251,7 @@
         table = new Table( composite, SWT.BORDER );
         table.setHeaderVisible( false );
         table.setLayoutData( tableGridData );
-        table.setLinesVisible( true );
+        table.setLinesVisible( false );
         tableViewer = new TableViewer( table );
         tableViewer.setContentProvider( new ArrayContentProvider() );
         tableViewer.setLabelProvider( new LabelProvider() );



Mime
View raw message