java widget_Java FavoritesWidget类代码示例
import com.google.gwt.sample.dynatablerf.client.widgets.FavoritesWidget; //導入依賴的package包/類
/**
* This method sets up the top-level services used by the application.
*/
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
public void onUncaughtException(Throwable e) {
log.log(Level.SEVERE, e.getMessage(), e);
}
});
final DynaTableRequestFactory requests = GWT.create(DynaTableRequestFactory.class);
requests.initialize(eventBus);
// Add remote logging handler
RequestFactoryLogHandler.LoggingRequestProvider provider = new RequestFactoryLogHandler.LoggingRequestProvider() {
public LoggingRequest getLoggingRequest() {
return requests.loggingRequest();
}
};
Logger.getLogger("").addHandler(new ErrorDialog().getHandler());
Logger.getLogger("").addHandler(
new RequestFactoryLogHandler(provider, Level.WARNING,
new ArrayList()));
FavoritesManager manager = new FavoritesManager(requests);
PersonEditorWorkflow.register(eventBus, requests, manager);
calendar = new SummaryWidget(eventBus, requests, 15);
favorites = new FavoritesWidget(eventBus, requests, manager);
filter = new DayFilterWidget(eventBus);
RootLayoutPanel.get().add(
GWT. create(Binder.class).createAndBindUi(this));
// Fast test to see if the sample is not being run from devmode
if (GWT.getHostPageBaseURL().startsWith("file:")) {
log.log(Level.SEVERE, "The DynaTableRf sample cannot be run without its"
+ " server component. If you are running the sample from a"
+ " GWT distribution, use the 'ant devmode' target to launch"
+ " the DTRF server.");
}
}
總結
以上是生活随笔為你收集整理的java widget_Java FavoritesWidget类代码示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: groupby机制
- 下一篇: Python 之嵌套列表