Example usage for com.google.gwt.user.client.ui UIObject addStyleDependentName

List of usage examples for com.google.gwt.user.client.ui UIObject addStyleDependentName

Introduction

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

Prototype

public void addStyleDependentName(String styleSuffix) 

Source Link

Document

Adds a dependent style name by specifying the style name's suffix.

Usage

From source file:cc.kune.common.client.ui.BlinkAnimation.java

License:GNU Affero Public License

/**
 * Instantiates a new blink animation.// w w  w .  j  a  v  a2s . c om
 *
 * @param obj the object to animate
 * @param interval between blinks
 */
public BlinkAnimation(final UIObject obj, final int interval) {
    this.interval = interval;

    timer = new Timer() {
        @Override
        public void run() {
            if (!blink) {
                obj.addStyleDependentName("blink");
                iteration++;
            } else {
                obj.removeStyleDependentName("blink");
                if (iteration == stopIter) {
                    timer.cancel();
                }
            }
            blink = !blink;
        }
    };
}

From source file:com.pietschy.gwt.pectin.client.style.DependentStyleBinding.java

License:Apache License

protected void updateTarget(Boolean value) {
    for (UIObject widget : widgets) {
        if (Boolean.TRUE.equals(value)) {
            widget.addStyleDependentName(styleName);
        } else {/*from  w ww.  ja  va2  s  .  c o m*/
            widget.removeStyleDependentName(styleName);
        }
    }
}