KaviListColumns.java 文件源码

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

项目:eclipse-plugin-commander 作者:
@SuppressWarnings("unchecked")
private RankedItem<T> applyCellDefaultStyles(final ColumnOptions<T> options, ViewerCell cell) {
    final RankedItem<T> rankedItem = (RankedItem<T>) cell.getElement();
    cell.setForeground(fromRegistry(options.getFontColor()));
    int rowState = rowStateResolver.apply(rankedItem);

    if ((rowState & RowState.SELECTED.value) != 0 && options.isEnableBackgroundSelection()) {
        cell.setBackground(fromRegistry(new RGB(225,226,206)));
    } else {
        cell.setBackground(fromRegistry(options.getBackgroundColor()));
    }
    if ((rowState & RowState.CURSOR.value) != 0 && options.isEnableBackgroundSelection()) {
        cell.setBackground(fromRegistry(ColorUtil.blend(cell.getBackground().getRGB(), new RGB(200,200,200))));
    }
    Font font = createColumnFont(options, cell);
    cell.setFont(font);
    return rankedItem;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号