Example usage for com.google.gwt.user.client Window getTitle

List of usage examples for com.google.gwt.user.client Window getTitle

Introduction

In this page you can find the example usage for com.google.gwt.user.client Window getTitle.

Prototype

public static String getTitle() 

Source Link

Usage

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;/*from www. j  a va 2 s .c o m*/
    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:edu.caltech.ipac.firefly.ui.TitleFlasher.java

public static void flashTitle(String altTitle) {

    if (!getHasFocus()) {
        if (focusFunc == null) {
            focusFunc = makeFocusFunction();
            addFocusFunction(focusFunc);
        }/*  ww  w.j a  v  a2 s . c o m*/
        if (favIconElement == null) {
            findFavIcon();
        }
        if (flashTimer != null)
            flashTimer.stop();

        flashTimer = new FlashTitleTimer(altTitle, Window.getTitle());
        flashTimer.schedule(300);
    }

}

From source file:net.sf.mmm.client.ui.impl.gwt.widget.window.adapter.UiWidgetAdapterGwtMainWindow.java

License:Apache License

/**
 * {@inheritDoc}
 */
@Override
public String getTitle() {

    return Window.getTitle();
}

From source file:org.ducktools.tutorial.gwt.architecture.photoalbum.ui.application.impl.ApplicationDisplayImpl.java

License:Open Source License

/**
 * @see ApplicationDisplay#getTitle()
 */
@Override
public String getTitle() {
    return Window.getTitle();
}

From source file:org.eclipse.che.ide.core.ProjectStateHandler.java

License:Open Source License

private void rewriteBrowserHistory(@Nullable String projectName) {
    StringBuilder url = new StringBuilder();
    url.append(Config.getContext()).append('/').append(Config.getWorkspaceName());
    if (projectName != null) {
        url.append('/').append(projectName);
    }/*from ww  w .ja v  a 2 s  .co m*/
    Browser.getWindow().getHistory().replaceState(null, Window.getTitle(), url.toString());
}

From source file:org.ednovo.gooru.application.client.gin.AppPlaceManager.java

License:Open Source License

/**
 * @param previousRequestUrl the previousRequestUrl to set
 */// www . j  a  v  a 2 s .c om
public void setPreviousRequestUrl(PlaceRequest previousRequestUrl) {
    String viewToken = previousRequestUrl.getNameToken();
    if (viewToken.equals(PlaceTokens.PREVIEW_PLAY) || viewToken.equals(PlaceTokens.ASSESSMENT_PLAY)
            || viewToken.equals(PlaceTokens.COLLECTION_PLAY) || viewToken.equals(PlaceTokens.RESOURCE_PLAY)
            || viewToken.equals(PlaceTokens.COLLECTION)) {
        String previousViewToken = this.previousRequestUrl != null ? this.previousRequestUrl.getNameToken()
                : "";
        if (!previousViewToken.equals(PlaceTokens.PREVIEW_PLAY)
                && !previousViewToken.equals(PlaceTokens.ASSESSMENT_PLAY)
                && !previousViewToken.equals(PlaceTokens.COLLECTION_PLAY)
                && !previousViewToken.equals(PlaceTokens.RESOURCE_PLAY)) {
            setPreviousPlayerRequestUrl(getPreviousRequestUrl());
            setBeforePlayerOpenSeoToken(Window.getTitle());
        }
        this.previousRequestUrl = previousRequestUrl;
    } else {
        this.previousRequestUrl = previousRequestUrl;
    }
}

From source file:org.ednovo.gooru.client.gin.AppPlaceManager.java

License:Open Source License

/**
 * @param previousRequestUrl the previousRequestUrl to set
 *///from  ww w  .j  av  a 2s  . co m
public void setPreviousRequestUrl(PlaceRequest previousRequestUrl) {
    String viewToken = previousRequestUrl.getNameToken();
    if (viewToken.equals(PlaceTokens.PREVIEW_PLAY) || viewToken.equals(PlaceTokens.COLLECTION_PLAY)
            || viewToken.equals(PlaceTokens.RESOURCE_PLAY) || viewToken.equals(PlaceTokens.COLLECTION)) {
        String previousViewToken = this.previousRequestUrl != null ? this.previousRequestUrl.getNameToken()
                : "";
        if (!previousViewToken.equals(PlaceTokens.PREVIEW_PLAY)
                && !previousViewToken.equals(PlaceTokens.COLLECTION_PLAY)
                && !previousViewToken.equals(PlaceTokens.RESOURCE_PLAY)) {
            setPreviousPlayerRequestUrl(getPreviousRequestUrl());
            setBeforePlayerOpenSeoToken(Window.getTitle());
        }
        this.previousRequestUrl = previousRequestUrl;
    } else {
        this.previousRequestUrl = previousRequestUrl;
    }
}

From source file:org.nsesa.editor.gwt.core.client.ui.document.DefaultDocumentController.java

License:EUPL

/**
 * Callback when the document is loaded successfully from the backend after {@link #loadDocument()}.
 * This will set the document using {@link #setDocument(org.nsesa.editor.gwt.core.shared.DocumentDTO)},
 * update the title via a {@link org.nsesa.editor.gwt.core.client.event.SetWindowTitleEvent}, and request the actual document to be loaded via
 * {@link #loadDocumentContent()}.//w  w w. ja va  2 s .c  om
 *
 * @param document the received document DTO
 */
public void onDocumentLoaded(DocumentDTO document) {
    setDocument(document);
    final String title = Window.getTitle() + " "
            + clientFactory.getCoreMessages().windowTitleDocument(document.getName());
    clientFactory.getEventBus().fireEvent(new SetWindowTitleEvent(title));
    loadDocumentContent();
}