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:gov.nist.spectrumbrowser.client.UserCreateAccount.java

License:Open Source License

public void draw() {
    Window.setTitle("MSOD:Request Account");
    verticalPanel.clear();/*from w  ww. ja v  a  2  s .  c om*/
    HTML title = new HTML("<h2>Request Account </h2>");
    verticalPanel.add(title);

    Grid grid = new Grid(5, 2);

    grid.setText(0, 0, "Email Address");
    emailEntry = new TextBox();
    emailEntry.setWidth("250px");
    emailEntry.addKeyDownHandler(handler);
    grid.setWidget(0, 1, emailEntry);

    grid.setText(1, 0, "First Name");
    firstNameEntry = new TextBox();
    firstNameEntry.setWidth("250px");
    firstNameEntry.addKeyDownHandler(handler);
    grid.setWidget(1, 1, firstNameEntry);

    grid.setText(2, 0, "Last Name");
    lastNameEntry = new TextBox();
    lastNameEntry.setWidth("250px");
    lastNameEntry.addKeyDownHandler(handler);
    grid.setWidget(2, 1, lastNameEntry);

    grid.setText(3, 0, "Password");
    passwordEntry = new PasswordTextBox();
    passwordEntry.setWidth("250px");
    passwordEntry.addKeyDownHandler(handler);
    grid.setWidget(3, 1, passwordEntry);

    grid.setText(4, 0, "Re-type password");
    passwordEntryConfirm = new PasswordTextBox();
    passwordEntryConfirm.setWidth("250px");
    passwordEntryConfirm.addKeyDownHandler(handler);
    grid.setWidget(4, 1, passwordEntryConfirm);
    verticalPanel.add(grid);

    grid.getCellFormatter().addStyleName(0, 0, "alignMagic");
    grid.getCellFormatter().addStyleName(1, 0, "alignMagic");
    grid.getCellFormatter().addStyleName(2, 0, "alignMagic");
    grid.getCellFormatter().addStyleName(3, 0, "alignMagic");
    grid.getCellFormatter().addStyleName(4, 0, "alignMagic");

    Grid buttonGrid = new Grid(1, 2);
    verticalPanel.add(buttonGrid);

    sendButton = new Button("Submit");
    sendButton.addStyleName("sendButton");
    buttonGrid.setWidget(0, 0, sendButton);
    sendButton.addClickHandler(handler);

    cancelButton = new Button("Cancel");
    buttonGrid.setWidget(0, 1, cancelButton);
    cancelButton.addClickHandler(handler);
}

From source file:gov.nist.spectrumbrowser.client.UserForgotPassword.java

License:Open Source License

public void draw() {
    Window.setTitle("MSOD:Reset Password");
    verticalPanel.clear();//from www .  j a  v  a 2  s.c om
    HTML title = new HTML("<h2>Reset Password</h2>");
    verticalPanel.add(title);

    Grid grid = new Grid(3, 2);

    grid.setText(0, 0, "Email Address");
    emailEntry = new TextBox();
    emailEntry.setWidth("250px");
    emailEntry.addKeyDownHandler(handler);
    grid.setWidget(0, 1, emailEntry);

    grid.setText(1, 0, "New Password");
    passwordEntry = new PasswordTextBox();
    passwordEntry.setWidth("250px");
    passwordEntry.addKeyDownHandler(handler);
    grid.setWidget(1, 1, passwordEntry);

    grid.setText(2, 0, "Re-type New Password");
    passwordEntryConfirm = new PasswordTextBox();
    passwordEntryConfirm.setWidth("250px");
    passwordEntryConfirm.addKeyDownHandler(handler);
    grid.setWidget(2, 1, passwordEntryConfirm);
    verticalPanel.add(grid);

    grid.getCellFormatter().addStyleName(0, 0, "alignMagic");
    grid.getCellFormatter().addStyleName(1, 0, "alignMagic");
    grid.getCellFormatter().addStyleName(2, 0, "alignMagic");

    Grid buttonGrid = new Grid(1, 2);
    verticalPanel.add(buttonGrid);

    sendButton = new Button("Submit");
    sendButton.addStyleName("sendButton");
    buttonGrid.setWidget(0, 0, sendButton);
    sendButton.addClickHandler(handler);

    cancelButton = new Button("Cancel");
    buttonGrid.setWidget(0, 1, cancelButton);
    cancelButton.addClickHandler(handler);
}

From source file:ilarkesto.gwt.client.desktop.Desktop.java

License:Open Source License

public static void showWorkspace(Workspace workspace) {
    if (sidebar != null)
        sidebar.hide();/*from  www .  j  a  v a  2s  .com*/

    RootPanel workspaceContainer = RootPanel.get("workspaceContainer");
    workspaceContainer.clear();

    RootPanel titleContainer = RootPanel.get("titleContainer");
    titleContainer.clear();

    RootPanel actionbarContainer = RootPanel.get("actionbarContainer");
    actionbarContainer.clear();

    Window.scrollTo(0, 0);

    titleContainer.add(workspace.getTitleWidget());
    workspaceContainer.add(workspace.getContentWrapper());
    actionbarContainer.add(workspace.getActionbar());
    Window.setTitle(workspace.getTitleText() + " - GOON28");
}

From source file:ilarkesto.gwt.client.desktop.Workspace.java

License:Open Source License

public Workspace setTitle(String title, String contentTitle) {
    title = Str.getFirstLine(title);//from  w  ww.jav a  2 s.  c om
    contentTitle = Str.getFirstLine(contentTitle);

    titleLabel.setText(title);
    titleContentLabel.setText(contentTitle);

    if (Str.isBlank(contentTitle)) {
        titleText = title;
    } else {
        titleText = contentTitle + " - " + title;
    }

    Window.setTitle(titleText + " - GOON28");

    return this;
}

From source file:info.piwai.rockslide.client.shownotes.ShowNotesViewer.java

License:Apache License

public void load() {
    Window.setTitle("Show notes");
    Resources.instance.shownotes().ensureInjected();
    RootPanel rootPanel = RootPanel.get();
    final HTML html = new HTML();
    rootPanel.add(html);/*from   ww w .jav  a  2  s .  co m*/

    html.setHTML("<div>Waiting for show notes</div>");

    WindowHelper.registerListener(ShowNotesSender.LISTENER_NAME, new WindowMessageListener<String>() {
        @Override
        public void onMessage(String message) {
            html.setHTML(message);
        }
    });
    WindowHelper.sendMessage("childLoaded", null);
}

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

License:Apache License

/**
 * {@inheritDoc}
 */
@Override
public void setTitle(String title) {

    Window.setTitle(title);
}

From source file:org.apache.openjpa.trader.client.OpenTrader.java

License:Apache License

/**
 * Builds up the widgets once the login is complete i.e. the server has supplied
 * the initialization data.//  ww w . j  ava 2 s. co  m
 *
 */
void init(Trader trader, String uri, List<Stock> stocks) {
    this.trader = trader;
    _serviceURI = uri;

    Window.setTitle(trader.getName());

    int W = Window.getClientWidth();
    int H = 900;//Window.getClientHeight();

    int headerHeight = 05 * H / 100;
    int westWidth = 25 * W / 100;
    int westHeight = 80 * H / 100;
    int centerWidth = 60 * W / 100;
    int centerHeight = 80 * H / 100;
    int footerHeight = 02 * H / 100;
    Unit unit = Unit.PX;

    stockPanel = new MarketDataPanel(this, westWidth - 10, 40 * westHeight / 100);
    int N = stocks.size();
    for (int i = 0; i < N; i++) {
        stockPanel.insert(stocks.get(i));
    }

    soldTradePanel = new TradeHistoryPanel(this, Ask.class, westWidth - 10, 20 * westHeight / 100);
    boughtTradePanel = new TradeHistoryPanel(this, Bid.class, westWidth - 10, 20 * westHeight / 100);
    serverPanel = new ServerLogPanel(this, centerWidth, 40 * centerHeight / 100);
    tradePanel = new TradingWindow(this, centerWidth, 40 * centerHeight / 100);
    orderPanel = new TradeOrderWindow(this, centerWidth, 10 * centerHeight / 100);

    FlowPanel west = new FlowPanel();
    west.setSize((westWidth - 10) + "px", westHeight + "px");
    west.add(decorate(stockPanel));
    west.add(new HTML("<p>"));
    west.add(decorate(soldTradePanel));
    west.add(new HTML("<p>"));
    west.add(decorate(boughtTradePanel));

    FlowPanel center = new FlowPanel();
    center.setSize(centerWidth + "px", centerHeight + "px");
    center.add(decorate(orderPanel));
    center.add(new HTML("<p>"));
    center.add(decorate(tradePanel));
    center.add(new HTML("<p>"));
    center.add(decorate(serverPanel));

    DockLayoutPanel main = new DockLayoutPanel(unit);

    main.addNorth(createHeader(), headerHeight);
    main.addSouth(createFooter(), footerHeight);
    main.addWest(west, westWidth);
    main.add(center);

    RootLayoutPanel.get().add(main);
    main.animate(500);
    setUpHelp();
    stockPanel.startStockWatcher();
    tradePanel.startTradableRefresher();
}

From source file:org.bonitasoft.forms.client.view.common.DOMUtils.java

License:Open Source License

/**
 * @param headNodes/*  www. j a  v  a2  s.c o m*/
 */
public void addHeaders(final List<HeadNode> headNodes) {
    final Element headElement = getHeadElement();
    if (headElement != null) {
        for (final HeadNode headNode : headNodes) {
            if (isHeadNodeUseful(headNode)) {
                if (!isContainHeadNode(headElement, headNode)) {
                    // removeOldHeaderElementIfPresent(headElement, headNode);
                    if (headNode.getTagName() == null) {
                        //for comment nodes
                        final Node textNode = Document.get().createTextNode(headNode.getInnerHtml());
                        headElement.appendChild(textNode);
                    } else {
                        //for other nodes
                        final Element headChildElement = DOM.createElement(headNode.getTagName());
                        for (final Entry<String, String> attributeEntry : headNode.getAttributes().entrySet()) {
                            headChildElement.setAttribute(attributeEntry.getKey(), attributeEntry.getValue());
                        }
                        if (headNode.getInnerHtml() != null && headNode.getInnerHtml().length() > 0) {
                            headChildElement.setInnerText(headNode.getInnerHtml());
                        }
                        headElement.appendChild(headChildElement);
                    }
                }
                if ("title".equalsIgnoreCase(headNode.getTagName())) {
                    Window.setTitle(headNode.getInnerHtml());
                }
            }
        }
    }
}

From source file:org.clevermore.monitor.client.login.LoginWidget.java

License:Apache License

public LoginWidget(ConfigurationServiceAsync<CC> service) {

    if (!GWT.isScript()) {
        userName.setText("admin");
        password.setText("password");
    }//from   ww w. j a v a  2 s .c om
    initWidget(fp);

    fp.setStyleName("login");
    Label un = new Label("User Name:");
    un.getElement().setId("label");
    fp.add(un);
    fp.add(userName);
    Label pw = new Label("Password:");
    pw.getElement().setId("label");
    fp.add(pw);
    fp.add(password);
    fp.add(login);
    fp.add(staySignedIn);
    fp.add(errorMsg);
    errorMsg.getElement().getStyle().setColor("red");
    errorMsg.getElement().getStyle().setFontStyle(FontStyle.ITALIC);

    password.addKeyPressHandler(enterhandler);
    password.getElement().setId("input");

    userName.addKeyPressHandler(enterhandler);
    userName.getElement().setId("input");

    login.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            login.setEnabled(false);
            login();
        }

    });

    final HTML version = new HTML();
    version.getElement().setId("version");
    fp.add(version);
    service.getClientConfigurations(new AsyncCallback<CC>() {

        @Override
        public void onSuccess(CC result) {
            version.setText("Env:" + result.getTitle() + ", Version:" + result.getVersion());
            Window.setTitle(result.getTitle() + ", v:" + result.getVersion());
            cc = result;

            staySignedIn.setValue(LocalStorage.readStoredItem(SSICH) != null
                    && LocalStorage.readStoredItem(SSICH).equals("on"));
            String user = StringFormatter.Base64Decode(LocalStorage.readStoredItem(SSIU));
            String pass = StringFormatter.Base64Decode(LocalStorage.readStoredItem(SSIP));
            if (staySignedIn.getValue() && user != null && pass != null) {
                userName.setText(user);
                password.setText(pass);
                login();
            }
        }

        @Override
        public void onFailure(Throwable caught) {
            version.setText("Error getting version:" + caught.getMessage());
        }
    });

}

From source file:org.codesearch.searcher.client.ui.fileview.FileActivity.java

License:Open Source License

/**
 * {@inheritDoc}//  w  w  w . j av  a  2 s  . c om
 */
@Override
public void onStop() {
    Window.setTitle("Codesearch");
    fileView.disconnectEventHandlers();
    fileView.cleanup();
}