mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
17.11.2009 92942bc98880793237d38d87db45abd5537d3f62
opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/SchemaBrowserRightPanel.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 */
package org.opends.guitools.controlpanel.ui;
@@ -37,6 +37,8 @@
import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo;
import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent;
import org.opends.guitools.controlpanel.event.
 ConfigurationElementCreatedListener;
import org.opends.guitools.controlpanel.event.SchemaElementSelectionListener;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.messages.Message;
@@ -74,8 +76,9 @@
  private final SchemaElementPanel[] panels =
  {   standardObjectClassPanel, configurationObjectClassPanel,
      customObjectClassPanel, standardAttributePanel,
      configurationAttributePanel, customAttributePanel, matchingRulePanel,
      customObjectClassPanel,
      standardAttributePanel, configurationAttributePanel, customAttributePanel,
      matchingRulePanel,
      attributeSyntaxPanel
  };
@@ -145,6 +148,34 @@
  }
  /**
   * Adds a configuration element created listener.
   * @param listener the listener.
   */
  public void addConfigurationElementCreatedListener(
      ConfigurationElementCreatedListener listener)
  {
    super.addConfigurationElementCreatedListener(listener);
    for (SchemaElementPanel panel : panels)
    {
      panel.addConfigurationElementCreatedListener(listener);
    }
  }
  /**
   * Removes a configuration element created listener.
   * @param listener the listener.
   */
  public void removeConfigurationElementCreatedListener(
      ConfigurationElementCreatedListener listener)
  {
    super.removeConfigurationElementCreatedListener(listener);
    for (SchemaElementPanel panel : panels)
    {
      panel.removeConfigurationElementCreatedListener(listener);
    }
  }
  /**
   * Updates the contents of the panel with the provided standard object class.
   * @param oc the object class.
   * @param schema the schema.
@@ -242,7 +273,7 @@
   * @param syntax the attribute syntax.
   * @param schema the schema.
   */
  public void updateAttributeSyntax(AttributeSyntax syntax, Schema schema)
  public void updateAttributeSyntax(AttributeSyntax<?> syntax, Schema schema)
  {
    attributeSyntaxPanel.update(syntax, schema);
    schemaElementPanel = attributeSyntaxPanel;
@@ -348,9 +379,9 @@
  /**
   * Tells whether the user chose to save the changes in the panel, to not save
   * them or simply cancelled the selection in the tree.
   * them or simply canceled the selection in the tree.
   * @return the value telling whether the user chose to save the changes in the
   * panel, to not save them or simply cancelled the selection in the tree.
   * panel, to not save them or simply canceled the selection in the tree.
   */
  public UnsavedChangesDialog.Result checkUnsavedChanges()
  {