org.objectweb.jac.aspects.gui.swing
Class SearchTool

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.swing.SearchTool
All Implemented Interfaces:
EventListener, KeyListener

public class SearchTool
extends Object
implements KeyListener

A search tool for the SHEditor.


Constructor Summary
SearchTool(SHEditor editor, int searchFrom)
           
 
Method Summary
protected  void abort()
          Quit search tool, reset position to saved one.
protected  void done()
          Quit search tool, sets the position at the beginning of the found occurrence.
protected  void found(int found)
          Repaint editor when an occurrence is found
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
protected  void search()
          Finds an occurence
protected  void searchNext()
          Finds the next occurrence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchTool

public SearchTool(SHEditor editor,
                  int searchFrom)
Parameters:
editor - search in this editor's text
searchFrom - position to start searching from
Method Detail

searchNext

protected void searchNext()
Finds the next occurrence


search

protected void search()
Finds an occurence


found

protected void found(int found)
Repaint editor when an occurrence is found


done

protected void done()
Quit search tool, sets the position at the beginning of the found occurrence.


abort

protected void abort()
Quit search tool, reset position to saved one.


keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener