01: /*******************************************************************************
02: * Copyright (c) 2007 MyGWT.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Darrell Meyer <darrell@mygwt.net> - initial API and implementation
10: *******************************************************************************/package net.mygwt.ui.client.viewer;
11:
12: import net.mygwt.ui.client.widget.KeyPressTextBox;
13:
14: /**
15: * A <code>KeyPressTextBox</code> that calls {@link Viewer#refresh()} when the
16: * text content is changed.
17: */
18: public class ViewerFilterTextBox extends KeyPressTextBox {
19:
20: Viewer viewer;
21:
22: public void bind(Viewer viewer) {
23: this .viewer = viewer;
24: }
25:
26: protected void onChange() {
27: viewer.applyFilters();
28: setFocus(true);
29: }
30:
31: }
|