List of usage examples for com.google.gwt.user.client Window getTitle
public static String getTitle()
From source file:cc.kune.chat.client.KuneHablarSignals.java
License:GNU Affero Public License
/** * Instantiates a new kune hablar signals. * * @param kuneEventBus//from ww w. j a v a2 s . co m * the kune event bus * @param session * the session * @param hablar * the hablar * @param action * the action * @param privateStorageManager * the private storage manager * @param i18n * the i18n * @param downUtils * the down utils * @param chatIcon */ public KuneHablarSignals(final EventBus kuneEventBus, final XmppSession session, final Hablar hablar, final ChatClientAction action, final PrivateStorageManager privateStorageManager, final I18nTranslationService i18n, final ClientFileDownloadUtils downUtils, IsWidget chatIcon) { this.chatIcon = chatIcon; final HablarEventBus hablarEventBus = hablar.getEventBus(); final PrivateStorageManager storageManager = privateStorageManager; final HasText titleDisplay = new HasText() { @Override public String getText() { return Window.getTitle(); } @Override public void setText(final String text) { Window.setTitle(text); } }; final SignalPreferences preferences = new SignalPreferences(); final UnattendedPagesManager manager = new UnattendedPagesManager(hablarEventBus, BrowserFocusHandler.getInstance()); new KuneBrowserFocusManager(kuneEventBus, hablarEventBus, manager, BrowserFocusHandler.getInstance()); new UnattendedPresenter(hablarEventBus, preferences, manager, titleDisplay); new KuneUnattendedPresenter(kuneEventBus, hablarEventBus, preferences, manager, chatIcon); final NotificationManager notificationManager = new NotificationManager(hablarEventBus, preferences); // notificationManager.addNotifier((BrowserPopupHablarNotifier) // GWT.create(BrowserPopupHablarNotifier.class), // true); notificationManager.addNotifier(new KuneChatNotifier(i18n, downUtils, kuneEventBus), true); final SignalsPreferencesPresenter preferencesPage = new SignalsPreferencesPresenter(session, storageManager, hablarEventBus, preferences, new SignalsPreferencesWidget(), notificationManager); hablar.addPage(preferencesPage, UserContainer.ROL); }
From source file:co.fxl.gui.gwt.GWTDisplay.java
License:Open Source License
@Override public String title() { return Window.getTitle(); }
From source file:com.allen_sauer.gwt.dnd.demo.client.ExampleTabPanel.java
License:Apache License
/** * Add another example to demonstrate.//from ww w . j av a2s .c o m * * @param example the example panel to add */ public void add(Example example) { VerticalPanel verticalPanel = new VerticalPanel(); verticalPanel.add(describe(example.getInvolvedClasses(), example.getDescription())); verticalPanel.add(example); Label tabLabel = new Label("Demo " + (getTabCount() + 1)); tabLabel.setWordWrap(false); String title = DOMUtil .adjustTitleForBrowser(StringUtil.getShortTypeName(example) + "\n" + example.getDescription()); tabLabel.setTitle(title); add(verticalPanel, tabLabel, example.getHistoryToken(), Window.getTitle() + " - " + example.getHistoryToken()); }
From source file:com.allen_sauer.gwt.log.client.WindowLogger.java
License:Apache License
private void openNewWindow() { closeWindowIfOpen();//ww w. ja v a 2s .c om window = DOMUtil.windowOpen(""); new Timer() { int counter = 0; @Override public void run() { try { if (counter++ > 100 || "complete".equals(DOMUtil.windowReadyState(window))) { DOMUtil.windowSetTitle(window, "[log] " + Window.getTitle()); ready = true; cancel(); logPendingText(); } } catch (RuntimeException e) { window = null; cancel(); } } }.scheduleRepeating(100); }
From source file:com.calclab.emiteuimodule.client.EmiteUIDialog.java
License:Open Source License
public void start(final UserChatOptions userChatOptions, final String httpBase, final String host, final String roomHost) { // We define, default AvatarProvider and MultiChaListener for simple // facade/* www . j av a 2 s . c om*/ start(userChatOptions, httpBase, host, roomHost, new AvatarProvider() { public String getAvatarURL(final XmppURI userURI) { return "images/person-def.gif"; } }, EMITE_DEF_TITLE); final String initialWindowTitle = Window.getTitle(); onChatAttended(new Listener<String>() { public void onEvent(final String parameter) { Window.setTitle(initialWindowTitle); } }); onChatUnattendedWithActivity(new Listener<String>() { public void onEvent(final String chatTitle) { Window.setTitle("(* " + chatTitle + ") " + initialWindowTitle); } }); }
From source file:com.ephesoft.dcma.gwt.core.client.DCMAEntryPoint.java
License:Open Source License
@Override public void onModuleLoad() { GWT.<GlobalResources>create(GlobalResources.class).css().ensureInjected(); this.eventBus = new HandlerManager(null); this.rpcService = createRpcService(); eventBus.addHandler(SignoutEvent.type, new SignoutEventHandler() { @Override//from w w w. jav a2 s . c o m public void onSignout(SignoutEvent event) { rpcService.logout(Window.getTitle(), new EphesoftAsyncCallback<Void>() { @Override public void onSuccess(Void voids) { Window.Location.assign(GWT.getHostPageBaseURL() + getHomePage()); } @Override public void customFailure(Throwable arg0) { /* * On Failure */ } }); } }); eventBus.addHandler(HelpClickEvent.type, new HelpClickEventHandler() { @Override public void onHelpClicked(HelpClickEvent event) { rpcService.getHelpUrl(new EphesoftAsyncCallback<String>() { @Override public void onSuccess(String url) { // opening the help url in new tab Window.open(url, "_blank", null); } @Override public void customFailure(Throwable arg0) { ConfirmationDialogUtil.showConfirmationDialog( LocaleDictionary.get() .getConstantValue(LocaleCommonConstants.HELP_URK_ERROR_MESSAGE), LocaleDictionary.get().getConstantValue(LocaleCommonConstants.ERROR_TITLE), true); } }); } }); preprocess(); }
From source file:com.ephesoft.dcma.gwt.rv.client.ReviewValidate.java
License:Open Source License
private void onWindowClose() { String title = Window.getTitle(); if (title != null && !title.isEmpty()) { int index = title.indexOf(ReviewValidateConstants.BATCH_INSTANCE_ABBREVIATION); if (index != -1) { String batchInstanceIdentifier = title.substring(index); updateEndTimeAndCleanCurrentBatch(batchInstanceIdentifier); }// w w w . j a v a2 s .c o m } }
From source file:com.google.gerrit.client.api.PluginLoader.java
License:Apache License
private void startTimers() { show = new Timer() { @Override//from ww w . j a v a2s. c o m public void run() { setText(Window.getTitle()); setWidget(progress); setGlassEnabled(true); getGlassElement().addClassName(Gerrit.RESOURCES.css().errorDialogGlass()); hide(true); center(); visible = true; } }; show.schedule(500); update = new Timer() { private int cycle; @Override public void run() { progress.setValue(100 * ++cycle * 250 / loadTimeout); } }; update.scheduleRepeating(250); timeout = new Timer() { @Override public void run() { finish(); } }; timeout.schedule(loadTimeout); }
From source file:com.googlecode.mgwt.mvp.client.history.HTML5HistorianLegacyImpl.java
License:Apache License
@Override public void onValueChange(ValueChangeEvent<String> event) { eventBus.fireEvent(new PopStateEvent(event.getValue(), Window.getTitle(), Window.Location.getHref())); }
From source file:com.googlecode.mgwt.mvp.client.history.MGWTPlaceHistoryHandler.java
License:Apache License
protected void replaceToken(String token) { if (token.length() > 0) { historian.replaceState(token, Window.getTitle(), "#" + History.encodeHistoryToken(token)); } else {/*from w w w. jav a2 s.c o m*/ historian.replaceState(token, Window.getTitle(), ""); } }