public void postEvent( Event e ) { if ( handleEvent( e ) ) return; Component parent = this.parent; if ( parent != null ) { e.translate( x, y ); if ( parent.postEvent( e ) ) { return true; } } if ( peer != null ) { return peer.handleEvent( e ); } public boolean handleEvent( Event e ) { switch ( e.id ) { case Event.MOUSE_ENTER: return mouseEnter( e, e.x, e.y ); case Event.MOUSE_EXIT: return mouseExit( e, e.x, e.y ); case Event.MOUSE_MOVE: return mouseMove( e, e.x, e.y ); case Event.MOUSE_DOWN: return mouseDown( e, e.x, e.y ); case Event.MOUSE_DRAG: return mouseDrag( e, e.x, e.y ); case Event.MOUSE_UP: return mouseUp( e, e.x, e.y ); case Event.KEY_PRESS: case Event.KEY_ACTION: return keyDown( e, e.key ); case Event.KEY_RELEASE: case Event.KEY_ACTION_RELEASE: return keyUp( e, e.key ); case Event.ACTION_EVENT: return action( e, e.arg ); case Event.GOT_FOCUS: return gotFocus( e, e.arg ); case Event.LOST_FOCUS: return lostFocus( e, e.arg ); } return false; }