|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the listener interface for receiving life cycle realted events for a Widget.
An example of using this class to manage the life cycle events of an application would be as follows:
public class MyExample { public static void main( String[] argv ) { Gtk.init( argv ); MyExample example = new MyExample(); Gtk.main(); } public MyExample() { Window window = new Window( WindowType.TOPLEVEL ); window.setTitle( "AboutDialogExample" ); window.addListener( new Life() ); window.showAll(); } protected class Life implements LifeCycleListener { public void lifeCycleEvent(LifeCycleEvent event) {} public boolean lifeCycleQuery(LifeCycleEvent event) { if (event.isOfType(LifeCycleEvent.Type.DESTROY) || event.isOfType(LifeCycleEvent.Type.DELETE)) { Gtk.mainQuit(); } return false; } } }
LifeCycleEvent
Method Summary | |
void |
lifeCycleEvent(LifeCycleEvent event)
This method is for all void-returning LifeCycleEvents (ie everything not of type LifeCycleEvent.Type.DESTROY or
LifeCycleEvent.Type.DELETE . |
boolean |
lifeCycleQuery(LifeCycleEvent event)
This method is for the delete and destroy events. |
Method Detail |
public void lifeCycleEvent(LifeCycleEvent event)
LifeCycleEvent.Type.DESTROY
or
LifeCycleEvent.Type.DELETE
.
TODO: document this properly.
public boolean lifeCycleQuery(LifeCycleEvent event)
TODO: document this properly.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |