Example usage for com.google.gwt.user.client.ui Widget setStyleName

List of usage examples for com.google.gwt.user.client.ui Widget setStyleName

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Widget setStyleName.

Prototype

public void setStyleName(String style) 

Source Link

Document

Clears all of the object's style names and sets it to the given style.

Usage

From source file:com.risevision.ui.client.common.widgets.NotificationsWidget.java

License:Open Source License

private void addRow(Widget widget) {
    row++;
    setWidget(row, 0, widget);
    widget.setStyleName("rdn-CheckBox");
}

From source file:com.risevision.ui.client.company.ManageSecurityWidget.java

License:Open Source License

private void gridAdd(String label, Widget widget, String styleName) {
    row++;/* w w  w  .jav a 2 s .co  m*/
    mainGrid.getCellFormatter().setStyleName(row, 0, "rdn-Column1");
    mainGrid.setText(row, 0, label);
    if (widget != null) {
        mainGrid.setWidget(row, 1, widget);
        if (styleName != null)
            widget.setStyleName(styleName);
    }
}

From source file:com.risevision.ui.client.gadget.GadgetCustomSettingsWidget.java

License:Open Source License

private void gridAdd(String label, Widget widget, String styleName) {
    row++;//www. j a v  a 2s .co  m

    //      mainGrid.getCellFormatter().setStyleName(row, 0, "rdn-Column1");
    //      mainGrid.setHTML(row, 0, label);

    Label rowName = new Label(label, true);
    rowName.setWidth("175px");
    rowName.getElement().getStyle().setPropertyPx("lineHeight", 16);

    mainGrid.setWidget(row, 0, rowName);
    //      mainGrid.getCellFormatter().setVerticalAlignment(row, 0, HasVerticalAlignment.ALIGN_TOP);
    //      mainGrid.getCellFormatter().getElement(row, 0).getStyle().setPaddingTop(8, Unit.PX);
    mainGrid.getCellFormatter().getElement(row, 0).getStyle().setHeight(24, Unit.PX);

    if (widget != null) {
        mainGrid.setWidget(row, 1, widget);
        if (styleName != null)
            widget.setStyleName(styleName);

        //         mainGrid.getCellFormatter().getElement(row, 1).getStyle().setPaddingTop(8, Unit.PX);
        mainGrid.getCellFormatter().setVerticalAlignment(row, 1, HasVerticalAlignment.ALIGN_TOP);
    }
}

From source file:com.risevision.ui.client.presentation.placeholder.ImageSettingsWidget.java

License:Open Source License

private void gridAdd(String label, String tooltip, Widget widget, String styleName) {
    row++;/*from w  w w.  j  av  a  2 s . c  o m*/

    mainGrid.getCellFormatter().setStyleName(row, 0, "rdn-ColumnShort");
    TooltipLabelWidget tooltipWidget = new TooltipLabelWidget(label, tooltip);

    mainGrid.setWidget(row, 0, tooltipWidget);
    if (widget != null) {
        mainGrid.setWidget(row, 1, widget);
        if (styleName != null)
            widget.setStyleName(styleName);
    }
}

From source file:com.risevision.ui.client.presentation.placeholder.PlaceholderItemManageWidget.java

License:Open Source License

private void gridAdd(String label, String tooltip, Widget widget, String styleName) {
    row++;// w  w  w. j av  a  2 s.c  o m
    mainGrid.getCellFormatter().setStyleName(row, 0, "rdn-ColumnShort");
    TooltipLabelWidget tooltipWidget = new TooltipLabelWidget(label, tooltip);

    mainGrid.setWidget(row, 0, tooltipWidget);
    if (widget != null) {
        mainGrid.setWidget(row, 1, widget);

        if (styleName != null)
            widget.setStyleName(styleName);
    }
}

From source file:com.risevision.ui.client.presentation.placeholder.PlaceholderManageWidget.java

License:Open Source License

private void gridAdd(String label, String tooltip, Widget widget, String styleName, Widget units) {
    row++;//w ww  .  j a  va 2s.  co  m
    manageGrid.getCellFormatter().setStyleName(row, 0, "rdn-ColumnShort");
    TooltipLabelWidget tooltipWidget = new TooltipLabelWidget(label, tooltip);

    manageGrid.setWidget(row, 0, tooltipWidget);
    if (widget != null) {
        if (styleName != null)
            widget.setStyleName(styleName);

        if (units == null) {
            manageGrid.setWidget(row, 1, widget);
        } else {
            HorizontalPanel panel = new HorizontalPanel();
            panel.add(widget);
            panel.add(new HTML("  "));
            panel.add(units);
            manageGrid.setWidget(row, 1, panel);
        }
    }
}

From source file:com.risevision.ui.client.presentation.placeholder.WidgetSettingsWidget.java

License:Open Source License

private void gridAdd(String label, Widget widget, String styleName) {
    row++;//  www  .  j  a v  a  2  s  .  co m

    mainGrid.getCellFormatter().setStyleName(row, 0, "rdn-ColumnShort");
    mainGrid.setHTML(row, 0, label);
    if (widget != null) {
        mainGrid.setWidget(row, 1, widget);
        if (styleName != null)
            widget.setStyleName(styleName);
    }
}

From source file:com.risevision.ui.client.presentation.placeholder.WidgetSettingsWidget.java

License:Open Source License

private void gridAdd(Widget widget, String styleName) {
    row++;// ww  w .  j a v  a  2s  .co  m

    mainGrid.getCellFormatter().setStyleName(row, 0, "rdn-ColumnShort");
    if (widget != null) {
        mainGrid.setWidget(row, 0, widget);
        if (styleName != null)
            widget.setStyleName(styleName);
    }
}

From source file:com.risevision.ui.client.schedule.ScheduleItemManageWidget.java

License:Open Source License

private void gridAdd(Grid grid, String label, Widget widget, String styleName) {
    row++;/*www. j  av  a 2 s. co  m*/
    grid.getCellFormatter().setStyleName(row, 0, "rdn-ColumnShort");
    grid.setText(row, 0, label);
    if (widget != null) {
        grid.setWidget(row, 1, widget);
        if (styleName != null)
            widget.setStyleName(styleName);
    }
}

From source file:com.seanchenxi.gwt.serenity.client.view.impl.DiscussionListViewImpl.java

License:Apache License

@Override
public void updateResponseViewPosition(int discussionId) {
    Widget respondWidget = Widget.asWidgetOrNull(respond);
    if (respondWidget == null)
        return;//  ww  w  .ja  v  a  2  s  .  co  m
    DiscussionViewImpl discussion = discussions.get(discussionId);
    if (discussion != null) {
        respond.setDiscussionId(discussion.getId());
        respondWidget.addStyleName(getLevelStyle(discussion.getLevel()));
        main.insert(respond, main.getWidgetIndex(discussion) + 1);
    } else {
        respond.setDiscussionId(0);
        respondWidget.setStyleName(StringPool.BLANK);
        main.add(respond);
    }
}