/** * Implements the method to handle requests as defined by the <code>ClickHandler</code> interface. * The request is only handled here if the ALT key was pressed. * * @see ClickHandler */ public void handleClick(Click click) { System.out.println("Frame is asked to handle the request..."); if (click.hasAltMask()) { System.out.println("Frame handles the request."); } else { if (successor == null) { throw new RuntimeException("request unhandled (end of chain reached)"); } else { successor.handleClick(click); } } }