org.openswing.swing.client
Class AutoCompletitionListener
java.lang.Object
java.awt.event.KeyAdapter
org.openswing.swing.client.AutoCompletitionListener
- All Implemented Interfaces:
- java.util.EventListener, java.awt.event.KeyListener
- public final class AutoCompletitionListener
- extends java.awt.event.KeyAdapter
Title: OpenSwing Framework
Description: KeyListener that can be added to a text/number type input control to listen for a key pressed event:
after listening a key press event, the AutoCompletitionDataLocator class is invoked to retrieve a list of data
that starts with the text/number just typed; this list of data is showed in a window and user can select one of
these data to auto complete the content of the input field.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework.
This library is free software; you can redistribute it and/or
modify it under the terms of the (LGPL) Lesser General Public
License as published by the Free Software Foundation;
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The author may be contacted at:
maurocarniel@tin.it
Methods inherited from class java.awt.event.KeyAdapter |
keyTyped |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoCompletitionListener
public AutoCompletitionListener(AutoCompletitionInputControl inputControl,
AutoCompletitionDataLocator dataLocator,
long waitTime)
- Constructor invoked from some input control of type text/number.
- Parameters:
inputControl
- input control to listen for key press eventsdataLocator
- data locator used to retrieve a list of data that starts with the data just typedwaitTime
- wait time before showing data list (expressed in ms)
isWindowVisible
public final boolean isWindowVisible()
- Returns:
true
if window for autocompletition codes is currently visible, false
otherwise
keyPressed
public final void keyPressed(java.awt.event.KeyEvent e)
keyReleased
public final void keyReleased(java.awt.event.KeyEvent e)