Component (JList list, Object value, int index, boolean sel, boolean focus) { final JPanel panel = new JPanel(new BorderLayout()); panel.setBackground(UIUtil.getListBackground(sel)); panel.setForeground(UIUtil.getListForeground(sel)); if (value instanceof TaskPsiElement) { final Task task = ((TaskPsiElement)value).getTask(); final SimpleColoredComponent c = new SimpleColoredComponent(); final TaskManager taskManager = TaskManager.getManager(myProject); final boolean isLocalTask = taskManager.findTask(task.getId()) != null; final boolean isClosed = task.isClosed() || (task instanceof LocalTask && taskManager.isLocallyClosed((LocalTask)task)); final Color bg = sel ? UIUtil.getListSelectionBackground(true) : isLocalTask ? UIUtil.getListBackground() : UIUtil.getDecoratedRowColor(); panel.setBackground(bg); SimpleTextAttributes attr = getAttributes(sel, isClosed); c.setIcon(isClosed ? IconLoader.getTransparentIcon(task.getIcon()) : task.getIcon()); SpeedSearchUtil.appendColoredFragmentForMatcher(task.getPresentableName(), c, attr, MatcherHolder.getAssociatedMatcher(list), bg, sel); panel.add(c, BorderLayout.CENTER); } else if ("...".equals(value)) { final SimpleColoredComponent c = new SimpleColoredComponent(); c.setIcon(EmptyIcon.ICON_16); c.append((String)value); panel.add(c, BorderLayout.CENTER); } else if (GotoTaskAction.CREATE_NEW_TASK_ACTION == value) { final SimpleColoredComponent c = new SimpleColoredComponent(); c.setIcon(LayeredIcon.create(AllIcons.FileTypes.Unknown, AllIcons.Actions.New)); c.append(GotoTaskAction.CREATE_NEW_TASK_ACTION.getActionText()); panel.add(c, BorderLayout.CENTER); } return panel; }