当前位置: 首页>>代码示例>>Java>>正文


Java HighlightPredicate.NEVER属性代码示例

本文整理汇总了Java中org.jdesktop.swingx.decorator.HighlightPredicate.NEVER属性的典型用法代码示例。如果您正苦于以下问题:Java HighlightPredicate.NEVER属性的具体用法?Java HighlightPredicate.NEVER怎么用?Java HighlightPredicate.NEVER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jdesktop.swingx.decorator.HighlightPredicate的用法示例。


在下文中一共展示了HighlightPredicate.NEVER属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createExtendedRolloverDecoration

private Highlighter createExtendedRolloverDecoration() {
    Color color = PaintUtils.setAlpha(Color.YELLOW, 100);
    final PainterHighlighter hl = new PainterHighlighter(HighlightPredicate.NEVER, 
            new MattePainter(color));
    // <snip> JXList rollover support
    // listen to changes of cell-rollover property
    // and set a Highlighters custom predicate accordingly
    PropertyChangeListener l = new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            Point location = (Point) evt.getNewValue();
            int row = -1;
            if (location != null) {
                row = location.y;
            }
            hl.setHighlightPredicate(new MeritRangeHighlightPredicate(
                    row < 0 ? null : list.getElementAt(row))); 
        }
        
    };
    list.addPropertyChangeListener(RolloverProducer.ROLLOVER_KEY, l);
    // </snip>
    return hl;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:25,代码来源:XListDemo.java

示例2: createHighlighters

/** 
     * create all highlighters.
     * 
     *
     */
    private void createHighlighters() {
        // <snip>rollover effect - light gray background
        rolloverHighlighter = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW,
                 Color.LIGHT_GRAY, null
                );
//        </snip>
        matchHighlighter = new ColorHighlighter(HighlightPredicate.NEVER, 
                null, Color.MAGENTA 
                );
        
        // hacking a right/left margin
        marginHighlighter = new BorderHighlighter(marginBorder);
        // compoundHighlighter to share between table and tree
        tableHighlighters = new CompoundHighlighter();
        listHighlighters = new CompoundHighlighter();
        
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:22,代码来源:DecoratorDemo.java

示例3: createMatchPredicate

/**
 * Creates and returns a HighlightPredicate appropriate for the current
 * search result.
 * 
 * @return a HighlightPredicate appropriate for the current search result.
 */
protected HighlightPredicate createMatchPredicate() {
    return hasMatch() ? 
            new SearchPredicate(lastSearchResult.pattern, lastSearchResult.foundRow, 
                    convertColumnIndexToModel(lastSearchResult.foundColumn))
            : HighlightPredicate.NEVER;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:12,代码来源:AbstractSearchable.java

示例4: createMatchHighlighter

/**
 * Creates and returns the Highlighter used as match marker.
 * 
 * @return a highlighter used for matching
 */
protected AbstractHighlighter createMatchHighlighter() {
    return new ColorHighlighter(HighlightPredicate.NEVER, Color.YELLOW.brighter(), 
            null, Color.YELLOW.brighter(), 
            null);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:10,代码来源:AbstractSearchable.java

示例5: createMatchPredicate

@Override
protected HighlightPredicate createMatchPredicate() {
    return hasMatch() ? new SearchPredicate(lastSearchResult.getPattern()) : HighlightPredicate.NEVER;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:4,代码来源:FindVisualCheck.java


注:本文中的org.jdesktop.swingx.decorator.HighlightPredicate.NEVER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。