JIDE 3.5.15

com.jidesoft.grid
Class AutoFilterUtils

java.lang.Object
  extended by com.jidesoft.grid.AutoFilterUtils

Deprecated. replaced by newly designed NestedTableHeader which could work well with AutoFilter function and also have the capability to accept text input.

@Deprecated
public class AutoFilterUtils
extends Object

This is a help class to install additional auto filter table row in a JideScrollPane for a JideTable to implement auto filtering feature.

This feature can be used together with NestedTableHeader so that you can have filtering and nest table header feature in one table, which is a supplement of AutoFilterTableHeader. However, this class cannot work together with TableScrollPane, while AutoFilterTableHeader can.


Nested Class Summary
protected  class AutoFilterUtils.AutoFilterRowTable
          Deprecated. The table to contain the new-added filter row.
protected  class AutoFilterUtils.AutoFilterRowTableModel
          Deprecated. The table model for the FilterRowTable.
protected  class AutoFilterUtils.TableWildcardFilter
          Deprecated. The filter used to filtering the table.
 
Field Summary
protected  IFilterableTableModel _filterableTableModel
          Deprecated. FilterableTableModel created for filtering purpose.
protected  JideTable _filterTable
          Deprecated. Filter table, where the customer can input filtering criteria for each column.
protected  JideTable _mainTable
          Deprecated. Main table in this class.
 
Constructor Summary
AutoFilterUtils()
          Deprecated. Default Constructor.
 
Method Summary
protected  String convertElementToString(int columnIndex, Object item)
          Deprecated. Converts the element from object to string.
protected  String convertElementToString(Object element)
          Deprecated. Converts the element from Object to string.
protected  String convertElementToString(Object element, int rowIndex, int columnIndex)
          Deprecated. Converts the element from Object to string.
protected  JideTable createAutoFilterRowTable(TableModel model)
          Deprecated. Create the FilterTable.
protected  TableModel createAutoFilterRowTableModel()
          Deprecated. Create a table model for FilterTable.
protected  IFilterableTableModel createDefaultFilterableTableModel(TableModel model)
          Deprecated. Creates the FilterableTableModel.
protected  TableFilter createFilter(String searchingText)
          Deprecated. Create filter with the input searching text.
protected  IFilterableTableModel createFilterableTableModel(TableModel model)
          Deprecated. Creates the FilterableTableModel to be used by AutoFilterTableHeader.
 Object[] getFilterableColumnIdentifiers()
          Deprecated. Get the filterable column identifiers.
 Color getFilterRowBackground()
          Deprecated. Get the background of the filter row.
 int getSearchingDelay()
          Deprecated. If it returns a positive number, it will wait for that many ms before doing the search.
 JideScrollPane install(JideTable table)
          Deprecated. Install the filtering row above the JideTable.
 boolean isIntelliHintsEnabled()
          Deprecated. Get the flag indicating if auto completion should be triggered while input searching text.
 boolean isObjectConverterManagerEnabled()
          Deprecated. Checks if the ObjectConverter will be used to convert element to string so that it can be compared with the searching text.
 void setFilterableColumnIdentifiers(Object[] filterableColumnIdentifiers)
          Deprecated. Set the filterable column identifiers.
 void setFilterRowBackground(Color filterRowBackground)
          Deprecated. Set the background of the filter row.
 void setIntelliHintsEnabled(boolean intelliHintsEnabled)
          Deprecated. Set the flag indicating if auto completion should be triggered while input searching text.
 void setObjectConverterManagerEnabled(boolean objectConverterManagerEnabled)
          Deprecated. Sets the flag if the ObjectConveter will be used to convert the element to String.
 void setSearchingDelay(int searchingDelay)
          Deprecated. If this flag is set to a positive number, it will wait for that many ms before doing the search.
 void uninstall(JideTable table)
          Deprecated. Uninstall the filtering row above the JideTable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mainTable

protected JideTable _mainTable
Deprecated. 
Main table in this class.


_filterTable

protected JideTable _filterTable
Deprecated. 
Filter table, where the customer can input filtering criteria for each column.


_filterableTableModel

protected IFilterableTableModel _filterableTableModel
Deprecated. 
FilterableTableModel created for filtering purpose.

Constructor Detail

AutoFilterUtils

public AutoFilterUtils()
Deprecated. 
Default Constructor.

Method Detail

install

public JideScrollPane install(JideTable table)
Deprecated. 
Install the filtering row above the JideTable.

Parameters:
table - the target JideTable
Returns:
the JideScrollPane which contains the table and the new-added filtering row

uninstall

public void uninstall(JideTable table)
Deprecated. 
Uninstall the filtering row above the JideTable.

Parameters:
table - the target JideTable

createFilterableTableModel

protected IFilterableTableModel createFilterableTableModel(TableModel model)
Deprecated. 
Creates the FilterableTableModel to be used by AutoFilterTableHeader. It returns null by default. You can override it to create your own FilterableTableModel.

Parameters:
model - the table model.
Returns:
the FilterableTableModel.

createDefaultFilterableTableModel

protected IFilterableTableModel createDefaultFilterableTableModel(TableModel model)
Deprecated. 
Creates the FilterableTableModel.

Parameters:
model - the table model.
Returns:
the FilterableTableModel.

createAutoFilterRowTableModel

protected TableModel createAutoFilterRowTableModel()
Deprecated. 
Create a table model for FilterTable. You can override this method to create your customized table model. For example, if you only need exact value match, you can create a table model exactly from the main table so that it's renderer and editor looks consistent with the main table.

Returns:
the table model.

createAutoFilterRowTable

protected JideTable createAutoFilterRowTable(TableModel model)
Deprecated. 
Create the FilterTable.

Parameters:
model - the table model of the FilterTable
Returns:
the filter table.

convertElementToString

protected String convertElementToString(int columnIndex,
                                        Object item)
Deprecated. 
Converts the element from object to string.

Parameters:
columnIndex - the column index
item - the item
Returns:
the string.

createFilter

protected TableFilter createFilter(String searchingText)
Deprecated. 
Create filter with the input searching text.

Parameters:
searchingText - the searching text
Returns:
the filter.

isObjectConverterManagerEnabled

public boolean isObjectConverterManagerEnabled()
Deprecated. 
Checks if the ObjectConverter will be used to convert element to string so that it can be compared with the searching text.

Returns:
true or false.

setObjectConverterManagerEnabled

public void setObjectConverterManagerEnabled(boolean objectConverterManagerEnabled)
Deprecated. 
Sets the flag if the ObjectConveter will be used to convert the element to String. Default is false. If true, convertElementToString method will use ObjectConverterManager to convert the element to String if underlying table model is ContextSensitiveTableModel.

Parameters:
objectConverterManagerEnabled - new value for the objectConverterManagerEnabled flag.

convertElementToString

protected String convertElementToString(Object element,
                                        int rowIndex,
                                        int columnIndex)
Deprecated. 
Converts the element from Object to string. It will use ObjectConverterManager to do the conversion if the underlying table model is ContextSensitiveTableModel. Otherwise, we will call super convertElementToString method.

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

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

convertElementToString

protected String convertElementToString(Object element)
Deprecated. 
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.

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.

getFilterableColumnIdentifiers

public Object[] getFilterableColumnIdentifiers()
Deprecated. 
Get the filterable column identifiers.

By default the value is null, which means every column is filterable. If the customer set a set, the columns not contained in the array will not be able to filter.

Returns:
the filterable column identifier list.

setFilterableColumnIdentifiers

public void setFilterableColumnIdentifiers(Object[] filterableColumnIdentifiers)
Deprecated. 
Set the filterable column identifiers.

Parameters:
filterableColumnIdentifiers - the filterable column identifier list
See Also:
getFilterableColumnIdentifiers()

isIntelliHintsEnabled

public boolean isIntelliHintsEnabled()
Deprecated. 
Get the flag indicating if auto completion should be triggered while input searching text.

By default the value is true.

Returns:
true if auto completion should be triggered while input searching text. Otherwise false.

setIntelliHintsEnabled

public void setIntelliHintsEnabled(boolean intelliHintsEnabled)
Deprecated. 
Set the flag indicating if auto completion should be triggered while input searching text.

Parameters:
intelliHintsEnabled - the flag
See Also:
isIntelliHintsEnabled()

getSearchingDelay

public int getSearchingDelay()
Deprecated. 
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)
Deprecated. 
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.

getFilterRowBackground

public Color getFilterRowBackground()
Deprecated. 
Get the background of the filter row.

Returns:
the background color.

setFilterRowBackground

public void setFilterRowBackground(Color filterRowBackground)
Deprecated. 
Set the background of the filter row.

Parameters:
filterRowBackground - the background color

JIDE 3.5.15