@Override public void execute() { if (search.getState() == State.READY) { render(); } else { // Try again later. scheduler.schedule(this); } }
@Override public void onStateChanged() { // // If the state switches to searching, then do nothing. A manual title-bar // update is performed in onQueryEntered(), and the title-bar should not be // updated when a polling search fires. // // If the state switches to ready, then just update the title. Do not // necessarily re-render, since that is only necessary if a change occurred, // which would have fired one of the other methods below. // if (search.getState() == State.READY) { renderTitle(); } }