| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | |
| | | 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; |
| | |
| | | |
| | | private final SchemaElementPanel[] panels = |
| | | { standardObjectClassPanel, configurationObjectClassPanel, |
| | | customObjectClassPanel, standardAttributePanel, |
| | | configurationAttributePanel, customAttributePanel, matchingRulePanel, |
| | | customObjectClassPanel, |
| | | standardAttributePanel, configurationAttributePanel, customAttributePanel, |
| | | matchingRulePanel, |
| | | attributeSyntaxPanel |
| | | }; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 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. |
| | |
| | | * @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; |
| | |
| | | |
| | | /** |
| | | * 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() |
| | | { |