net.ranides.assira.time
Class LazyInvoker
java.lang.Object
net.ranides.assira.time.LazyInvoker
- All Implemented Interfaces:
- Runnable
public abstract class LazyInvoker
- extends Object
- implements Runnable
Użycie:
LazyInvoker action = new LazyInvoker(true, 1000) {
public void run() {
// action ...
}
};
Następnie np w "onKeyPress" kolejkujemy wykonanie:
action.runLazy()
Mimo, że runLazy() może być wywoływane wielokrotnie w odstępach
t<1000, to Runnable.run() uruchomi się tylko raz, 1000ms
po ostatnim wywołaniu runLazy().
- Author:
- ranides
|
Constructor Summary |
LazyInvoker(boolean awt,
int delay)
|
| Methods inherited from interface java.lang.Runnable |
run |
LazyInvoker
public LazyInvoker(boolean awt,
int delay)
runLazy
public void runLazy()
Copyright © 2013. All Rights Reserved.