directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r522935 - /directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
Date Tue, 27 Mar 2007 14:46:23 GMT
Author: pamarcelot
Date: Tue Mar 27 07:46:23 2007
New Revision: 522935

URL: http://svn.apache.org/viewvc?view=rev&rev=522935
Log:
Added a listener on the Schema Pool to reload (when necessary) the tables of the Used By Page
of the AT Editor.

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

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java?view=diff&rev=522935&r1=522934&r2=522935
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
Tue Mar 27 07:46:23 2007
@@ -28,7 +28,9 @@
 import org.apache.directory.ldapstudio.schemas.Activator;
 import org.apache.directory.ldapstudio.schemas.PluginConstants;
 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.SchemaPool;
 import org.apache.directory.ldapstudio.schemas.view.editors.objectClass.ObjectClassEditor;
 import org.apache.directory.ldapstudio.schemas.view.editors.objectClass.ObjectClassEditorInput;
@@ -56,7 +58,7 @@
 /**
  * This class is the Used By Page of the Attribute Type Editor
  */
-public class AttributeTypeEditorUsedByPage extends FormPage
+public class AttributeTypeEditorUsedByPage extends FormPage implements PoolListener
 {
     /** The page ID */
     public static final String ID = AttributeTypeEditor.ID + "usedByPage";
@@ -128,6 +130,7 @@
     {
         super( editor, ID, TITLE );
         schemaPool = SchemaPool.getInstance();
+        schemaPool.addListener( this );
     }
 
 
@@ -331,6 +334,19 @@
      */
     public void refreshUI()
     {
+        fillInUiFields();
+    }
+
+
+    /* (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 )
+    {
+        mandatoryAttributeTable.removeAll();
+        mandatoryAttributeTable.setItemCount( 0 );
+        optionalAttibuteTable.removeAll();
+        optionalAttibuteTable.setItemCount( 0 );
         fillInUiFields();
     }
 }



Mime
View raw message