[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-devel
Subject:    [ jEdit-devel ] Re: incremental search could change background of the textfield when the text wasn't
From:       Matthieu Casanova <chocolat.mou () gmail ! com>
Date:       2004-09-21 13:46:00
Message-ID: cdeda75f040921064641e45fcf () mail ! gmail ! com
[Download RAW message or body]

On Fri, 17 Sep 2004 11:02:50 +0200, Matthieu Casanova
<chocolat.mou@gmail.com> wrote:
> Hi, I think it would be nice if the Incremental search could change
> the color of the textfield in red for example when the text wasn't
> found.
> I modified a copy of org.gjt.sp.jedit.search.SearchBar (from the last
> update in cvs of course) to do that, it seems to work fine for me.
> Here is my modified file (it's the first time I post on this mailing
> list, is it the good way to report some ideas ?)
> 
> Matthieu

I think the attached file was removed, so here is the changes in the
class. Only in the Timer that handle the incremental search ...


timer = new Timer(0,new ActionListener()
{
 public void actionPerformed(ActionEvent evt)
 {
   if(!incrementalSearch(searchStart,searchReverse))
   {
     if(!incrementalSearch(
       (searchReverse
       ? view.getBuffer().getLength()
       : 0),searchReverse))
     {
       // not found at all.
       find.setBackground(Color.red);
       view.getStatus().setMessageAndClear(
         jEdit.getProperty(
         "view.status.search-not-found"));
     } else {
       find.setBackground(Color.white);
     }
   } else {
     find.setBackground(Color.white);
   }
 }
});


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic