Java Code Examples for com.google.gwt.i18n.client.NumberFormat#getDecimalFormat()

The following examples show how to use com.google.gwt.i18n.client.NumberFormat#getDecimalFormat() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: EasyML   File: BaseWidget.java    License: Apache License 2.0 5 votes vote down vote up
public void printMessage(String eventName, int code, boolean modifier, boolean control) {
	final NumberFormat formatter = NumberFormat.getDecimalFormat();
	String message = eventName + " -  Char Code: " + formatter.format(code) + ".  ";

	if(code == KeyCodes.KEY_ENTER) {
		message += "Key is ENTER.  ";
	}

	if(modifier)
		message += "Modifier is down.  ";

	if(control)
		message += "CTRL is down.  ";
	logger.info("message"+message);
}
 
Example 2
public NumberRenderer(String format) {
	if (format == null) {
		this.formater = NumberFormat.getDecimalFormat();
	} else {
		this.formater = NumberFormat.getFormat(format);
	}
}