Package org.jdesktop.swingx.decorator

Examples of org.jdesktop.swingx.decorator.SearchPredicate


     *
     * @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;
    }
View Full Code Here


     * @param height the height of painted highlights
     * @return a <code>List</code> of highlight areas to paint
     */
    protected List<Rectangle> createHighlightAreas(String text, FontMetrics fm,
            int xOffset, int height) {
        SearchPredicate predicate = (SearchPredicate) getHighlightPredicate();
        Matcher matcher = predicate.getPattern().matcher(text);

        List<Rectangle> highlightAreas = null;
        int startFrom = 0;
        while (startFrom < text.length() && matcher.find(startFrom)) {
            if (highlightAreas == null) {
View Full Code Here

     * called after pattern changed.
     *
     * @param pattern
     */
    protected void updatePattern(Pattern pattern) {
        HighlightPredicate predicate = new SearchPredicate(pattern, -1, -1);
        matchHighlighter.setHighlightPredicate(predicate);
        tablePatternFilter = RowFilters.regexFilter(pattern);
        listPatternFilter = RowFilters.regexFilter(pattern);
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.decorator.SearchPredicate

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.