|
qflib 0.99 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.qfs.lib.gui.DelayedListSelectionListener
This class implements a delayed version of the ListSelectionListener
interface with the help of a DelayedAction
.
A delayed reaction to selection events is useful, when the selection causes a complicated display to be updated. Without the delay, keyboard traversal through the list will cause a redisplay for every item passed. By using a DelayedListSelectionListener, only the last selection will actually cause a redisplay, if the delay is set correctly.
When the delayed action is actually performed, the delayedValueChanged
method will be called. This
abstract method must be implemented by a subclass.
Field Summary | |
static int |
DEFAULT_DELAY
The default delay for a DelayedListSelectionListener. |
Constructor Summary | |
DelayedListSelectionListener()
Create a new DelayedListSelectionListener with the default delay of 300 milliseconds. |
|
DelayedListSelectionListener(int delay)
Create a new DelayedListSelectionListener. |
Method Summary | |
protected abstract void |
delayedValueChanged(javax.swing.event.ListSelectionEvent event)
Handle a ListSelectionEvent similar to ListSelectionListener.valueChanged . |
void |
valueChanged(javax.swing.event.ListSelectionEvent event)
Restart the timer for the delayed selection changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_DELAY
Constructor Detail |
public DelayedListSelectionListener()
public DelayedListSelectionListener(int delay)
delay
- The delay in milliseconds until a
delayedValueChanged is firedMethod Detail |
public void valueChanged(javax.swing.event.ListSelectionEvent event)
valueChanged
in interface javax.swing.event.ListSelectionListener
event
- The event that caused the change.protected abstract void delayedValueChanged(javax.swing.event.ListSelectionEvent event)
ListSelectionListener.valueChanged
.
event
- The event that caused the change.
|
qflib 0.99 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |