diff --git a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsListener.java b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsListener.java index 56738a1e0286..2ca570a79f4e 100644 --- a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsListener.java +++ b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsListener.java @@ -20,8 +20,19 @@ import com.intellij.util.messages.Topic; import java.util.EventListener; -public interface UISettingsListener extends EventListener{ +/** + * A listener for UISettings changes. + *

+ * NOTE: The main UISettings instance pushes its events down + * the UI components hierarchy so there's no need to add a JComponent as a listener. + * + * @see UISettings#fireUISettingsChanged() + * @see com.intellij.util.ComponentTreeEventDispatcher + */ +public interface UISettingsListener extends EventListener { + Topic TOPIC = Topic.create("UI settings", UISettingsListener.class); void uiSettingsChanged(UISettings source); + } diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsListener.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsListener.java index a24064308d67..5a6a3282d7c2 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsListener.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsListener.java @@ -17,6 +17,18 @@ package com.intellij.openapi.editor.colors; import java.util.EventListener; +/** + * A listener for global color scheme change event. + *

+ * NOTE: The EditorColorsManager pushes the events down + * the UI components hierarchy so there's no need to add a JComponent as a listener. + * UI components also get this event triggered when global scheme itself is modified + * so they can adjust their appearance accordingly. + * + * @see com.intellij.util.ComponentTreeEventDispatcher + */ public interface EditorColorsListener extends EventListener { + void globalSchemeChange(EditorColorsScheme scheme); + } diff --git a/platform/util/src/com/intellij/util/ComponentTreeEventDispatcher.java b/platform/util/src/com/intellij/util/ComponentTreeEventDispatcher.java index 850423e8c289..42761484ccf0 100644 --- a/platform/util/src/com/intellij/util/ComponentTreeEventDispatcher.java +++ b/platform/util/src/com/intellij/util/ComponentTreeEventDispatcher.java @@ -25,6 +25,8 @@ import java.util.EventListener; import static com.intellij.util.ui.UIUtil.uiTraverser; /** + * Pushes events down the UI components hierarchy. + * * @author gregsh */ public class ComponentTreeEventDispatcher {