} else { x = h.isSelected() ? ((h.getIcon() == null) ? 0 : (h.getIcon().getIconWidth() + h.getIconTextGap())) : 0; x += h.getIndent();
prefSize.width = Math.max(prefSize.width, textwidth + ins.right + ins.left); } else { prefSize.width += (textwidth + r.getIndent());
public void update(Graphics g, JComponent c) { Color bg = getBackgroundFor ((HtmlRendererImpl) c); HtmlRendererImpl h = (HtmlRendererImpl) c; if (bg != null) { int x = h.isSelected() ? (h.getIcon() == null ? 0 : h.getIcon().getIconWidth() + h.getIconTextGap()) : 0; x += h.getIndent(); g.setColor(bg); g.fillRect(x, 0, c.getWidth()-x,c.getHeight()); } if (h.isLeadSelection()) { Color focus = UIManager.getColor("Tree.selectionBorderColor"); // NOI18N if (focus == null || focus.equals (bg)) { focus = Color.BLUE; } int x = (h.getIcon() == null ? 0 : h.getIcon().getIconWidth() + h.getIconTextGap()); g.setColor(focus); g.drawRect (x, 0, c.getWidth() - (x + 1), c.getHeight()-1); } paint(g, c); }
public void update(Graphics g, JComponent c) { Color bg = getBackgroundFor ((HtmlRendererImpl) c); HtmlRendererImpl h = (HtmlRendererImpl) c; if (bg != null) { int x = h.isSelected() ? (h.getIcon() == null ? 0 : h.getIcon().getIconWidth() + h.getIconTextGap()) : 0; x += h.getIndent(); g.setColor(bg); g.fillRect(x, 0, c.getWidth()-x,c.getHeight()); } if (h.isLeadSelection()) { Color focus = UIManager.getColor("Tree.selectionBorderColor"); // NOI18N if (focus == null || focus.equals (bg)) { focus = Color.BLUE; } int x = (h.getIcon() == null ? 0 : h.getIcon().getIconWidth() + h.getIconTextGap()); g.setColor(focus); g.drawRect (x, 0, c.getWidth() - (x + 1), c.getHeight()-1); } paint(g, c); }
prefSize.width = Math.max (prefSize.width, textwidth + ins.right + ins.left); } else { prefSize.width += textwidth + r.getIndent();
prefSize.width = Math.max (prefSize.width, textwidth + ins.right + ins.left); } else { prefSize.width += textwidth + r.getIndent();