
com.extjs.gxt.ui.client.widget.form.NumberField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxt Show documentation
Show all versions of gxt Show documentation
Rich Internet Application Framework for GWT
/*
* Sencha GXT 2.3.0 - Sencha for GWT
* Copyright(c) 2007-2013, Sencha, Inc.
* [email protected]
*
* http://www.sencha.com/products/gxt/license/
*/
package com.extjs.gxt.ui.client.widget.form;
import com.google.gwt.user.client.Element;
/**
* Numeric text field that provides automatic keystroke filtering and numeric
* validation.
*
*
* When the field wraps any thing other than Double, either
* {@link #setPropertyEditorType(Class)} or
* {@link #setPropertyEditor(PropertyEditor)} should be called with the
* appropriate number type.
*
*
* NumberField field = new NumberField();
* field.setPropertyEditorType(Integer.class);
*
*
*
* - Inherited Events:
* - Field Focus
* - Field Blur
* - Field Change
* - Field Invalid
* - Field Valid
* - Field KeyPress
* - Field SpecialKey
*
*/
public class NumberField extends SpinnerField {
/**
* NumberField messages.
*/
public class NumberFieldMessages extends SpinnerFieldMessages {
}
/**
* Creates a new number field.
*/
public NumberField() {
messages = new NumberFieldMessages();
setHideTrigger(true);
setIncrement(0d);
}
@Override
public NumberFieldMessages getMessages() {
return (NumberFieldMessages) messages;
}
@Override
protected void onRender(Element target, int index) {
super.onRender(target, index);
keyNav.bind(null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy