本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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);
}
示例5: createMatchPredicate
@Override
protected HighlightPredicate createMatchPredicate() {
return hasMatch() ? new SearchPredicate(lastSearchResult.getPattern()) : HighlightPredicate.NEVER;
}