From 5eecc462d544028a129cfd6aa9577b8b5e511a8b Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 28 Mar 2011 16:39:34 +0400 Subject: [PATCH] two useful methods --- platform/util/src/com/intellij/util/ui/UIUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 1f0ada94107b..b0b2350e19c5 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -435,10 +435,18 @@ public class UIUtil { return isUnderGTKLookAndFeel() ? getTreeTextBackground() : UIManager.getColor("List.background"); } + public static Color getListBackground(boolean isSelected) { + return isSelected ? getListSelectionBackground() : getListBackground(); + } + public static Color getListForeground() { return UIManager.getColor("List.foreground"); } + public static Color getListForeground(boolean isSelected) { + return isSelected ? getListSelectionForeground() : getListForeground(); + } + public static Color getPanelBackground() { return UIManager.getColor("Panel.background"); }