private static String getAcceptedCharset() {
   if (!GWT.isClient()) {
     return null;
   }
   StringBuffer strbuf = new StringBuffer();
   strbuf.append("0123456789");
   if (numberConstants.zeroDigit().charAt(0) != '0') {
     for (int i = 0; i < 10; i++) {
       strbuf.append(numberConstants.zeroDigit().charAt(0) + i);
     }
   }
   strbuf.append(numberConstants.decimalSeparator().charAt(0));
   if (numberConstants.groupingSeparator().charAt(0) == '\u00a0') {
     strbuf.append(' ');
   } else {
     strbuf.append(numberConstants.groupingSeparator().charAt(0));
   }
   strbuf.append((char) KeyboardListener.KEY_TAB);
   strbuf.append((char) KeyboardListener.KEY_BACKSPACE);
   strbuf.append((char) KeyboardListener.KEY_DELETE);
   strbuf.append((char) KeyboardListener.KEY_ENTER);
   strbuf.append((char) KeyboardListener.KEY_HOME);
   strbuf.append((char) KeyboardListener.KEY_END);
   strbuf.append((char) KeyboardListener.KEY_LEFT);
   strbuf.append((char) KeyboardListener.KEY_UP);
   strbuf.append((char) KeyboardListener.KEY_RIGHT);
   strbuf.append((char) KeyboardListener.KEY_DOWN);
   strbuf.append((char) DOMHelper.OTHER_KEY_LEFT);
   strbuf.append((char) DOMHelper.OTHER_KEY_UP);
   strbuf.append((char) DOMHelper.OTHER_KEY_RIGHT);
   strbuf.append((char) DOMHelper.OTHER_KEY_DOWN);
   return strbuf.toString();
 }
예제 #2
0
 /** Creates a new number field. */
 public SpinnerField() {
   messages = new SpinnerFieldMessages();
   propertyEditor = new NumberPropertyEditor();
   constants = LocaleInfo.getCurrentLocale().getNumberConstants();
   decimalSeparator = constants.decimalSeparator();
 }