List of usage examples for com.google.gwt.user.client Window setTitle
public static void setTitle(String title)
From source file:com.google.gwt.sample.stockwatcher.client.Gwt_Project_StockWatcher.java
/** * Entry point method./*from w ww .ja v a 2 s . co m*/ */ public void onModuleLoad() { // Set the Window title, the header text, and the Add button text. Window.setTitle(constants.stockWatcher()); RootPanel.get("appTitle").add(new Label(constants.stockWatcher())); addStockButton = new Button(constants.add()); // TODO Create table for stock data. stocksFlexTable.setText(0, 0, constants.symbol()); stocksFlexTable.setText(0, 1, constants.price()); stocksFlexTable.setText(0, 2, constants.change()); stocksFlexTable.setText(0, 3, constants.remove()); // Add styles to elements in the stock list table. stocksFlexTable.setCellPadding(6); stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader"); ; stocksFlexTable.addStyleName("watchList"); stocksFlexTable.getCellFormatter().addStyleName(0, 1, "watchListNumbericColumn"); stocksFlexTable.getCellFormatter().addStyleName(0, 2, "watchListNumbericColumn"); stocksFlexTable.getCellFormatter().addStyleName(0, 3, "watchListRemoveColumn"); // TODO Assemble Add Stock panel. this.addPanel.add(newSymbolTextBox); this.addPanel.add(addStockButton); addPanel.addStyleName("addPanel"); // TODO Assemble Main panel. errorMsgLabel.setStyleName("errorMessage"); errorMsgLabel.setVisible(false); mainPanel.add(errorMsgLabel); mainPanel.add(stocksFlexTable); mainPanel.add(addPanel); mainPanel.add(lastUpdatedLabel); // TODO Associate the Main panel with the HTML host page. RootPanel.get("stockList").add(mainPanel); // TODO Move cursor focus to the input box. newSymbolTextBox.setFocus(true); // Listen for mouse events on the Add button. addStockButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { addStock(); } }); //Move cursor focus to the input box. newSymbolTextBox.setFocus(true); // Setup timer to refresh list automatically Timer refreshTimer = new Timer() { @Override public void run() { refreshWatchList(); } }; refreshTimer.scheduleRepeating(REFRESH_INTERVAL); }
From source file:com.guit.client.place.PlaceManagerImpl.java
License:Apache License
private <D> void goToPlace(final String placeName, final D placeData) { if (currentPlace != null && currentPlace instanceof StayPlace) { StayPlace<?> stayPlace = (StayPlace<?>) currentPlace; String warning = stayPlace.mayLeave(); if (warning != null) { if (!Window.confirm(warning)) { // Restore the token History.newItem(getToken(currentPlaceName, currentData), false); if (currentPlace instanceof StayPlaceWithCallback) { ((StayPlaceWithCallback<?>) stayPlace).stay(); }/* ww w . j a va 2 s . c o m*/ return; } else if (currentPlace instanceof StayPlaceWithCallback) { ((StayPlaceWithCallback<?>) stayPlace).leave(); } } } else if (currentPlace != null && currentPlace instanceof LeavePlace) { ((LeavePlace<?>) currentPlace).leave(); } placeChangeCount++; getPlace(placeName, new PlaceCallback<D>() { @Override public void onSuccess(Place<D> place) { eventBus.fireEvent(new PlaceChangeEvent(place.getClass(), placeData)); String title = placesTitles.get(placeName); if (!title.isEmpty()) { Window.setTitle(defaultTitle + " - " + title); } else { Window.setTitle(defaultTitle); } currentPlace = place; currentPlaceName = placeName; currentData = placeData; place.go(placeData); } }); }
From source file:com.gwtcx.smartgwt.client.view.AccountInformationView.java
License:Open Source License
private void setMastheadLabel(String name) { MastheadUpdateEvent.fire(eventBus, name + I18nUtil.getConstant().informationLabel()); // AccountPagePresenter.getMasthead().setLabelContents(name + I18nUtil.getConstant().informationLabel()); // set the browser window's title e.g. "Account: ABC Corporation Pty Ltd" Window.setTitle(I18nUtil.getConstant().accountWindowTitle() + name); }
From source file:com.gwtcx.smartgwt.client.view.EmailInformationView.java
License:Open Source License
private void setMastheadLabel(String name) { MastheadUpdateEvent.fire(eventBus, name + I18nUtil.getConstant().informationLabel()); // EmailPagePresenter.getMasthead().setLabelContents(name + I18nUtil.getConstant().informationLabel()); // set the browser window's title e.g. "Email: New Email" Window.setTitle(I18nUtil.getConstant().emailWindowTitle() + name); }
From source file:com.gwtcx.smartgwt.client.view.FileUploadPageView.java
License:Open Source License
@Inject public FileUploadPageView() { // get rid of scroll bars, and clear out the window's built-in margin, // because we want to take advantage of the entire client area Window.enableScrolling(false); Window.setMargin(DEFAULT_MARGIN); // initialise the main layout container panel = new VLayout(); panel.setWidth100();//ww w . ja va2 s . c om panel.setHeight100(); // initialise the North layout container northLayout = new VLayout(); northLayout.setWidth100(); northLayout.setHeight(HEADER_HEIGHT); // initialise the South layout container southLayout = new VLayout(); southLayout.setWidth100(); southLayout.setHeight100(); // add the nested layout containers to the main layout containers northLayout.addMember(initHeader()); southLayout.addMember(initBody()); southLayout.addMember(initFooter()); // add the North and South layout containers to the main layout container panel.addMember(northLayout); panel.addMember(southLayout); // bindCustomUiHandlers(); // set the browser window's title Window.setTitle(I18nUtil.getConstant().fileUploadWindowTitle()); }
From source file:com.gwtmodel.table.view.webpanel.common.AbstractWebPanel.java
License:Apache License
protected void setLabels(Label productName, Label ownerName, Label userName, Label hotelName, Label upInfo) { this.productName = productName; this.ownerName = ownerName; this.userName = userName; this.hotelName = hotelName; this.upInfo = upInfo; Window.setTitle(pResources.getRes(IWebPanelResources.TITLE)); productName.setText(pResources.getRes(IWebPanelResources.PRODUCTNAME)); ownerName.setText(pResources.getRes(IWebPanelResources.OWNERNAME)); }
From source file:com.gwtmodel.table.view.webpanel.common.AbstractWebPanel.java
License:Apache License
@Override public void setPaneText(InfoType t, String te) { IGetStandardMessage iMess = GwtGiniInjector.getI().getStandardMessage(); String text = iMess.getMessage(te); switch (t) {/*from ww w .j av a 2 s. co m*/ case USER: userName.setText(text); // if (autologoutmode) // setOut(text != null ? true : false); break; case DATA: hotelName.setText(text); break; case OWNER: ownerName.setText(text); break; case TITLE: Window.setTitle(text); break; case PRODUCT: productName.setText(text); break; case UPINFO: if (text == null) { upInfo.setVisible(false); } else { upInfo.setVisible(true); upInfo.setText(text); } break; } }
From source file:com.gwtmodel.table.view.webpanel.polymer.PanelPolymer.java
License:Apache License
public PanelPolymer(IWebPanelResources pResources, ICommand logOut, PanelElemWidgets uW) { super(pResources, logOut); this.uW = uW; setLabels(uW.productLabel, uW.ownerLabel, uW.personLabel, uW.hotelLabel, uW.infoLabel); String ima = pResources.getRes(IWebPanelResources.PROGRESSICON); String url = Utils.getImageAdr(ima); uW.progressIcon.setUrl(url);/*w w w .j a v a 2 s. c o m*/ String h = Utils.getImageAdr(pResources.getRes(IWebPanelResources.IIMAGEPRODUCT)); uW.titleIcon.setUrl(h); String JVersion = pResources.getRes(IWebPanelResources.JUIVERSION); String title = CUtil.joinS('\n', pResources.getRes(IWebPanelResources.VERSION), LogT.getT().GWTVersion(GWT.getVersion(), JVersion)); uW.titleIcon.setTitle(title); Window.setTitle(pResources.getRes(IWebPanelResources.TITLE)); menuWidget = getId("leftmenu"); // important HTMLPanel mainPa = (HTMLPanel) FormUtil.findWidgetByFieldId(uW.htmlPanel, "mainpanel"); menuiconWidget = getId("menuicon"); uW.menuIcon.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (i == null) return; i.click(new WSize(event.getClientY(), event.getClientX(), 0, 0)); } }); }
From source file:com.kk_electronic.kkportal.core.ui.SingleRender.java
License:Open Source License
protected void loadModule(ModuleInfo moduleInfo) { this.moduleInfo = moduleInfo; typeInfoProvider.get(moduleInfo.getType(), new AsyncCallback<ModuleTypeInfo>() { @Override/*w ww.j ava2 s . c o m*/ public void onFailure(Throwable caught) { display.showError("Failed to load module " + location.getSubint() + ":" + caught); } @Override public void onSuccess(ModuleTypeInfo result) { title = result.getTitle(); Window.setTitle(title); loadCode(result); } }); }
From source file:com.LSH.client.Error404.java
License:Apache License
/** * ? 404 ?/* w w w . ja v a2s .c o m*/ */ private void Print404() { Window.setTitle("404 - Page Not Found"); label.setHTML("<h1>404 Page!</h1><br>"); }