List of usage examples for com.google.gwt.user.client Window setTitle
public static void setTitle(String title)
From source file:com.urlisit.siteswrapper.cloud.client.SitesWrapper.java
License:Apache License
public void onModuleLoad() { AsyncCallback<DTO> configuration = new AsyncCallback<DTO>() { public void onFailure(Throwable caught) { Window.alert(factory.getLiterals().rpcErrorMessage()); }/*w ww . j a v a 2 s . c o m*/ @Override public void onSuccess(DTO pages) { for (Page page : pages.getPages()) { factory.newView(factory.getPresenter(), factory.getSelector(), page, factory.getSite(), factory.getStyle(), factory.getLiterals()); } if (History.getToken().length() == 0) { History.newItem(factory.getSite().getDefaultPage(), false); } Window.setMargin("0px"); Window.setTitle(History.getToken()); History.fireCurrentHistoryState(); } }; RootPanel.getBodyElement().getStyle().setBackgroundColor(factory.getStyle().getPrimaryColor()); factory.getRpc().getDTO(configuration); }
From source file:com.urlisit.siteswrapper.cloud.view.Ghost.java
License:Apache License
@Override public void onLoad() { Window.setTitle(getTitle()); style(); onResize(); background.fadeIn(); }
From source file:com.urlisit.siteswrapper.cloud.view.Koninklijke.java
License:Apache License
@Override public void onLoad() { Window.setTitle(getTitle()); onResize(); bgImage.fadeIn(); }
From source file:com.xemantic.tadedon.gwt.activity.client.WindowTitleManager.java
License:Apache License
public void start(EventBus eventBus) { eventBus.addHandler(ActivityChangeEvent.TYPE, new ActivityChangeEvent.Handler() { @Override//w w w . j a v a 2s . c o m public void onActivityChange(ActivityChangeEvent event) { Activity activity = event.getActivity(); if (activity instanceof HasActivityDescription) { String description = ((HasActivityDescription) activity).getActivityDescription(); Window.setTitle(m_prefix + description + m_suffix); } } }); }
From source file:com.xpn.xwiki.watch.client.NewArticlesMonitoring.java
License:Open Source License
/** * Checking if we have articles// w ww .ja v a 2 s . c om */ private void onCheckNew() { if (queryActive == false) { queryActive = true; watch.getDataManager().getNewArticlesCount(new AsyncCallback() { public void onFailure(Throwable throwable) { queryActive = false; } public void onSuccess(Object object) { queryActive = false; if (object != null) { // get the result of the query List articlesCountList = (List) object; // now get its two components: total articles and unread articles if (articlesCountList != null) { int updatedNewArticles = 0; int updatedTotalArticles = 0; for (int i = 0; i < articlesCountList.size(); i++) { List currentFeedArticlesCount = (List) articlesCountList.get(i); // total articles are on position 2 updatedTotalArticles += ((Number) currentFeedArticlesCount.get(2)).intValue(); // new articles are on position 1 updatedNewArticles += ((Number) currentFeedArticlesCount.get(1)).intValue(); } if (updatedNewArticles == newArticles) { // nothing to update return; } // update the title bar with the new value newArticles = updatedNewArticles; totalArticles = updatedTotalArticles; String[] argsNewArticles = new String[1]; argsNewArticles[0] = "" + newArticles; String[] argsTotalArticles = new String[1]; argsTotalArticles[0] = "" + totalArticles; Window.setTitle(watch.getTranslation("productname") + ": " + watch.getTranslation("newarticles", argsNewArticles) + " / " + watch.getTranslation("articles", argsTotalArticles)); } // since we detected a change in the new articles count, // we might as well refresh the concerned whole UI watch.refreshArticleNumber(); } } }); } }
From source file:com.xpn.xwiki.watch.client.NewArticlesMonitoring.java
License:Open Source License
public void startBlinking(String message, String otherMessage) { if (otherMessage != null) windowTitle = otherMessage;/* w w w . ja va 2 s .c om*/ messageTitle = message; if (blinkTimer == null) { windowTitle = Window.getTitle(); Window.setTitle(message); blinkTimer = new Timer() { boolean active = true; public void run() { if (active) { Window.setTitle(windowTitle); } else { Window.setTitle(messageTitle); } active = !active; } }; if (!blinking) { blinking = true; blinkTimer.scheduleRepeating(2000); } } }
From source file:com.xpn.xwiki.watch.client.NewArticlesMonitoring.java
License:Open Source License
public void stopBlinking() { if (blinkTimer != null) { blinkTimer.cancel();//from w w w .j a va 2 s. c o m blinking = false; blinkTimer = null; Window.setTitle(messageTitle); } }
From source file:de.uni_koeln.spinfo.maalr.webapp.ui.common.client.ConfigurableSearchArea.java
License:Apache License
public void setQuery(MaalrQuery maalrQuery) { final String label = MaalrQueryFormatter.getQueryLabel(maalrQuery); if (label != null) { LocalizedStrings.afterLoad(new AsyncCallback<TranslationMap>() { @Override/*from w w w .ja v a 2 s . c o m*/ public void onFailure(Throwable caught) { // TODO Auto-generated method stub } @Override public void onSuccess(TranslationMap result) { String title = result.get("maalr.query.result_title"); if (title != null) { Window.setTitle(title.replaceAll("\\{0\\}", label)); } } }); } currentValues.clear(); Set<Entry<String, Widget>> widgets = elementsById.entrySet(); for (Entry<String, Widget> entry : widgets) { String value = maalrQuery.getValue(entry.getKey()); if (value == null) { value = defaultsById.get(entry.getKey()); } currentValues.put(entry.getKey(), value); setValue(entry.getValue(), value); } }
From source file:edu.caltech.ipac.firefly.core.DefaultRequestHandler.java
protected void onRequestSuccess(Request req, boolean createHistory) { if (req.isBookmarkable()) { Window.setTitle(getWindowTitle(req.getShortDesc())); Window.setStatus(""); if (createHistory) { History.newItem(req.toString(), false); }/*from ww w . ja v a2s .c om*/ } Application app = Application.getInstance(); if (req.isSearchResult()) { String desc = getSearchDescResolver().getTitle(req) + ": " + getSearchDescResolver().getDesc(req); if (createHistory && doRecordHistory) { UserServices.App.getInstance().addSearchHistory(req.toString(), desc, false, new BaseCallback<SearchInfo>() { public void doSuccess(SearchInfo result) { } }); } WebEventManager.getAppEvManager().fireEvent(new WebEvent<Request>(this, Name.SEARCH_RESULT_END, req)); } if (req.isDrilldownRoot()) { if (app.getDrillDownItems().size() > 0) { app.getDrillDownItems().clear(); } app.getDrillDownItems().addLast(req); } else if (req.isDrilldown()) { List<Request> l = app.getDrillDownItems().getList(); if (l.contains(req)) { int idx = l.indexOf(req); app.getDrillDownItems().removeRange(idx + 1, l.size()); } else { app.getDrillDownItems().addLast(req); } } else { // for now, leave as-is //app.getDrillDownItems().clear(); } }
From source file:edu.udes.bio.genus.client.GenUS.java
License:Open Source License
/** * This is the entry point method./*w w w.java 2s.c o m*/ */ public void onModuleLoad() { // Setup the browser window Window.enableScrolling(false); Window.setMargin("0px"); Window.setTitle("GenUS : Genetic profiling tool"); // Setup the root panel RootPanel.get().setSize("100%", "100%"); // Setup the background panel setSize("100%", "100%"); RootPanel.get().add(this); // Set display area this.add(GenUS.displayArea, 0, 0); // Add the zoomer final Scaler zoomer = new Scaler(GenUS.displayArea); this.add(zoomer, Window.getClientWidth() - 21, 0); // Add the main menu this.add(GenUS.mainMenu, 0, 0); // Add the properties panel this.add(GenUS.propMenu, Window.getClientWidth() - 502, Window.getClientHeight() - 125); // ### TESTING : Add a strand to pool // try { // // final RNAssDrawable testStrand = new RNAssDrawable("..((((((((......))))))))..", "ACGUGCCACGAUUCAACGUGGCACAG", GenUS.displayArea); // // testStrand.setName("TEST").scale(GenUS.displayArea.scaleFactor); // // // // GenUS.rnaPool.addToPool(testStrand); // // // // final RNAssDrawable testStrand2 = new RNAssDrawable(".(((....)..))..", "ACGUGCCACGAU", GenUS.displayArea); // // testStrand.setName("TEST2").scale(GenUS.displayArea.scaleFactor).setDrawStyle(DrawStyle.Linear_Round); // // // // GenUS.rnaPool.addToPool(testStrand2); // // /* // * for (int i = 0; i < 5; i++) { RNAssDrawable testStrand2 = new RNAssDrawable("..((......))", i + " ", displayArea); testStrand2.setName("TEST" + i).scale(displayArea.scaleFactor); testStrand2.setDrawStyle(RNAssDrawable.DrawStyle.Linear_Round); // * // * rnaPool.addToPool(testStrand2); } // */ // // } catch (final Exception e) { // Window.alert("TESTING STRAND ERROR GOTTA FIX TAHT SHIT: " + e.getMessage()); // } }