Example usage for com.google.gwt.user.client.ui ValueBoxBase addClickHandler

List of usage examples for com.google.gwt.user.client.ui ValueBoxBase addClickHandler

Introduction

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

Prototype

public HandlerRegistration addClickHandler(ClickHandler handler) 

Source Link

Usage

From source file:com.dawg6.web.dhcalc.client.BasePanel.java

License:Open Source License

@Override
protected void onLoad() {

    Field[] fields = getFields();

    for (Field f : fields) {
        if (f.field instanceof ValueBoxBase) {
            final ValueBoxBase<?> tf = (ValueBoxBase<?>) f.field;
            tf.addClickHandler(new ClickHandler() {

                @Override/*  www.  ja  v  a  2 s . co m*/
                public void onClick(ClickEvent event) {
                    tf.selectAll();
                }
            });
        }
    }
}