Color (@NotNull JTree tree) { JTable table = getTableFor(tree); if (table != null) return getForeground(table); // tree table Color foreground = tree.getForeground(); return foreground != null ? foreground : CurrentTheme.Tree.FOREGROUND; }