FileDocCategorySizeDatePackage
ModalContext.javaAPI DocAndroid 1.5 API1725Wed May 06 22:41:54 BST 2009java.awt

ModalContext

public class ModalContext extends Object
The context for nested event loop. It can be dialog, popup menu etc.

Fields Summary
private boolean
running
private final Toolkit
toolkit
Constructors Summary
ModalContext()


     
        toolkit = Toolkit.getDefaultToolkit();
    
Methods Summary
voidendModalLoop()
Leave the modal loop running in this context This method doesn't stops the loop immediately, it just sets the flag that says the modal loop to stop

        running = false;
    
booleanisModalLoopRunning()

return
modal loop is currently running in this context

        return running;
    
voidrunModalLoop()
Set up and run modal loop in this context

        running = true;
        toolkit.dispatchThread.runModalLoop(this);