/** * Checks whether a button in a blip was clicked or not. This method will * reset the state of the button to be "unclicked" at the end of the method * call. * * @param events A list of events received from Google Wave that needs to be * checked whether it contains form button clicked event or not. * @return true If the user just clicked on the button. */ public boolean isButtonClicked(List<Event> events) { for (Event event : events) { if (event.getType() == EventType.FORM_BUTTON_CLICKED && LOGIN_BUTTON_ID.equals(FormButtonClickedEvent.as(event).getButtonName())) { return true; } } return false; } }