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() . 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 File: BaseWidget.java    From EasyML with 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
Source File: NumberRenderer.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
public NumberRenderer(String format) {
	if (format == null) {
		this.formater = NumberFormat.getDecimalFormat();
	} else {
		this.formater = NumberFormat.getFormat(format);
	}
}