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

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

Introduction

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

Prototype

public void selectAll() 

Source Link

Document

Selects all of the text in the box.

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/*w w w .j  a va 2s.  com*/
                public void onClick(ClickEvent event) {
                    tf.selectAll();
                }
            });
        }
    }
}