Java Code Examples for com.google.gwt.user.client.ui.Widget#setStyleName()

The following examples show how to use com.google.gwt.user.client.ui.Widget#setStyleName() .
Example 1
Project: shortyz   File: Renderer.java    License: GNU General Public License v3.0 6 votes vote down vote up
public void updateCursor(String responder, Position position){
    Widget w = null;

    Position old = this.cursors.get(responder);
    if(old != null){
        w = table.getWidget(old.down, old.across);
        if(w instanceof BoxView && w != null){
            w.setStyleName(resources.css().boxPanel());
        }
    } else {
        cursors.put(responder, position);
        return;
    }
    w = table.getWidget(position.down, position.across);
    if(w instanceof BoxView && w != null){
        w.setStyleName(resources.css().cursor());
        w.getElement().getStyle().setBorderColor(colorMap.get(responder));
        cursors.put(responder, position);
    }
}
 
Example 2
Project: cuba   File: CubaOptionGroupWidget.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void updateEnabledState() {
    for (Widget w : panel) {
        if (w instanceof HasEnabled) {
            HasEnabled hasEnabled = (HasEnabled) w;
            hasEnabled.setEnabled(isEnabled());

            w.setStyleName("v-readonly", isReadonly());
        }
    }
}
 
Example 3
Project: swellrt   File: PopupMenu.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void addDivider() {
  Widget divider = new Label();
  divider.setStyleName(RESOURCES.css().divider());
  popup.add(divider);
}
 
Example 4
Project: incubator-retired-wave   File: PopupMenu.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void addDivider() {
  Widget divider = new Label();
  divider.setStyleName(RESOURCES.css().divider());
  popup.add(divider);
}
 
Example 5
Project: core   File: ExceptionView.java    License: GNU Lesser General Public License v2.1 4 votes vote down vote up
private Widget getExceptionWidget(ExceptionData ex) {
  Widget result = new HTML(String.valueOf(ex));
  result.setStyleName(Utils.style() + "-codePre");
  return result;
}