com.google.gwt.user.client.Window.getTitle()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(62)

本文整理了Java中com.google.gwt.user.client.Window.getTitle()方法的一些代码示例,展示了Window.getTitle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.getTitle()方法的具体详情如下:
包路径:com.google.gwt.user.client.Window
类名称:Window
方法名:getTitle

Window.getTitle介绍

[英]Gets the browser window's current title.
[中]获取浏览器窗口的当前标题。

代码示例

代码示例来源:origin: de.esoco/gewt

/***************************************
 * Returns the view title.
 *
 * @return The title string
 */
public String getTitle()
{
  return Window.getTitle();
}

代码示例来源:origin: com.googlecode.mgwt/mgwt

protected void replaceToken(String token) {
  if (token.length() > 0) {
    historian.replaceState(token, Window.getTitle(), "#" + History.encodeHistoryToken(token));
  } else {
    historian.replaceState(token, Window.getTitle(), "");
  }
}

代码示例来源:origin: dankurka/mgwt

protected void replaceToken(String token) {
  if (token.length() > 0) {
    historian.replaceState(token, Window.getTitle(), "#" + History.encodeHistoryToken(token));
  } else {
    historian.replaceState(token, Window.getTitle(), "");
  }
}

代码示例来源:origin: dankurka/mgwt

protected void pushToken(String token) {
  historian.pushState(token, Window.getTitle(), "#" + History.encodeHistoryToken(token));
}

代码示例来源:origin: com.googlecode.mgwt/mgwt

protected void pushToken(String token) {
  historian.pushState(token, Window.getTitle(), "#" + History.encodeHistoryToken(token));
}

代码示例来源:origin: com.allen-sauer.gwt.log/gwt-log

@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);

代码示例来源:origin: com.googlecode.mgwt/mgwt

@Override
public void onValueChange(ValueChangeEvent<String> event) {
  eventBus.fireEvent(new PopStateEvent(event.getValue(), Window.getTitle(), Window.Location.getHref()));
}

代码示例来源:origin: dankurka/mgwt

@Override
public void onValueChange(ValueChangeEvent<String> event) {
  eventBus.fireEvent(new PopStateEvent(event.getValue(), Window.getTitle(), Window.Location.getHref()));
}

代码示例来源:origin: org.kuali.student.core/ks-common-ui

/**
 * Shows the uiObject content in a printable form in a new window
 * @param uiObject
 */
public static void print(UIObject uiObject){
  String headTag = "";
  String styleTags = "";
  NodeList<com.google.gwt.dom.client.Element> head = Document.get().getElementsByTagName("head");
  if(head.getItem(0) != null){
    com.google.gwt.dom.client.Element e = head.getItem(0);
    NodeList<com.google.gwt.dom.client.Element> styles = e.getElementsByTagName("style");
    for(int i = 0; i < styles.getLength(); i++){
      styleTags = styleTags + styles.getItem(i).getString();
      
    }
  }
  headTag = "<HEAD><TITLE>Print - " + Window.getTitle() + "</TITLE>" + styleTags + "</HEAD>";
  openPrintWindow(uiObject.getElement().getString(), headTag, num);
  num++;
}

相关文章