This commit is contained in:
Gregory.Shrago
2016-06-07 11:50:38 +03:00
parent aeabfa5d16
commit 6df5352458
3 changed files with 26 additions and 1 deletions
@@ -20,8 +20,19 @@ import com.intellij.util.messages.Topic;
import java.util.EventListener;
public interface UISettingsListener extends EventListener{
/**
* A listener for <code>UISettings</code> changes.
* <p/>
* <em>NOTE: </em>The main <code>UISettings</code> instance pushes its events down
* the UI components hierarchy so there's no need to add a <code>JComponent</code> as a listener.
*
* @see UISettings#fireUISettingsChanged()
* @see com.intellij.util.ComponentTreeEventDispatcher
*/
public interface UISettingsListener extends EventListener {
Topic<UISettingsListener> TOPIC = Topic.create("UI settings", UISettingsListener.class);
void uiSettingsChanged(UISettings source);
}
@@ -17,6 +17,18 @@ package com.intellij.openapi.editor.colors;
import java.util.EventListener;
/**
* A listener for global color scheme change event.
* <p/>
* <em>NOTE: </em>The <code>EditorColorsManager</code> pushes the events down
* the UI components hierarchy so there's no need to add a <code>JComponent</code> 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);
}
@@ -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<T extends EventListener> {