de.jaret.util.ui.table.filter
Class DefaultAutoFilter

java.lang.Object
  extended by de.jaret.util.misc.PropertyObservableBase
      extended by de.jaret.util.ui.table.filter.AbstractAutoFilter
          extended by de.jaret.util.ui.table.filter.DefaultAutoFilter
All Implemented Interfaces:
de.jaret.util.misc.PropertyObservable, IAutoFilter, IRowFilter, java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class DefaultAutoFilter
extends AbstractAutoFilter
implements IAutoFilter, org.eclipse.swt.events.SelectionListener

Default implementation of the IAutofilter interface rendering a combobox with a simple selection mechanism.

Version:
$Id: DefaultAutoFilter.java 389 2007-04-30 14:06:51Z olk $
Author:
kliem

Field Summary
protected  org.eclipse.swt.custom.CCombo _combo
          control used for the filter -> coombobox.
protected static java.lang.String TEXT_FILTER_ALL
          text: to be externalized.
protected static java.lang.String TEXT_FILTER_EMPTY
          text: to be externalized.
protected static java.lang.String TEXT_FILTER_NONEMPTY
          text: to be externalized.
 
Fields inherited from class de.jaret.util.ui.table.filter.AbstractAutoFilter
_column, _table
 
Fields inherited from class de.jaret.util.misc.PropertyObservableBase
_propertyChangeSupport
 
Constructor Summary
DefaultAutoFilter()
           
 
Method Summary
 void dispose()
          Dispose all resources.
 org.eclipse.swt.widgets.Control getControl()
          Get the control representing the autofilter (most probably a combo box).
 boolean isInResult(IRow row)
          Check whether the row is in the resulting list of rows.
 void reset()
          Remove any selection (usually revert to a setting that filters nothing).
 void update()
          Update/create the control and internal state.
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
          
 void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
           Inform everyone the filter changed.
 
Methods inherited from class de.jaret.util.ui.table.filter.AbstractAutoFilter
getColFilterStrings, setColumn, setTable
 
Methods inherited from class de.jaret.util.misc.PropertyObservableBase
addPropertyChangeListener, firePropertyChange, isRealModification, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jaret.util.ui.table.filter.IAutoFilter
setColumn, setTable
 
Methods inherited from interface de.jaret.util.misc.PropertyObservable
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

TEXT_FILTER_ALL

protected static final java.lang.String TEXT_FILTER_ALL
text: to be externalized.

See Also:
Constant Field Values

TEXT_FILTER_EMPTY

protected static final java.lang.String TEXT_FILTER_EMPTY
text: to be externalized.

See Also:
Constant Field Values

TEXT_FILTER_NONEMPTY

protected static final java.lang.String TEXT_FILTER_NONEMPTY
text: to be externalized.

See Also:
Constant Field Values

_combo

protected org.eclipse.swt.custom.CCombo _combo
control used for the filter -> coombobox.

Constructor Detail

DefaultAutoFilter

public DefaultAutoFilter()
Method Detail

dispose

public void dispose()
Dispose all resources.

Specified by:
dispose in interface IAutoFilter

getControl

public org.eclipse.swt.widgets.Control getControl()
Get the control representing the autofilter (most probably a combo box).

Specified by:
getControl in interface IAutoFilter
Returns:
configured control representing the filter

isInResult

public boolean isInResult(IRow row)
Check whether the row is in the resulting list of rows.

Specified by:
isInResult in interface IRowFilter
Parameters:
row - row to check.
Returns:
true if the rw is in the result.

update

public void update()
Update/create the control and internal state.

Specified by:
update in interface IAutoFilter

reset

public void reset()
Remove any selection (usually revert to a setting that filters nothing).

Specified by:
reset in interface IAutoFilter

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)

Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
Inform everyone the filter changed.

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener


Copyright © 2012. All Rights Reserved.