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

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

Introduction

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

Prototype

public void addStyleName(String style) 

Source Link

Document

Adds a secondary or dependent style name to this object.

Usage

From source file:com.moesol.gwt.maps.client.controls.SearchControl.java

License:Open Source License

@UiHandler("button")
public void onButtonMouseOver(MouseOverEvent e) {
    Widget w = (Widget) e.getSource();
    w.addStyleName("map-SmallButtonMouseOver");
    input.getElement().getStyle().setDisplay(Display.BLOCK);
}

From source file:com.msco.mil.client.com.sencha.gxt.explorer.client.button.ButtonAlignUiBinderExample.java

License:sencha.com license

public Widget asWidget() {
    Widget w = uiBinder.createAndBindUi(this);
    w.addStyleName("margin-10");
    return w;
}

From source file:com.msco.mil.client.com.sencha.gxt.explorer.client.tree.BasicTreeUiBinderExample.java

License:sencha.com license

public Widget asWidget() {

    FolderDto root = TestData.getMusicRootFolder();
    for (BaseDto base : root.getChildren()) {
        store.add(base);/*from  w w w  .jav a 2  s . c o  m*/
        if (base instanceof FolderDto) {
            processFolder(store, (FolderDto) base);
        }
    }

    Widget widget = uiBinder.createAndBindUi(this);
    widget.addStyleName("margin-10");
    tree.getStyle().setLeafIcon(ExampleImages.INSTANCE.music());
    return widget;
}

From source file:com.myself.client.binder.TreeT.java

License:sencha.com license

private Widget constructUi() {
    FolderDto root = TestData.getMusicRootFolder();
    for (BaseDto base : root.getChildren()) {
        store.add(base);//  w w w  .  j  a v a  2 s  .  c o m
        if (base instanceof FolderDto) {
            processFolder(store, (FolderDto) base);
        }
    }

    Widget widget = uiBinder.createAndBindUi(this);
    widget.addStyleName("margin-10");
    tree.getStyle().setLeafIcon(ExampleImages.INSTANCE.music());

    tree.setIconProvider(new IconProvider<BaseDto>() {
        @Override
        public ImageResource getIcon(BaseDto p_model) {
            if (p_model instanceof FolderDto)
                return ExampleImages.INSTANCE.accordion();
            if (p_model.getName().equals("Violin Concerto"))
                return ExampleImages.INSTANCE.user();
            else
                return ExampleImages.INSTANCE.music();
        }
    });

    return widget;
}

From source file:com.novartis.pcs.ontology.webapp.client.view.WidgetBusyIndicatorHandler.java

License:Apache License

public WidgetBusyIndicatorHandler(Widget widget, String style, String errorStyle) {
    this.widget = widget;
    this.style = style == null ? "busy-icon-right" : style;
    this.errorStyle = errorStyle == null ? "error-icon-right" : errorStyle;
    this.count = 0;
    this.error = false;

    if (style == null) {
        widget.addStyleName("busy-icon-right-padded");
    }//from  ww  w .j a  v a2 s .com

}

From source file:com.objetdirect.gwt.umlapi.client.helpers.CursorIconManager.java

License:Open Source License

public void changeCursorIcon(PointerStyle cursor, Widget widget) {
    if (currentStyleApplied != null) {
        widget.removeStyleName(currentStyleApplied);
    }/* w w  w  . j  ava  2 s  .co m*/

    widget.addStyleName(cursor.cssName);
    currentStyleApplied = cursor.cssName;
}

From source file:com.pronoiahealth.olhie.client.widgets.FlexTableExt.java

License:Open Source License

/**
 * Add a column// w  w  w.ja v  a  2s . c o  m
 * 
 * @param columnHeading
 */
public void addColumn(Object columnHeading, String styleName, String cellStyleName) {
    Widget widget = createCellWidget(columnHeading);
    int cell = getCellCount(HeaderRowIndex);
    widget.setWidth("100%");
    widget.addStyleName(styleName);
    setWidget(HeaderRowIndex, cell, widget);
    getCellFormatter().addStyleName(HeaderRowIndex, cell, cellStyleName);
}

From source file:com.puzzlebazar.client.ui.SquareGridLayoutPanel.java

License:Apache License

/**
 * Creates a standard vertex widget and adds it at a specific vertex.
 * (See {@link com.puzzlebazar.shared.util.Recti} for details on cells and vertices.)
 *
 * @param loc The location of this vertex (a {@link Vec2i}).
 * @param thickness The desired thickness for this edge (in pixels).
 * @param styleNames A list of string containing all the desired style names. (The default edge style is added automatically.)
 * @return The newly created widget./* w  ww .j av  a2  s.c o  m*/
 */
public Widget createVertex(Vec2i loc, int thickness, String... styleNames) {
    Widget widget = GWT.create(FlowPanel.class);
    widget.addStyleName(resources.style().vertex());
    for (String style : styleNames) {
        widget.addStyleName(style);
    }
    addVertexWidget(loc, widget, thickness);
    return widget;
}

From source file:com.puzzlebazar.client.ui.SquareGridLayoutPanel.java

License:Apache License

/**
 * Creates a standard edge widget and adds it to the square
 * at a specific vertical edge./*from   ww  w.ja  v a  2  s  . c o m*/
 *
 * @param loc The location of this horizontal edge. A {@link Vec2i} where the
 *            x coordinate is a cell coordinate and the y coordinate is a vertex coordinate.
 *            (See {@link com.puzzlebazar.shared.util.Recti} for details on cells and vertices.)
 * @param thickness The desired thickness for this edge (in pixels).
 * @param styleNames A list of string containing all the desired style names. (The default edge style is added automatically.)
 * @return The newly created widget.
 */
public Widget createHorizontalEdge(Vec2i loc, int thickness, String... styleNames) {
    Widget widget = GWT.create(FlowPanel.class);
    widget.addStyleName(resources.style().edge());
    for (String style : styleNames) {
        widget.addStyleName(style);
    }
    addHorizontalEdgeWidget(loc, widget, thickness);
    return widget;
}

From source file:com.puzzlebazar.client.ui.SquareGridLayoutPanel.java

License:Apache License

/**
 * Creates a standard edge widget and adds it to the square
 * at a specific horizontal edge.//ww  w.  ja  v  a2 s. c om
 *
 * @param loc The location of this vertical edge. A {@link Vec2i} where the
 *            x coordinate is a vertex coordinate and the y coordinate is a cell coordinate.
 *            (See {@link com.puzzlebazar.shared.util.Recti} for details on cells and vertices.)
 * @param thickness The desired thickness for this edge (in pixels).
 * @param styleNames A list of string containing all the desired style names. (The default edge style is added automatically.)
 * @return The newly created widget.
 */
public Widget createVerticalEdge(Vec2i loc, int thickness, String... styleNames) {
    Widget widget = GWT.create(FlowPanel.class);
    widget.addStyleName(resources.style().edge());
    for (String style : styleNames) {
        widget.addStyleName(style);
    }
    addVerticalEdgeWidget(loc, widget, thickness);
    return widget;
}