Package org.jdesktop.swingx.decorator.HighlightPredicate

Examples of org.jdesktop.swingx.decorator.HighlightPredicate.NotHighlightPredicate


     * @param rowsPerGroup the number of rows in a group
     * @return a Highlighter striping every second row group background.
     */
    public static Highlighter createAlternateStriping(int rowsPerGroup) {
        HighlightPredicate predicate = new RowGroupHighlightPredicate(rowsPerGroup);
        ColorHighlighter first = new ColorHighlighter(new NotHighlightPredicate(predicate), Color.WHITE, null);
        ColorHighlighter hl = new UIColorHighlighter(predicate);
        return new CompoundHighlighter(first, hl);
    }
View Full Code Here


     * @param linesPerStripe the number of rows in a group
     * @return a Highlighter striping every second row group background.
     */
    public static Highlighter createAlternateStriping(Color baseBackground, Color alternateBackground, int linesPerStripe) {
        HighlightPredicate predicate = new RowGroupHighlightPredicate(linesPerStripe);
        ColorHighlighter base = new ColorHighlighter(new NotHighlightPredicate(predicate), baseBackground, null);
        ColorHighlighter alternate = new ColorHighlighter(predicate, alternateBackground, null);
       
        return new CompoundHighlighter(base, alternate);
    }
View Full Code Here

           
        };
        // compound per-predicate and add as column highlighter to the factory
        factory.addHighlighter("nomineesColumn", new CompoundHighlighter(
                new CompoundHighlighter(winnerPredicate, winner, winnerToolTip),
                new CompoundHighlighter(new NotHighlightPredicate(winnerPredicate),
                        nominee, nomineeToolTip)));
//        </snip>

    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.decorator.HighlightPredicate.NotHighlightPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.