JIDE 3.5.15

com.jidesoft.combobox
Class AbstractComboBoxSearchable

java.lang.Object
  extended by com.jidesoft.swing.Searchable
      extended by com.jidesoft.combobox.AbstractComboBoxSearchable
All Implemented Interfaces:
PropertyChangeListener, EventListener, ListDataListener, PopupMenuListener
Direct Known Subclasses:
ListComboBoxSearchable, TableComboBoxSearchable, TreeComboBoxSearchable

public abstract class AbstractComboBoxSearchable
extends Searchable
implements ListDataListener, PropertyChangeListener, PopupMenuListener

Abstract Searchable for AbstractComboBoxes, provides the convertElementToString method and reset the popup if the combobox model changes


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.swing.Searchable
Searchable.SearchField, Searchable.SearchPopup
 
Field Summary
 
Fields inherited from class com.jidesoft.swing.Searchable
_component, _componentListener, _focusListener, _keyListener, _matchCount, CLIENT_PROPERTY_SEARCHABLE, listenerList, PROPERTY_SEARCH_TEXT
 
Constructor Summary
AbstractComboBoxSearchable(AbstractComboBox comboBox)
           
 
Method Summary
 void contentsChanged(ListDataEvent e)
           
protected  String convertElementToString(Object object)
          Converts the element in to a string using the AbstractComboBox's Converter and ConverterContex.
protected  AbstractComboBox getComboBox()
           
 void intervalAdded(ListDataEvent e)
           
 void intervalRemoved(ListDataEvent e)
           
 boolean isShowPopupDuringSearching()
          Checks if the popup is showing during searching.
 void popupMenuCanceled(PopupMenuEvent e)
           
 void popupMenuWillBecomeInvisible(PopupMenuEvent e)
           
 void popupMenuWillBecomeVisible(PopupMenuEvent e)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void setShowPopupDuringSearching(boolean showPopupDuringSearching)
          Sets the property which determines if the popup should be shown during searching.
 void uninstallListeners()
          Uninstall the listeners that installed before.
 
Methods inherited from class com.jidesoft.swing.Searchable
addPropertyChangeListener, addSearchableListener, adjustSelectedIndex, cancelHighlightAll, compare, compare, convertToString, createComponentListener, createFocusListener, createKeyListener, createSearchPopup, findAll, findFirst, findFromCursor, findLast, findNext, findPrevious, firePropertyChangeEvent, fireSearchableEvent, getBackground, getComponent, getCurrentIndex, getCursor, getElementAt, getElementAtAsString, getElementCount, getForeground, getMismatchForeground, getPopupLocation, getPopupLocationRelativeTo, getPopupTimeout, getResourceString, getSearchable, getSearchableListeners, getSearchableProvider, getSearchingDelay, getSearchingText, getSearchLabel, getSelectedIndex, getWildcardSupport, hidePopup, highlightAll, installListeners, isActivateKey, isCaseSensitive, isCountMatch, isDeactivateKey, isFindFirstKey, isFindLastKey, isFindNextKey, isFindPreviousKey, isFromStart, isHeavyweightComponentEnabled, isHideSearchPopupOnEvent, isIncrementalSelectKey, isNavigationKey, isPopupVisible, isProcessModelChangeEvent, isRepeats, isReverseOrder, isSearchableListenerInstalled, isSelectAllKey, isWildcardEnabled, keyTypedOrPressed, removePropertyChangeListener, removeSearchableListener, reverseFindFromCursor, searchingTextEmpty, select, setBackground, setCaseSensitive, setCountMatch, setCursor, setCursor, setForeground, setFromStart, setHeavyweightComponentEnabled, setHideSearchPopupOnEvent, setMismatchForeground, setPopupLocation, setPopupLocationRelativeTo, setPopupTimeout, setProcessModelChangeEvent, setRepeats, setReverseOrder, setSearchableProvider, setSearchingDelay, setSearchLabel, setSelectedIndex, setWildcardEnabled, setWildcardSupport, showPopup, textChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComboBoxSearchable

public AbstractComboBoxSearchable(AbstractComboBox comboBox)
Method Detail

getComboBox

protected AbstractComboBox getComboBox()

uninstallListeners

public void uninstallListeners()
Description copied from class: Searchable
Uninstall the listeners that installed before. This method is never called because we don't have the control of the life cycle of the component. However you can call this method if you don't want the component to be searchable any more.

Overrides:
uninstallListeners in class Searchable

convertElementToString

protected String convertElementToString(Object object)
Converts the element in to a string using the AbstractComboBox's Converter and ConverterContex. If the Converter is null, the object's toString() method is used, or an empty string is returned if the object is null.

Specified by:
convertElementToString in class Searchable
Parameters:
object - the object to be converted
Returns:
Returns the string representing the element.

contentsChanged

public void contentsChanged(ListDataEvent e)
Specified by:
contentsChanged in interface ListDataListener

intervalAdded

public void intervalAdded(ListDataEvent e)
Specified by:
intervalAdded in interface ListDataListener

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Specified by:
intervalRemoved in interface ListDataListener

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(PopupMenuEvent e)
Specified by:
popupMenuWillBecomeVisible in interface PopupMenuListener

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
Specified by:
popupMenuWillBecomeInvisible in interface PopupMenuListener

popupMenuCanceled

public void popupMenuCanceled(PopupMenuEvent e)
Specified by:
popupMenuCanceled in interface PopupMenuListener

isShowPopupDuringSearching

public boolean isShowPopupDuringSearching()
Checks if the popup is showing during searching.

Returns:
true if popup is visible during searching.

setShowPopupDuringSearching

public void setShowPopupDuringSearching(boolean showPopupDuringSearching)
Sets the property which determines if the popup should be shown during searching.

Parameters:
showPopupDuringSearching - the flag

JIDE 3.5.15