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:co.fxl.gui.gwt.GWTFocusPanel.java

License:Open Source License

public static void removeOutline(Widget p) {
    if (IE_LEQ_10) {
        p.addStyleName("nooutlineIE");
    } else {//from ww w . j  a  v  a  2 s  .co  m
        p.addStyleName("nooutline");
    }
}

From source file:co.fxl.gui.gwt.GWTSuggestField.java

License:Open Source License

public static void removeOutline(Widget p) {
    if (GWTDisplay.isInternetExplorer) {
        p.addStyleName("nooutlineIE");
    } else {//from  w  ww  . j ava 2  s  . co m
        p.addStyleName("nooutline");
    }
}

From source file:com.agnie.gwt.common.client.widget.TabBar.java

License:Open Source License

private void setSelectionStyle(Widget item, boolean selected) {
    if (item != null) {
        if (selected) {
            item.removeStyleName(resource.css().inactive());
            item.addStyleName(resource.css().active());
        } else {//w w  w.  j a  v  a 2  s  .c o  m
            item.removeStyleName(resource.css().active());
            item.addStyleName(resource.css().inactive());
        }
    }
}

From source file:com.akjava.gwt.subplayer.client.SubPlayer.java

License:Apache License

private void setlectWidget(Widget widget) {
    widget.addStyleName("select");
    int ind = itemPanel.getWidgetIndex(widget);
    playerWidget.setSubIndex(ind);/*from   ww w.j  a  va 2s. c  o  m*/
    SRTItemPanel srtItem = (SRTItemPanel) widget;
    SRTObject srt = srtItem.getSrt();
    timeLabel.setText(srt.getStartTime().toString() + " - " + srt.getEndTime().toString());
}

From source file:com.alkacon.acacia.client.ButtonBarHandler.java

License:Open Source License

/**
 * Sets the button bar visibility.<p>
 * // w ww .j  a va 2 s  . c o  m
 * @param buttonBar the button bar
 * @param visible <code>true</code> to show the button bar
 */
private void setButtonBarVisibility(Widget buttonBar, boolean visible) {

    String hoverStyle = I_LayoutBundle.INSTANCE.form().hoverButton();
    if (visible) {
        buttonBar.addStyleName(hoverStyle);
    } else {
        buttonBar.removeStyleName(hoverStyle);
    }
    if (buttonBar instanceof InlineEntityWidget) {
        ((InlineEntityWidget) buttonBar).setContentHighlightingVisible(visible);
    }
    if (buttonBar.getParent() instanceof InlineEntityWidget) {
        ((InlineEntityWidget) buttonBar.getParent()).setContentHighlightingVisible(visible);
    }
}

From source file:com.alkacon.acacia.client.ValueFocusHandler.java

License:Open Source License

/**
 * Hides all help bubbles.<p>/* w ww.j  av  a2 s. co  m*/
 * 
 * @param formPanel the form panel
 * @param hide <code>true</code> to hide the help bubbles
 */
public void hideHelpBubbles(Widget formPanel, boolean hide) {

    if (hide) {
        formPanel.addStyleName(I_LayoutBundle.INSTANCE.form().hideHelpBubbles());
    } else {
        formPanel.removeStyleName(I_LayoutBundle.INSTANCE.form().hideHelpBubbles());
    }
}

From source file:com.alkacon.geranium.client.ui.Popup.java

License:Open Source License

/**
 * Wraps the given Widget with a cornered border, padding and margin.<p>
 *  /*w w  w. j a  va  2s .  c  o  m*/
 * @param w the widget to wrap
 * 
 * @return a new widget that wraps the given one
 */
public static Widget wrapWithBorderPadding(Widget w) {

    w.addStyleName(I_LayoutBundle.INSTANCE.dialogCss().borderPadding());
    w.addStyleName(I_LayoutBundle.INSTANCE.generalCss().cornerAll());
    SimplePanel panel = new SimplePanel();
    panel.add(w);
    return panel;
}

From source file:com.allen_sauer.gwt.dnd.client.AbstractDragController.java

License:Apache License

/**
 * Similar to {@link #makeDraggable(Widget)}, but allow separate, child to be specified as the
 * drag handle by which the first widget can be dragged.
 * /*from  w w  w. j  a va2s .c o m*/
 * @param draggable the widget to be made draggable
 * @param dragHandle the widget by which widget can be dragged
 */
@Override
public void makeDraggable(Widget draggable, Widget dragHandle) {
    mouseDragHandler.makeDraggable(draggable, dragHandle);
    draggable.addStyleName(DragClientBundle.INSTANCE.css().draggable());
    dragHandle.addStyleName(DragClientBundle.INSTANCE.css().handle());
    dragHandles.put(draggable, dragHandle);
}

From source file:com.allen_sauer.gwt.dnd.client.AbstractDragController.java

License:Apache License

@Override
public void toggleSelection(Widget draggable) {
    assert draggable != null;
    if (context.selectedWidgets.remove(draggable)) {
        draggable.removeStyleName(DragClientBundle.INSTANCE.css().selected());
    } else if (multipleSelectionAllowed) {
        context.selectedWidgets.add(draggable);
        draggable.addStyleName(DragClientBundle.INSTANCE.css().selected());
    } else {/* w  w  w. ja  va 2s.  co m*/
        context.selectedWidgets.clear();
        context.selectedWidgets.add(draggable);
    }
}

From source file:com.allen_sauer.gwt.dnd.client.drop.AbstractDropController.java

License:Apache License

public AbstractDropController(Widget dropTarget) {
    this.dropTarget = dropTarget;
    dropTarget.addStyleName(DragClientBundle.INSTANCE.css().dropTarget());
}