Module tvbrowser

Class FindAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.KeyListener, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.EventListener, javax.swing.Action, javax.swing.event.DocumentListener
    Direct Known Subclasses:
    TextComponentFindAction

    public abstract class FindAction
    extends javax.swing.AbstractAction
    implements javax.swing.event.DocumentListener, java.awt.event.KeyListener, java.lang.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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean controlDown  
      protected boolean metaDown  
      protected boolean shiftDown  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      FindAction​(javax.swing.JComponent comp, boolean startAtKeytype)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent ae)  
      protected abstract boolean changed​(javax.swing.JComponent comp, java.lang.String text, javax.swing.text.Position.Bias bias)  
      void changedUpdate​(javax.swing.event.DocumentEvent e)  
      javax.swing.JComponent getComponent()  
      protected javax.swing.JLabel getMessageLabel()  
      protected javax.swing.JTextField getSearchField()  
      protected java.lang.Thread getThread()  
      protected int getWaitTime()  
      protected void initSearch​(java.awt.event.ActionEvent ae)  
      void insertUpdate​(javax.swing.event.DocumentEvent e)  
      void installKeyListener​(java.awt.Component comp)  
      protected boolean isBlockAutoClosing()  
      boolean isIgnoreCase()  
      void keyPressed​(java.awt.event.KeyEvent ke)  
      void keyReleased​(java.awt.event.KeyEvent e)  
      void keyTyped​(java.awt.event.KeyEvent e)  
      void next()
      Go to the next match
      void prev()
      Go to the previous match
      void removeUpdate​(javax.swing.event.DocumentEvent e)  
      protected void reset()  
      protected void setBlockAutoClosing​(boolean value)  
      void setIgnoreCase​(boolean ignoreCase)  
      protected void setWaitTime​(int value)  
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
      • Methods inherited from interface java.lang.Runnable

        run
    • Field Detail

      • shiftDown

        protected boolean shiftDown
      • controlDown

        protected boolean controlDown
      • metaDown

        protected boolean metaDown
    • Constructor Detail

      • FindAction

        public FindAction​(javax.swing.JComponent comp,
                          boolean startAtKeytype)
    • Method Detail

      • setBlockAutoClosing

        protected void setBlockAutoClosing​(boolean value)
      • isBlockAutoClosing

        protected boolean isBlockAutoClosing()
      • getThread

        protected java.lang.Thread getThread()
      • getWaitTime

        protected int getWaitTime()
      • setWaitTime

        protected void setWaitTime​(int value)
      • getMessageLabel

        protected javax.swing.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​(java.awt.event.ActionEvent ae)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • initSearch

        protected void initSearch​(java.awt.event.ActionEvent ae)
      • changed

        protected abstract boolean changed​(javax.swing.JComponent comp,
                                           java.lang.String text,
                                           javax.swing.text.Position.Bias bias)
      • insertUpdate

        public void insertUpdate​(javax.swing.event.DocumentEvent e)
        Specified by:
        insertUpdate in interface javax.swing.event.DocumentListener
      • removeUpdate

        public void removeUpdate​(javax.swing.event.DocumentEvent e)
        Specified by:
        removeUpdate in interface javax.swing.event.DocumentListener
      • changedUpdate

        public void changedUpdate​(javax.swing.event.DocumentEvent e)
        Specified by:
        changedUpdate in interface javax.swing.event.DocumentListener
      • keyPressed

        public void keyPressed​(java.awt.event.KeyEvent ke)
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
      • keyTyped

        public void keyTyped​(java.awt.event.KeyEvent e)
        Specified by:
        keyTyped in interface java.awt.event.KeyListener
      • keyReleased

        public void keyReleased​(java.awt.event.KeyEvent e)
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
      • getSearchField

        protected javax.swing.JTextField getSearchField()
      • getComponent

        public javax.swing.JComponent getComponent()
      • installKeyListener

        public void installKeyListener​(java.awt.Component comp)