JIDE 3.5.15

com.jidesoft.grid
Class QuickFilterField

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.swing.LabeledTextField
                      extended by com.jidesoft.grid.QuickFilterField
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
QuickComboBoxFilterField, QuickListFilterField, QuickTableFilterField, QuickTreeFilterField

public abstract class QuickFilterField
extends LabeledTextField

QuickFilterField is an abstract class which can provide filter function to JList, JTable or JTree.

When user types, it will automatically do the filtering. Since we installed a timer on it. If user types very fast, it will accumulate them together and generate only one searching action. The timer can be controlled by setSearchingDelay(int). If you set it to -1, it will filter only if user presses ENTER key.

You can listen to property change event of PROPERTY_SEARCH_TEXT to detect any text change programmatically.

The abstract method applyFilter(String) will be implemented by subclasses to implement the filtering feature.

See Also:
Serialized Form

Nested Class Summary
 class QuickFilterField.FieldFilter
          This class is a subclass of Filter for QuickFilterField internal use.
 
Nested classes/interfaces inherited from class com.jidesoft.swing.LabeledTextField
LabeledTextField.PopupMenuCustomizer
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  Filter _filter
           
protected  String _searchingText
           
static String PROPERTY_CASE_SENSITIVE
           
static String PROPERTY_FROM_END
           
static String PROPERTY_FROM_START
           
static String PROPERTY_REGEX_ENABLED
           
static String PROPERTY_SEARCH_TEXT
           
static String PROPERTY_WILDCARD_ENABLED
           
 
Fields inherited from class com.jidesoft.swing.LabeledTextField
_button, _contextMenuKeyStroke, _customizer, _hintLabel, _hintText, _icon, _label, _labelText, _showHintTextWhenFocused, _textField
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
QuickFilterField()
          Creates an empty QuickFilterField.
 
Method Summary
protected  void adjustMismatchColor(boolean hasMatch)
          Adjusts background for the filter field to indicate if there is any matching record.
 void applyFilter()
           
abstract  void applyFilter(String text)
          Applies the filter.
protected  boolean compare(Object element, String searchingText)
          Checks if the element matches the searching text.
protected  boolean compare(String text, String searchingText)
          Checks if the element string matches the searching text.
protected  String convertElementToString(Object element)
          Converts the element from Object to string.
protected  AbstractButton createButton()
          Creates the button that appears after the text field.
protected  JidePopupMenu createContextMenu()
          Creates the context menu.
protected  Filter createFilter()
          Creates the filter that will be used in applyFilter(String) method.
static Icon getDefaultFilterIcon()
           
static Icon getDefaultResetIcon()
           
static Icon getDefaultResetRolloverIcon()
           
 Filter getFilter()
           
 Icon getFilterIcon()
          Gets the filter icon.
 Color getMismatchColor()
          Get the background color when the searching text doesn't match with any of the elements in the component.
 Icon getResetIcon()
          Gets the reset icon.
 Icon getResetRolloverIcon()
          Gets the reset icon when rollover.
 String getResourceString(String key)
          Gets the localized string from resource bundle.
 int getSearchingDelay()
          If it returns a positive number, it will wait for that many ms before doing the search.
 String getSearchingText()
          Gets the searching text.
 WildcardSupport getWildcardSupport()
          Gets the WildcardSupport.
protected  void initComponent()
           
 void installListeners()
           
 boolean isCaseSensitive()
          Checks if it used case sensitive search.
protected  boolean isConfigurationChanged()
          Get the flag indicating if the configure like case sensitive of the QuickFilterField is changed.
 boolean isFromEnd()
          This is a property of how to compare searching text with the data.
 boolean isFromStart()
          This is a property of how to compare searching text with the data.
 boolean isRegexEnabled()
          Get the flag if regular expression is used for searching.
 boolean isShowMismatchColor()
          Get the flag indicating if the filter field should change color to indicate the current searching result.
 boolean isWildcardEnabled()
          Checks if it supports wildcard in searching text.
 boolean matches(Object element, String searchingText)
          Checks if the element matches the searching text.
 void setCaseSensitive(boolean caseSensitive)
          Sets the case sensitive flag.
protected  void setConfigurationChanged(boolean configureChanged)
          Set the flag indicating if the configure like case sensitive of the QuickFilterField is changed.
static void setDefaultFilterIcon(Icon defaultFilterIcon)
           
static void setDefaultResetIcon(Icon defaultResetIcon)
           
static void setDefaultResetRolloverIcon(Icon defaultResetRolloverIcon)
           
 void setFilterIcon(Icon filterIcon)
          Sets the filter icon.
 void setFromEnd(boolean fromEnd)
          Sets the fromEnd property.
 void setFromStart(boolean fromStart)
          Sets the fromStart property.
 void setMismatchColor(Color mismatchColor)
          Set the color for mismatch.
 void setRegexEnabled(boolean regexEnabled)
          Set the flag if regular expression is used for searching.
 void setResetIcon(Icon resetIcon)
          Sets the reset icon.
 void setResetRolloverIcon(Icon icon)
          Sets the reset icon when rollover.
 void setSearchingDelay(int searchingDelay)
          If this flag is set to a positive number, it will wait for that many ms before doing the search.
 void setSearchingText(String text)
          Sets the searching text.
 void setShowMismatchColor(boolean showMismatchColor)
          Set the flag indicating if the filter field should change color to indicate the current searching result.
 void setWildcardEnabled(boolean wildcardEnabled)
          Enable or disable the usage of wildcard.
 void setWildcardSupport(WildcardSupport wildcardSupport)
          Sets the WildcardSupport.
 void uninstallListeners()
           
 
Methods inherited from class com.jidesoft.swing.LabeledTextField
calculateContextMenuLocation, createLabel, createTextField, customizePopupMenu, getBaseline, getButton, getContextMenuKeyStroke, getHintText, getIcon, getLabel, getLabelText, getPopupMenuCustomizer, getText, getTextField, initLayout, isShowHintTextWhenFocused, setColumns, setContextMenuKeyStroke, setEnabled, setHintText, setIcon, setLabelText, setPopupMenuCustomizer, setShowHintTextWhenFocused, setText, showContextMenu, updateUI
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_SEARCH_TEXT

public static final String PROPERTY_SEARCH_TEXT
See Also:
Constant Field Values

PROPERTY_CASE_SENSITIVE

public static final String PROPERTY_CASE_SENSITIVE
See Also:
Constant Field Values

PROPERTY_WILDCARD_ENABLED

public static final String PROPERTY_WILDCARD_ENABLED
See Also:
Constant Field Values

PROPERTY_REGEX_ENABLED

public static final String PROPERTY_REGEX_ENABLED
See Also:
Constant Field Values

PROPERTY_FROM_START

public static final String PROPERTY_FROM_START
See Also:
Constant Field Values

PROPERTY_FROM_END

public static final String PROPERTY_FROM_END
See Also:
Constant Field Values

_filter

protected Filter _filter

_searchingText

protected String _searchingText
Constructor Detail

QuickFilterField

public QuickFilterField()
Creates an empty QuickFilterField. This method is useless since QuickFilterField has to have a table model in order to work correctly. So we have this method in place mainly to make it JavaBean compatible. You must call corresponding set model method after you create QuickFilterField using this constructor.

Method Detail

getSearchingDelay

public int getSearchingDelay()
If it returns a positive number, it will wait for that many ms before doing the search. When the searching is complex, this flag will be useful to make the searching efficient. In the other words, if user types in several keys very quickly, there will be only one search. If it returns 0, each key will generate a search. If it returns -1 or a negative number, it will never automatically generate a search unless ENTER key is pressed.

Returns:
the number of ms delay before searching starts.

setSearchingDelay

public void setSearchingDelay(int searchingDelay)
If this flag is set to a positive number, it will wait for that many ms before doing the search. When the searching is complex, this flag will be useful to make the searching efficient. In the other words, if user types in several keys very quickly, there will be only one search. If this flag is set to 0, each key will generate a search with no delay. You can also set it to a negative number such as -1. If so, it will never generate a search unless user presses the ENTER key.

Parameters:
searchingDelay - the number of ms delay before searching start.

initComponent

protected void initComponent()
Overrides:
initComponent in class LabeledTextField

installListeners

public void installListeners()

uninstallListeners

public void uninstallListeners()

getDefaultResetIcon

public static Icon getDefaultResetIcon()

setDefaultResetIcon

public static void setDefaultResetIcon(Icon defaultResetIcon)

getDefaultFilterIcon

public static Icon getDefaultFilterIcon()

setDefaultFilterIcon

public static void setDefaultFilterIcon(Icon defaultFilterIcon)

getDefaultResetRolloverIcon

public static Icon getDefaultResetRolloverIcon()

setDefaultResetRolloverIcon

public static void setDefaultResetRolloverIcon(Icon defaultResetRolloverIcon)

getResetIcon

public Icon getResetIcon()
Gets the reset icon. It is used as a button to the right of the text field. Clicking on it will clear any searching text. There is a default reset icon if you never call setResetIcon(javax.swing.Icon) to set a new one.

Returns:
the reset icon.

setResetIcon

public void setResetIcon(Icon resetIcon)
Sets the reset icon. It is used as a button to the right of the text field. Clicking on it will clear any searching text.

Parameters:
resetIcon - the reset icon.

getResetRolloverIcon

public Icon getResetRolloverIcon()
Gets the reset icon when rollover. It is used as a button to the right of the text field when mouse is over the button.

Returns:
the reset icon when rollover.

setResetRolloverIcon

public void setResetRolloverIcon(Icon icon)
Sets the reset icon when rollover. It is used as a button to the right of the text field.

Parameters:
icon - the reset icon when rollover.

getFilterIcon

public Icon getFilterIcon()
Gets the filter icon. It is used as a label to the left of the text field. Clicking on it will show a context menu which has the option of this field. There is a default filter icon if you never call setFilterIcon(javax.swing.Icon) to set a new one.

Returns:
the filter icon.

setFilterIcon

public void setFilterIcon(Icon filterIcon)
Sets the filter icon. It is used as a label to the left of the text field.

Parameters:
filterIcon - the filter icon

createButton

protected AbstractButton createButton()
Description copied from class: LabeledTextField
Creates the button that appears after the text field. By default it returns null so there is no button. Subclass can override it to create their own button. A typical usage of this is to create a browse button to browse a file or directory.

Overrides:
createButton in class LabeledTextField
Returns:
the button.

createFilter

protected Filter createFilter()
Creates the filter that will be used in applyFilter(String) method.

By default, we will create a filter like this.

 return new AbstractFilter() {
     public boolean isValueFiltered(Object value) {
          return !compare(value, _searchingText);
     }
 };
 
You can override it to create your filter. For example, you can create an AbstractTableFilter if the isValueFiltered implementation needs to know the actual row and column index.

Returns:
the filter.

getFilter

public Filter getFilter()

createContextMenu

protected JidePopupMenu createContextMenu()
Creates the context menu. By default, it will add four menu items to the context menu. You can always override this class to add more menu items. The menu item can be looked up by name using JideSwingUtilities.findFirstComponentByName(java.awt.Container, String). The names are "Filter.caseSensitive", "Filter.caseInsensitive", "Filter.matchFromStart" and "Filter.matchAnywhere" respectively.

Overrides:
createContextMenu in class LabeledTextField
Returns:
the context menu.

applyFilter

public abstract void applyFilter(String text)
Applies the filter.

Parameters:
text - the searching text.

applyFilter

public void applyFilter()

setConfigurationChanged

protected void setConfigurationChanged(boolean configureChanged)
Set the flag indicating if the configure like case sensitive of the QuickFilterField is changed.

Parameters:
configureChanged - the flag

isConfigurationChanged

protected boolean isConfigurationChanged()
Get the flag indicating if the configure like case sensitive of the QuickFilterField is changed.

This flag will be set to true automatically every time the customer change the settings by UI then switch it back to false right after applyFilter() is invoked.

Returns:
the flag

convertElementToString

protected String convertElementToString(Object element)
Converts the element from Object to string. By default it will use toString to do the conversion if the element is not null. If it's null, it will return empty string. This method is used by compare(Object, String) to convert the first parameter to string then call compare(String, String) to do the comparison.

You can subclass and override this method to do your own conversion if needed.

Parameters:
element - the element to be converted to string.
Returns:
the string representation of the element. "" if the element is null. Otherwise it will call toString to do the conversion.

compare

protected boolean compare(Object element,
                          String searchingText)
Checks if the element matches the searching text.

Parameters:
element - the element to be compared.
searchingText - the text in the QuickFilterField.
Returns:
true if matches.

matches

public boolean matches(Object element,
                       String searchingText)
Checks if the element matches the searching text. This method simply calls compare(Object, String) but we need a public API so that user can call it to figure out if the element matches with the searching text from outside.

Parameters:
element - the element to be compared.
searchingText - the text in the QuickFilterField.
Returns:
true if matches.

compare

protected boolean compare(String text,
                          String searchingText)
Checks if the element string matches the searching text. Different from compare(Object, String), this method is after the element has been converted to string using convertElementToString(Object).

Here is the default implementation in case you need to provide your own way to compare.

     return searchingText == null || (isFromStart() ? elementText.startsWith(searchingText) :
 elementText.indexOf(searchingText) != -1);
 

Parameters:
text - the text converted from the element.
searchingText - the text in the QuickFilterField.
Returns:
true if matches.

isCaseSensitive

public boolean isCaseSensitive()
Checks if it used case sensitive search. By default it's false.

Returns:
if it's case sensitive.

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Sets the case sensitive flag. By default, it's false meaning it's a case insensitive search.

Parameters:
caseSensitive - true if you want the filtering to be case sensitive. Otherwise false.

isFromStart

public boolean isFromStart()
This is a property of how to compare searching text with the data. If it is true, it will use String.startsWith(String) to do the comparison. Otherwise, it will use String.indexOf(String) to do the comparison.

Returns:
true or false.

setFromStart

public void setFromStart(boolean fromStart)
Sets the fromStart property.

Parameters:
fromStart - true if the comparison matches from the start of the text only. Otherwise false. The difference is if true, it will use String's startWith method to match. If false, it will use indedxOf method.

isFromEnd

public boolean isFromEnd()
This is a property of how to compare searching text with the data. If it is true, it will use String.endsWith(String) to do the comparison. Otherwise, it will use String.indexOf(String) to do the comparison.

Returns:
true or false.

setFromEnd

public void setFromEnd(boolean fromEnd)
Sets the fromEnd property.

Parameters:
fromEnd - true if the comparison matches from the end of the text only. Otherwise false. The difference is if true, it will use String's endWith method to match. If false, it will use indedxOf method.

setSearchingText

public void setSearchingText(String text)
Sets the searching text.

Parameters:
text - the searching text.

getSearchingText

public String getSearchingText()
Gets the searching text.

Returns:
the searching text.

getResourceString

public String getResourceString(String key)
Gets the localized string from resource bundle. Subclass can override it to provide its own string. Available keys are defined in grid.properties that begins with "Filter." and lucene.properties that begins with "Lucene".

Parameters:
key - the key to the resource.
Returns:
the localized string.

isWildcardEnabled

public boolean isWildcardEnabled()
Checks if it supports wildcard in searching text. By default it is true which means user can type in "*" or "?" to match with any characters or any character. If it's false, it will treat "*" or "?" as a regular character.

If you set this flag to true, regular expression enabled flag would be set to false automatically.

Returns:
true if it supports wildcard.
See Also:
setRegexEnabled(boolean)

setWildcardEnabled

public void setWildcardEnabled(boolean wildcardEnabled)
Enable or disable the usage of wildcard.

Parameters:
wildcardEnabled - true or false
See Also:
isWildcardEnabled()

isRegexEnabled

public boolean isRegexEnabled()
Get the flag if regular expression is used for searching.

By default, the flag is false. You could explicitly set this flag to true if you want to use regular expression.

Returns:
true if regular expression is enabled. Otherwise false.

setRegexEnabled

public void setRegexEnabled(boolean regexEnabled)
Set the flag if regular expression is used for searching.

If you set this flag to true, wildcard enabled flag would be set to false automatically.

Parameters:
regexEnabled - the flag
See Also:
isRegexEnabled(), setWildcardEnabled(boolean)

getWildcardSupport

public WildcardSupport getWildcardSupport()
Gets the WildcardSupport. If user never sets it, DefaultWildcardSupport will be used.

Returns:
the WildcardSupport.

setWildcardSupport

public void setWildcardSupport(WildcardSupport wildcardSupport)
Sets the WildcardSupport. This class allows you to define what wildcards to use and how to convert the wildcard strings to a regular expression string which is eventually used to search.

Parameters:
wildcardSupport - the new WildCardSupport.

adjustMismatchColor

protected void adjustMismatchColor(boolean hasMatch)
Adjusts background for the filter field to indicate if there is any matching record.

Parameters:
hasMatch - if there is any match record with current searching text.

getMismatchColor

public Color getMismatchColor()
Get the background color when the searching text doesn't match with any of the elements in the component.

Returns:
the foreground color for mismatch. If you never call setMismatchColor(java.awt.Color). red color will be used.

setMismatchColor

public void setMismatchColor(Color mismatchColor)
Set the color for mismatch.

Parameters:
mismatchColor - the mismatch color

isShowMismatchColor

public boolean isShowMismatchColor()
Get the flag indicating if the filter field should change color to indicate the current searching result.

The default value is false to keep original behavior.

Returns:
the flag.

setShowMismatchColor

public void setShowMismatchColor(boolean showMismatchColor)
Set the flag indicating if the filter field should change color to indicate the current searching result.

Parameters:
showMismatchColor - the flag

JIDE 3.5.15