de.matthiasmann.twl
Class TableSearchWindow

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.Container
          extended by de.matthiasmann.twl.InfoWindow
              extended by de.matthiasmann.twl.TableSearchWindow
All Implemented Interfaces:
TableBase.KeyboardSearchHandler

public class TableSearchWindow
extends InfoWindow
implements TableBase.KeyboardSearchHandler

Provides search as you type functionality to a Table.


Nested Class Summary
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
TableSearchWindow(Table table, TableSelectionModel selectionModel)
           
 
Method Summary
protected  void afterAddToGUI(GUI gui)
          Called after this widget has been added to a GUI tree.
protected  void beforeRemoveFromGUI(GUI gui)
          Called when this widget is removed from the GUI tree.
 void cancelSearch()
           
 TableModel getModel()
           
 Table getTable()
           
 boolean handleKeyEvent(Event evt)
          Update search with this key event
 boolean isActive()
          Returns true if the search is active.
 void setModel(TableModel model, int column)
           
 void updateInfoWindowPosition()
          Called when the table position ot size has changed.
 
Methods inherited from class de.matthiasmann.twl.InfoWindow
closeInfo, getOwner, infoWindowClosed, isOpen, openInfo
 
Methods inherited from class de.matthiasmann.twl.Container
getMinHeight, getMinWidth, getPreferredInnerHeight, getPreferredInnerWidth, layout
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, allChildrenRemoved, applyTheme, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, childVisibilityChanged, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleEvent, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, insertChild, invalidateLayout, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, paintWidget, positionChanged, reapplyTheme, removeAllChildren, removeChild, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, setTooltipContent, setVisible, sizeChanged, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableSearchWindow

public TableSearchWindow(Table table,
                         TableSelectionModel selectionModel)
Method Detail

getTable

public Table getTable()

getModel

public TableModel getModel()

setModel

public void setModel(TableModel model,
                     int column)

isActive

public boolean isActive()
Description copied from interface: TableBase.KeyboardSearchHandler
Returns true if the search is active.

Specified by:
isActive in interface TableBase.KeyboardSearchHandler
Returns:
true if the search is active.

updateInfoWindowPosition

public void updateInfoWindowPosition()
Description copied from interface: TableBase.KeyboardSearchHandler
Called when the table position ot size has changed.

Specified by:
updateInfoWindowPosition in interface TableBase.KeyboardSearchHandler

handleKeyEvent

public boolean handleKeyEvent(Event evt)
Description copied from interface: TableBase.KeyboardSearchHandler
Update search with this key event

Specified by:
handleKeyEvent in interface TableBase.KeyboardSearchHandler
Parameters:
evt - the key event
Returns:
true if the event was handled

cancelSearch

public void cancelSearch()

afterAddToGUI

protected void afterAddToGUI(GUI gui)
Description copied from class: Widget
Called after this widget has been added to a GUI tree.

Overrides:
afterAddToGUI in class Widget
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

beforeRemoveFromGUI

protected void beforeRemoveFromGUI(GUI gui)
Description copied from class: Widget
Called when this widget is removed from the GUI tree. After this call getGUI() will return null.

Overrides:
beforeRemoveFromGUI in class Widget
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()