~ubuntu-branches/ubuntu/natty/libswingx-java/natty

« back to all changes in this revision

Viewing changes to src/java/org/jdesktop/swingx/search/AbstractSearchable.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2010-07-26 12:11:27 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100726121127-k0d3b21nhja0dn93
Tags: 1:1.6.1-1
* New upstream release.
* Switch to 3.0 (quilt) format.
* Bump Standards-Version to 3.9.1: no changes needed.
* Drop Depends on JRE: not requested anymore by new Java Policy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: AbstractSearchable.java 3194 2009-01-21 11:39:19Z kleopatra $
 
2
 * $Id: AbstractSearchable.java 3561 2009-11-30 12:33:56Z kleopatra $
3
3
 *
4
4
 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5
5
 * Santa Clara, California 95054, U.S.A. All rights reserved.
457
457
    protected boolean hasMatch() {
458
458
        return hasMatch(lastSearchResult);
459
459
    }
 
460
 
460
461
    /**
461
 
     * Returns a boolean indicating whether a match should be marked with a Highlighter.
 
462
     * Returns a boolean indicating whether a match should be marked with a
 
463
     * Highlighter. Typically, if true, the match highlighter is used, otherwise
 
464
     * a match is indicated by selection.
462
465
     * <p>
463
 
     * This implementation returns true if the target component has a client property for
464
 
     * key MATCH_HIGHLIGHTER with value Boolean.TRUE, false otherwise.
465
 
     * 
466
 
     * @return a boolean indicating whether a match should be marked by a using a Highlighter.
 
466
     * 
 
467
     * This implementation returns true if the target component has a client
 
468
     * property for key MATCH_HIGHLIGHTER with value Boolean.TRUE, false
 
469
     * otherwise. The SearchFactory sets that client property in incremental
 
470
     * search mode, that is when triggering a search via the JXFindBar as
 
471
     * installed by the factory. 
 
472
     * 
 
473
     * @return a boolean indicating whether a match should be marked by a using
 
474
     *         a Highlighter.
 
475
     *         
 
476
     * @see SearchFactory        
467
477
     */
468
478
    protected boolean markByHighlighter() {
469
 
        return Boolean.TRUE.equals(getTarget().getClientProperty(MATCH_HIGHLIGHTER));
 
479
        return Boolean.TRUE.equals(getTarget().getClientProperty(
 
480
                MATCH_HIGHLIGHTER));
470
481
    }
471
482
 
472
483
    /**
479
490
        removeHighlighter(matchHighlighter);
480
491
        matchHighlighter = hl;
481
492
        if (markByHighlighter()) {
482
 
            getConfiguredMatchHighlighter();
 
493
            moveMatchMarker();
483
494
        }
484
495
    }
485
496