本文整理汇总了Java中com.extjs.gxt.ui.client.GXT.setDefaultTheme方法的典型用法代码示例。如果您正苦于以下问题:Java GXT.setDefaultTheme方法的具体用法?Java GXT.setDefaultTheme怎么用?Java GXT.setDefaultTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.extjs.gxt.ui.client.GXT
的用法示例。
在下文中一共展示了GXT.setDefaultTheme方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onModuleLoad
import com.extjs.gxt.ui.client.GXT; //导入方法依赖的package包/类
public void onModuleLoad() {
ThemeManager.register(Theme.GRAY);
GXT.setDefaultTheme(Theme.GRAY, true);
if (!GWT.isScript()) { // hosted
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
public void onUncaughtException(Throwable e) {
e.printStackTrace();
}
});
}
// loading system delegate
AmDelegateAsync amDelegate = (AmDelegateAsync) GWT.create(AmDelegate.class);
((ServiceDefTarget) amDelegate).setServiceEntryPoint(GWT.getModuleBaseURL() + FinanceConstants.ENDPOINT_AM);
Registry.register(FinanceConstants.DELEGATE_AM, amDelegate);
SoDelegateAsync soDelegate = (SoDelegateAsync) GWT.create(SoDelegate.class);
((ServiceDefTarget) amDelegate).setServiceEntryPoint(GWT.getModuleBaseURL() + FinanceConstants.ENDPOINT_SO);
Registry.register(FinanceConstants.DELEGATE_SO, soDelegate);
DdDelegateAsync ddDelegate = (DdDelegateAsync) GWT.create(DdDelegate.class);
((ServiceDefTarget) ddDelegate).setServiceEntryPoint(GWT.getModuleBaseURL() + FinanceConstants.ENDPOINT_DD);
Registry.register(FinanceConstants.DELEGATE_DD, ddDelegate);
// add main application controller
// trigger InitApplicationModel event
Dispatcher dispatcher = Dispatcher.get();
dispatcher.addController(new FinanceController());
dispatcher.dispatch(FinanceEvents.InitApplicationModel);
}
示例2: onModuleLoad
import com.extjs.gxt.ui.client.GXT; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void onModuleLoad() {
if (Log.isDebugEnabled()) {
Log.debug("Application > Client init start.");
}
// Listening ApplicationCache events.
// Done early to avoid missing some events and to keep track of the
// last update date.
ApplicationCacheManager.ensureHandlers();
// GIN injector instantiation.
if (Log.isDebugEnabled()) {
Log.debug("Application > Creates GIN injector.");
}
injector = GWT.create(Injector.class);
// Set GXT theme.
if (Log.isDebugEnabled()) {
Log.debug("Application > Sets GWT default theme.");
}
GXT.setDefaultTheme(injector.getTheme(), true);
// Uncaught exception handler.
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(final Throwable e) {
if (Log.isErrorEnabled()) {
Log.error("Uncaught exception on client-side.", e);
}
// TODO [i18n] Uncaught exception error message.
N10N.error("An unexpected error has occured.");
}
});
clientInitializing();
Profiler.INSTANCE.setAuthenticationProvider(injector.getAuthenticationProvider());
Profiler.INSTANCE.setApplicationStateManager(injector.getApplicationStateManager());
if (Log.isDebugEnabled()) {
Log.debug("Application > Client init end.");
}
}