1 /** 2 * Copyright 2010 The Kuali Foundation Licensed under the 3 * Educational Community License, Version 2.0 (the "License"); you may 4 * not use this file except in compliance with the License. You may 5 * obtain a copy of the License at 6 * 7 * http://www.osedu.org/licenses/ECL-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, 10 * software distributed under the License is distributed on an "AS IS" 11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 12 * or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 */ 15 16 package org.kuali.student.common.ui.client.mvc; 17 18 import com.google.gwt.user.client.ui.Widget; 19 20 /** 21 * This interface should be implemented by widget that will not be ready for 22 * use until some action is completed (eg. load data from async callback) 23 * 24 * @author Kuali Student Team 25 * 26 */ 27 public interface HasWidgetReadyCallback { 28 29 /** 30 * This method sets an initialized state of the widget 31 * 32 * @param initialized 33 */ 34 public void setInitialized(boolean initialized); 35 36 /** 37 * This method can be used to query if a widget has been initialized. 38 * 39 * @return 40 */ 41 public boolean isInitialized(); 42 43 /** 44 * This method can be used to register a callback to be executed when a widget 45 * has been initialized. The callback should be unregistered by the 46 * implementing widget after execution. 47 * 48 * @param callback 49 */ 50 public void addWidgetReadyCallback(Callback<Widget> callback); 51 }