|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.event.KeyAdapter
orbital.moon.awt.SystemRequestor
public class SystemRequestor
This class is a SystemRequestor that will call a predicate on interrupt or abort requests when registered as a key listener.
Use one of:
component.addKeyListener(new SystemRequestor(reactorPredicate)); new SystemRequestor(reactorPredicate, component);
Note that if you intend to let the predicate abort the application without further user feedback SystemRequestor needs being the first key listener to notify.
| Field Summary | |
|---|---|
static int |
ABORT
|
static int |
INTERRUPT
|
protected Predicate |
request
|
| Constructor Summary | |
|---|---|
SystemRequestor(Predicate requestReactor)
Construct a SystemRequestor calling the given predicate on interrupt and abort requests. |
|
SystemRequestor(Predicate requestReactor,
java.awt.Component comp)
Construct a SystemRequestor calling the given predicate on interrupt and abort requests. |
|
| Method Summary | |
|---|---|
void |
keyPressed(java.awt.event.KeyEvent e)
Check for Abort and Interrupt requests. |
| Methods inherited from class java.awt.event.KeyAdapter |
|---|
keyReleased, keyTyped |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INTERRUPT
public static final int ABORT
protected Predicate request
| Constructor Detail |
|---|
public SystemRequestor(Predicate requestReactor)
requestReactor - the predicate called when an interrupt or abort request occured.
This predicate can perform the corresponding operations to interrupt running thread
or abort the program.
public SystemRequestor(Predicate requestReactor,
java.awt.Component comp)
requestReactor - the predicate called when an interrupt or abort request occured.
This predicate can perform the corresponding operations to interrupt running thread
or abort the program.comp - the component to register to.| Method Detail |
|---|
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerkeyPressed in class java.awt.event.KeyAdapter
|
Orbital library 1.2.0: 23 Apr 2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||