Class AbstractQuickSearchPanel

    • Constructor Detail

      • AbstractQuickSearchPanel

        public AbstractQuickSearchPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the listeners.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class BasePanel
      • addChangeListener

        public void addChangeListener​(ChangeListener l)
        Adds the change listener to notify whenever the selected item changes.
        Parameters:
        l - the listener to add
      • removeChangeListener

        public void removeChangeListener​(ChangeListener l)
        Removes the change listener from notifications whenever the selected item changes.
        Parameters:
        l - the listener to remove
      • notifyChangeListeners

        protected void notifyChangeListeners()
        Notifies all change listeners.
      • addSelectionListener

        public void addSelectionListener​(ListSelectionListener l)
        Adds the selection listener to notify whenever the user selects an item (double click or enter).
        Parameters:
        l - the listener to add
      • removeSelectionListener

        public void removeSelectionListener​(ListSelectionListener l)
        Removes the selection listener from notifications whenever the user selects an item (double click or enter).
        Parameters:
        l - the listener to remove
      • notifySelectionListeners

        protected void notifySelectionListeners()
        Notifies all selection listeners.
      • addCancelListener

        public void addCancelListener​(ChangeListener l)
        Adds the cancel listener to notify when the user hits ESC.
        Parameters:
        l - the listener to add
      • removeCancelListener

        public void removeCancelListener​(ChangeListener l)
        Removes the cancel listener from notifications when the user hits ESC.
        Parameters:
        l - the listener to remove
      • notifyCancelListeners

        protected void notifyCancelListeners()
        Notifies all cancel listeners.
      • setItemFilter

        public void setItemFilter​(AbstractItemFilter value)
        Sets the item filter to use for filtering the items.
        Parameters:
        value - the filter to use
      • getItemFilter

        public AbstractItemFilter getItemFilter()
        Returns the current item filter in use.
        Returns:
        the filter in use
      • acceptItem

        protected boolean acceptItem​(String item)
        Checks whether the item should be used.
        Parameters:
        item - the item to check
        Returns:
        true if to use
      • updateModel

        protected void updateModel​(String[] items)
        Updates the model, applies the item filter to the items.
        Parameters:
        items - the items to filter and then use
      • getSelectedItemIndex

        public int getSelectedItemIndex()
        Returns the index of the user-selected item in the original list of items.
        Returns:
        the index
      • clearSearch

        public void clearSearch()
        Clears the search box.
      • requestFocus

        public void requestFocus()
        Requests the search box to get the focus.
        Overrides:
        requestFocus in class JComponent