directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1063377 - in /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor: LdapLdapsServersPage.java OverviewPage.java
Date Tue, 25 Jan 2011 17:51:22 GMT
Author: pamarcelot
Date: Tue Jan 25 17:51:21 2011
New Revision: 1063377

URL: http://svn.apache.org/viewvc?rev=1063377&view=rev
Log:
Fixed listeners on "Overview" and "LDAP/LDAPS Server" pages.

Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1063377&r1=1063376&r2=1063377&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
Tue Jan 25 17:51:21 2011
@@ -93,7 +93,7 @@ public class LdapLdapsServersPage extend
     {
         public void modifyText( ModifyEvent e )
         {
-            getLdapsServerTransportBean().setSystemPort( Integer.parseInt( ldapPortText.getText()
) );
+            getLdapServerTransportBean().setSystemPort( Integer.parseInt( ldapPortText.getText()
) );
         }
     };
     private SelectionAdapter enableLdapsCheckboxListener = new SelectionAdapter()

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java?rev=1063377&r1=1063376&r2=1063377&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java
Tue Jan 25 17:51:21 2011
@@ -34,6 +34,10 @@ import org.eclipse.jface.viewers.ArrayCo
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
+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.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -82,6 +86,40 @@ public class OverviewPage extends Server
     private Button allowAnonymousAccessCheckbox;
     private Button enableAccesControlCheckbox;
 
+    // UI Control Listeners
+    private SelectionAdapter enableLdapCheckboxListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent e )
+        {
+            LdapLdapsServersPage.getLdapServerTransportBean( getDirectoryServiceBean() ).setEnabled(
+                enableLdapCheckbox.getSelection() );
+        }
+    };
+    private ModifyListener ldapPortTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            LdapLdapsServersPage.getLdapServerTransportBean( getDirectoryServiceBean() ).setSystemPort(
+                Integer.parseInt( ldapPortText.getText() ) );
+        }
+    };
+    private SelectionAdapter enableLdapsCheckboxListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent e )
+        {
+            LdapLdapsServersPage.getLdapsServerTransportBean( getDirectoryServiceBean() ).setEnabled(
+                enableLdapsCheckbox.getSelection() );
+        }
+    };
+    private ModifyListener ldapsPortTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            LdapLdapsServersPage.getLdapsServerTransportBean( getDirectoryServiceBean() ).setSystemPort(
+                Integer.parseInt( ldapsPortText.getText() ) );
+        }
+    };
+
 
     /**
      * Creates a new instance of GeneralPage.
@@ -291,10 +329,22 @@ public class OverviewPage extends Server
      */
     private void addListeners()
     {
+        // Enable LDAP Checkbox
         addDirtyListener( enableLdapCheckbox );
+        addSelectionListener( enableLdapCheckbox, enableLdapCheckboxListener );
+
+        // LDAP Port Text
         addDirtyListener( ldapPortText );
+        addModifyListener( ldapPortText, ldapPortTextListener );
+
+        // Enable LDAPS Checkbox
         addDirtyListener( enableLdapsCheckbox );
+        addSelectionListener( enableLdapsCheckbox, enableLdapsCheckboxListener );
+
+        // LDAPS Port Text
         addDirtyListener( ldapsPortText );
+        addModifyListener( ldapsPortText, ldapsPortTextListener );
+
         addDirtyListener( enableKerberosCheckbox );
         addDirtyListener( kerberosPortText );
         addDirtyListener( enableChangePasswordCheckbox );
@@ -308,10 +358,22 @@ public class OverviewPage extends Server
      */
     private void removeListeners()
     {
+        // Enable LDAP Checkbox
         removeDirtyListener( enableLdapCheckbox );
+        removeSelectionListener( enableLdapCheckbox, enableLdapCheckboxListener );
+
+        // LDAP Port Text
         removeDirtyListener( ldapPortText );
+        removeModifyListener( ldapPortText, ldapPortTextListener );
+
+        // Enable LDAPS Checkbox
         removeDirtyListener( enableLdapsCheckbox );
+        removeSelectionListener( enableLdapsCheckbox, enableLdapsCheckboxListener );
+
+        // LDAPS Port Text
         removeDirtyListener( ldapsPortText );
+        removeModifyListener( ldapsPortText, ldapsPortTextListener );
+
         removeDirtyListener( enableKerberosCheckbox );
         removeDirtyListener( kerberosPortText );
         removeDirtyListener( enableChangePasswordCheckbox );



Mime
View raw message