HtmlRendererImpl h = (HtmlRendererImpl) c; if (bg != null && !(isNimbus() && h.getType() == HtmlRendererImpl.Type.TREE)) { int x; if (h.getType() == HtmlRendererImpl.Type.TABLE) { x = 0; // in a table we want to have the whole row selected } else { if (h.getType() == HtmlRendererImpl.Type.TABLE) { x = 0; // in a table we want to have the whole row selected } else {
static Color getForegroundFor(HtmlRendererImpl r) { if (r.isSelected() && !r.isParentFocused() && !isGTK() && !isNimbus()) { return getUnfocusedSelectionForeground(); } if (!r.isEnabled()) { return UIManager.getColor("textInactiveText"); //NOI18N } Color result = null; if (r.isSelected()) { switch (r.getType()) { case LIST: result = UIManager.getColor("List.selectionForeground"); //NOI18N break; case TABLE: result = UIManager.getColor("Table.selectionForeground"); //NOI18N break; case TREE: result = UIManager.getColor("Tree.selectionForeground"); //NOI18N } } return (result == null) ? r.getForeground() : result; }
static Color getBackgroundFor(HtmlRendererImpl r) { if (r.isOpaque()) { return r.getBackground(); } if (r.isSelected() && !r.isParentFocused() && !isGTK() && !isNimbus()) { return getUnfocusedSelectionBackground(); } Color result = null; if (r.isSelected()) { switch (r.getType()) { case LIST: result = UIManager.getColor("List.selectionBackground"); //NOI18N if (result == null) { //GTK //plaf library guarantees this one: result = UIManager.getColor("Tree.selectionBackground"); //NOI18N } //System.err.println(" now " + result); break; case TABLE: result = UIManager.getColor("Table.selectionBackground"); //NOI18N break; case TREE: return UIManager.getColor("Tree.selectionBackground"); //NOI18N } return (result == null) ? r.getBackground() : result; } return null; }
static Color getForegroundFor (HtmlRendererImpl r) { if (r.isSelected() && !r.isParentFocused()) { return getUnfocusedSelectionForeground(); } if (!r.isEnabled()) { return UIManager.getColor ("textInactiveText"); //NOI18N } Color result = null; if (r.isSelected()) { switch (r.getType()) { case HtmlRendererImpl.TYPE_LIST : result = UIManager.getColor ("List.selectionForeground"); //NOI18N case HtmlRendererImpl.TYPE_TABLE : result = UIManager.getColor ("Table.selectionForeground"); //NOI18N case HtmlRendererImpl.TYPE_TREE : result = UIManager.getColor ("Tree.selectionForeground"); //NOI18N } } return result == null ? r.getForeground() : result; }
static Color getForegroundFor (HtmlRendererImpl r) { if (r.isSelected() && !r.isParentFocused()) { return getUnfocusedSelectionForeground(); } if (!r.isEnabled()) { return UIManager.getColor ("textInactiveText"); //NOI18N } Color result = null; if (r.isSelected()) { switch (r.getType()) { case HtmlRendererImpl.TYPE_LIST : result = UIManager.getColor ("List.selectionForeground"); //NOI18N case HtmlRendererImpl.TYPE_TABLE : result = UIManager.getColor ("Table.selectionForeground"); //NOI18N case HtmlRendererImpl.TYPE_TREE : result = UIManager.getColor ("Tree.selectionForeground"); //NOI18N } } return result == null ? r.getForeground() : result; }
switch (r.getType()) { case HtmlRendererImpl.TYPE_LIST : result = UIManager.getColor ("List.selectionBackground"); //NOI18N
switch (r.getType()) { case HtmlRendererImpl.TYPE_LIST : result = UIManager.getColor ("List.selectionBackground"); //NOI18N