Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.HTML.addStyleName()


        final Button enter = new Button("Enter");

        addStyleName("login");
        table.addStyleName("login");
        label.addStyleName("login");
        header.addStyleName("login-caption");
               
        table.setWidget(0, 0, header);
        table.setWidget(2, 0, label);
        table.setWidget(2, 1, traderName);
        table.setWidget(4, 1, enter);
View Full Code Here


   
    HTML decorate(String s, String[] markersAndStyles) {
            HTML html = new HTML(s);
            String style = getStyle(s, MARKERS_AND_STYLES);
            if (style != null)
                html.addStyleName(style);
            return html;
    }
   
    static String getStyle(String s, String[] markersAndStyles) {
        String style = null;
View Full Code Here

     */
    public static HTML formatPrice(double price, boolean style) {
        HTML label = new HTML();
        label.setText(priceFormat.format(price));
        if (style)
            label.addStyleName(price >= 0 ? "positive" : "negative");
        return label;
    }
   
    /**
     * Creates a HTML label for the given integer.
View Full Code Here

            raw += " (" + pctraw + ")";
        }
        String style = p1 >= p2 ? "positive" : "negative";
        HTML html = new HTML();
        html.setText(raw);
        html.addStyleName(style);
        return html;
    }
   
    /**
     * Creates a HTML label for the given value and applies style based on the sign.
View Full Code Here

    public static HTML formatChange(double c) {
        HTML html = new HTML();
        String raw = changeFormat.format(c);
        String style = c >= 0 ? "positive" : "negative";
        html.setText(raw);
        html.addStyleName(style);
        return html;
    }
}
View Full Code Here

        final HTML header = new HTML();
        final boolean ask = (tradable instanceof Ask);
        String txt = (matches.isEmpty() ? "No" : ""+matches.size()) + " matching "+ (ask ? "Bid" : "Ask") + " for "
                   + toString(tradable) + "<br>";
        header.setHTML(txt);
        header.addStyleName("table-caption");
       
        Button close = new Button(matches.isEmpty() ? "OK" : "Cancel");
        close.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                hide();
View Full Code Here

            new AsyncCallback<User>() {
              public void onFailure(Throwable caught) {
                // Show the RPC error message to the user
                dialogBox
                    .setText("Remote Procedure Call - Failure");
                serverResponseLabel
                    .addStyleName("serverResponseLabelError");
                serverResponseLabel.setHTML(SERVER_ERROR);
                dialogBox.center();
                closeButton.setFocus(true);
              }
View Full Code Here

        {
          public void onFailure(Throwable caught)
          {
            // Show the RPC error message to the user
            dialogBox.setText("Remote Procedure Call - Failure");
            serverResponseLabel.addStyleName("serverResponseLabelError");
            serverResponseLabel.setHTML(SERVER_ERROR);
            dialogBox.center();
            closeButton.setFocus(true);
          }
View Full Code Here

            new AsyncCallback<String>() {
              public void onFailure(Throwable caught) {
                // Show the RPC error message to the user
                dialogBox
                    .setText("Remote Procedure Call - Failure");
                serverResponseLabel
                    .addStyleName("serverResponseLabelError");
                serverResponseLabel.setHTML(SERVER_ERROR);
                dialogBox.center();
                closeButton.setFocus(true);
              }
View Full Code Here

            new AsyncCallback<String>() {
              public void onFailure(Throwable caught) {
                // Show the RPC error message to the user
                dialogBox
                    .setText("Remote Procedure Call - Failure");
                serverResponseLabel
                    .addStyleName("serverResponseLabelError");
                serverResponseLabel.setHTML(SERVER_ERROR);
                dialogBox.center();
                closeButton.setFocus(true);
              }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.