TableTreeCellRenderer.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:typecast 作者:
public void paint(Graphics g) {
    if (_selected) {
        g.setColor(SystemColor.textHighlight);
    } else if(getParent() != null) {
        g.setColor(getParent().getBackground());
    } else {
        g.setColor(getBackground());
    }
    Icon icon = getIcon();
    int offset = 0;
    if (icon != null && getText() != null) {
        offset = icon.getIconWidth() + getIconTextGap();
    }
    g.fillRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1);
    super.paint(g);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号