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

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

Introduction

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

Prototype

public static void setTitle(String title) 

Source Link

Usage

From source file:com.LSH.client.Error404.java

License:Apache License

/**
 * ?  /*from w  w w.j  a  v a  2  s  .  c om*/
 * @param link  ??
 */
private void PrintError(ReturnLinkData link) {
    String result = link.getErrorCode();

    Window.setTitle("404 - Page Not Found");
    label.setHTML("<h1>404 Page!</h1><br>" + result + "<br><br> But, maybe, you want <br> to create a "
            + "<a href=\"LSH.html\">shortlink</a> ?");
}

From source file:com.murrayc.murraycgwtpexample.client.application.thing.ThingView.java

License:Open Source License

@Override
public void setThing(final Thing thing) {
    Window.setTitle("murrayc GWTP AppEngine Example" + ": " + "Thing" + ": " + thing.getText());

    choicesPanel.clear();//w ww .j  av a2  s.  c  o m

    if (thing == null) {
        thingLabel.setText("");
        return;
    }

    thingLabel.setText(thing.getText());

    List<String> choices = new ArrayList<>();
    choices.add("Yes");
    choices.add("No");
    final String groupName = "choices";
    for (final String choice : choices) {
        final RadioButton radioButton = new RadioButton(groupName, choice);
        radioButton.addStyleName("thing-radio-button");
        radioButton.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
            @Override
            public void onValueChange(final ValueChangeEvent<Boolean> event) {
                if (event.getValue()) {
                    submitAnswer(choice);
                }
            }
        });

        choicesPanel.add(radioButton);
    }

    updateResultPanelUi(State.WAITING_FOR_ANSWER);
    resultLabel.setText("");
}

From source file:com.polymerui.client.view.panel.MainPanel.java

License:Apache License

@Override
public void drawInfo(InfoType e, String s) {
    if (e == InfoType.TITLE) {
        Window.setTitle(s);
        return;/*from   ww w.  j av a2  s. c  o m*/
    }
    String pName = mapToElem.get(e);
    if (pName == null) {
        Utils.errAlertB(M.M().MainPanelNotImplemented(e.name()));
        return;
    }
    Widget w = PolymerUtil.findandverifyWidget(M.M().MainPanelActionName(e.name(), pName), ha, pName,
            Label.class);
    Label l = (Label) w;
    l.setText(s);
}

From source file:com.qqtem.LoginManager.client.QqTem.java

License:Open Source License

public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();
    rootPanel.setSize("100%", "100%");

    Window.setTitle("qqTem - Login");

    FlexTable flexTable = new FlexTable();
    rootPanel.add(flexTable, 0, 0);/*from   w  ww .  j av  a2 s.c  o  m*/
    flexTable.setWidth("100%");

    Image logo = new Image("logo.png");
    flexTable.setWidget(0, 0, logo);

    logout = new Hyperlink("Logout", false, "newHistoryToken");
    logout.setVisible(false);
    logout.setWidth("45px");

    logout.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            QqTem.realizaLogout();
        }
    });
    flexTable.setWidget(1, 0, logout);

    verticalPanel = new VerticalPanel();
    flexTable.setWidget(2, 0, verticalPanel);
    verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    verticalPanel.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
    verticalPanel.setSize("100px", "100px");

    horizontalPanel = new HorizontalPanel();
    verticalPanel.add(horizontalPanel);

    Login login = new Login();
    horizontalPanel.add(login);

    flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER);
    flexTable.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_TOP);
    flexTable.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    flexTable.getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_CENTER);
    flexTable.getCellFormatter().setVerticalAlignment(2, 0, HasVerticalAlignment.ALIGN_TOP);
}

From source file:com.qqtem.LoginManager.client.QqTem.java

License:Open Source License

public static void realizaLogin() {
    verticalPanel.remove(horizontalPanel);

    Abas homeAbas = new Abas();

    verticalPanel.setSize("100%", "100%");
    verticalPanel.add(homeAbas);//from  w  ww. j a  v  a 2  s.co  m

    logout.setVisible(true);

    Window.setTitle("qqTem - Home");
    return;
}

From source file:com.qqtem.LoginManager.client.QqTem.java

License:Open Source License

public static void realizaLogout() {
    logout.setVisible(false);/*w w w. j a  va2  s  .com*/

    verticalPanel.remove(0);
    horizontalPanel.remove(0);
    verticalPanel.add(horizontalPanel);
    verticalPanel.setSize("100px", "100px");

    Login login = new Login();
    horizontalPanel.add(login);

    Window.setTitle("qqTem - Login");

}

From source file:com.sun.labs.aura.music.wsitm.client.ui.swidget.Swidget.java

License:Open Source License

protected final void updateWindowTitle(String swidgetTitle) {
    if (swidgetTitle != null && swidgetTitle.length() > 0) {
        Window.setTitle(swidgetTitle + " - The Music Explaura");
    } else {/*w w  w  .j  a va  2  s. c  o m*/
        Window.setTitle("The Music Explaura");
    }
}

From source file:com.tasktop.c2c.server.profile.web.ui.client.presenter.components.HeaderPresenter.java

License:Open Source License

public void setPlace(Place place) {
    String heading = "";
    List<Breadcrumb> breadcrumbs = Collections.EMPTY_LIST;
    Project project = null;// w w w. ja v  a  2s. c o  m
    Section section = null;
    String windowTitle = WindowTitleBuilder.PRODUCT_NAME;

    if (place instanceof HasProjectPlace) {
        project = ((HasProjectPlace) place).getProject();
    }
    if (place instanceof HeadingPlace) {
        heading = ((HeadingPlace) place).getHeading();
    }
    if (place instanceof BreadcrumbPlace) {
        breadcrumbs = ((BreadcrumbPlace) place).getBreadcrumbs();
    }
    if (place instanceof SectionPlace) {
        section = ((SectionPlace) place).getSection();
    }
    if (place instanceof WindowTitlePlace) {
        windowTitle = ((WindowTitlePlace) place).getWindowTitle();
    }
    String currentQuery = null;
    if (place instanceof ProjectsPlace) {
        currentQuery = ((ProjectsPlace) place).getQuery();
    }
    view.setSearchText(currentQuery);

    view.setProject(project);
    view.setPageTitle(heading);
    view.setBreadcrumbs(breadcrumbs);
    view.setSection(section);
    if (windowTitle != null) {
        Window.setTitle(windowTitle);
    }

    view.setCredentials(getAppState().getCredentials());
    view.setGravatarHash(getAppState().getCredentials() == null ? null
            : getAppState().getCredentials().getProfile().getGravatarHash());

}

From source file:com.tractionsoftware.gwt.demo.viewport.client.ViewportDemo.java

License:Apache License

private void update() {
    boolean hasFocus = Viewport.hasFocus();
    String msg = (hasFocus ? "TRUE" : "FALSE") + " from Viewport.hasFocus()";
    focusLabel.setText(msg);// ww w  .j a  v a 2 s . c  o m
    Window.setTitle(msg);
}

From source file:com.urlisit.siteswrapper.cloud.client.RenderedPage.java

License:Apache License

@Override
public void onValueChange(ValueChangeEvent<String> event) {
    if (event.getValue().equals(pageTitle)) {
        RenderedPage.instanceMap.get(Window.getTitle()).dematerialize();
        RenderedPage.instanceMap.get(event.getValue()).materialize();
        Window.setTitle(event.getValue());
    }//from ww  w.  jav a2s  .c o  m
}