util.ui.findasyoutype
Class FindAction
java.lang.Object
javax.swing.AbstractAction
util.ui.findasyoutype.FindAction
- All Implemented Interfaces:
- ActionListener, KeyListener, Serializable, Cloneable, Runnable, EventListener, Action, DocumentListener
- Direct Known Subclasses:
- TextComponentFindAction
public abstract class FindAction
- extends AbstractAction
- implements DocumentListener, KeyListener, Runnable
This TextComponentFindAction is based on the Implementation of Santhosh
For Details look here:
http://jroller.com/page/santhosh/20050707#incremental_search_the_framework
- Author:
- Santhosh
Changed for support of a search bar instead of a search popup by René Mach:
- added automatically closing Thread
- removed Popup because the search field will be in a search bar
- removed up and down key for finding matches because of the buttons in the search bar
- added message label
- added methods for the search bar
- removed redundant constructor
- See Also:
- Serialized Form
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Methods inherited from interface java.lang.Runnable |
run |
shiftDown
protected boolean shiftDown
controlDown
protected boolean controlDown
metaDown
protected boolean metaDown
FindAction
public FindAction(JComponent comp,
boolean startAtKeytype)
setBlockAutoClosing
protected void setBlockAutoClosing(boolean value)
isBlockAutoClosing
protected boolean isBlockAutoClosing()
getThread
protected Thread getThread()
getWaitTime
protected int getWaitTime()
setWaitTime
protected void setWaitTime(int value)
getMessageLabel
protected JLabel getMessageLabel()
reset
protected void reset()
prev
public void prev()
- Go to the previous match
next
public void next()
- Go to the next match
isIgnoreCase
public boolean isIgnoreCase()
setIgnoreCase
public void setIgnoreCase(boolean ignoreCase)
actionPerformed
public void actionPerformed(ActionEvent ae)
- Specified by:
actionPerformed in interface ActionListener
initSearch
protected void initSearch(ActionEvent ae)
changed
protected abstract boolean changed(JComponent comp,
String text,
Position.Bias bias)
insertUpdate
public void insertUpdate(DocumentEvent e)
- Specified by:
insertUpdate in interface DocumentListener
removeUpdate
public void removeUpdate(DocumentEvent e)
- Specified by:
removeUpdate in interface DocumentListener
changedUpdate
public void changedUpdate(DocumentEvent e)
- Specified by:
changedUpdate in interface DocumentListener
keyPressed
public void keyPressed(KeyEvent ke)
- 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
getSearchField
protected JTextField getSearchField()
getComponent
public JComponent getComponent()
installKeyListener
public void installKeyListener(Component comp)
TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)