directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r523389 - /directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/objectClass/ObjectClassEditorOverviewPage.java
Date Wed, 28 Mar 2007 16:15:27 GMT
Author: pamarcelot
Date: Wed Mar 28 09:15:26 2007
New Revision: 523389

URL: http://svn.apache.org/viewvc?view=rev&rev=523389
Log:
Added a Pool Listener on the Overview Page of the OC Editor. After each Pool change, the Superior
Class, Mandatory and Optional Attributes and Mandatory Tables are reloaded.

Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/objectClass/ObjectClassEditorOverviewPage.java

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/objectClass/ObjectClassEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/objectClass/ObjectClassEditorOverviewPage.java?view=diff&rev=523389&r1=523388&r2=523389
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/objectClass/ObjectClassEditorOverviewPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/objectClass/ObjectClassEditorOverviewPage.java
Wed Mar 28 09:15:26 2007
@@ -26,7 +26,9 @@
 
 import org.apache.directory.ldapstudio.schemas.Messages;
 import org.apache.directory.ldapstudio.schemas.model.AttributeType;
+import org.apache.directory.ldapstudio.schemas.model.LDAPModelEvent;
 import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.model.PoolListener;
 import org.apache.directory.ldapstudio.schemas.model.Schema;
 import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
 import org.apache.directory.ldapstudio.schemas.view.ViewUtils;
@@ -80,7 +82,7 @@
 /**
  * This class is the Overview Page of the Object Class Editor
  */
-public class ObjectClassEditorOverviewPage extends FormPage
+public class ObjectClassEditorOverviewPage extends FormPage implements PoolListener
 {
     /** The page ID */
     public static final String ID = ObjectClassEditor.ID + "overviewPage"; //$NON-NLS-1$
@@ -660,6 +662,7 @@
     {
         super( editor, ID, TITLE );
         schemaPool = SchemaPool.getInstance();
+        schemaPool.addListener( this );
     }
 
 
@@ -1096,5 +1099,31 @@
         fillInUiFields();
         addListeners();
         setFieldsEditableState();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.schemas.model.PoolListener#poolChanged(org.apache.directory.ldapstudio.schemas.model.SchemaPool,
org.apache.directory.ldapstudio.schemas.model.LDAPModelEvent)
+     */
+    public void poolChanged( SchemaPool p, LDAPModelEvent e )
+    {
+        removeListeners();
+        fillInSuperiorsTable();
+        fillInMandatoryAttributesTable();
+        fillInOptionalAttributesTable();
+        addListeners();
+        setFieldsEditableState();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.forms.editor.FormPage#dispose()
+     */
+    public void dispose()
+    {
+        schemaPool.removeListener( this );
+        removeListeners();
+
+        super.dispose();
     }
 }



Mime
View raw message