コード例 #1
0
 @PatchMethod
 static void print() {
   WindowOperationsHandler handler = GwtConfig.get().getWindowOperationsHandler();
   if (handler != null) {
     handler.print();
   }
 }
コード例 #2
0
 @PatchMethod
 static void open(String url, String name, String features) {
   WindowOperationsHandler handler = GwtConfig.get().getWindowOperationsHandler();
   if (handler != null) {
     handler.open(url, name, features);
   }
 }
コード例 #3
0
 @PatchMethod
 static void alert(String msg) {
   WindowOperationsHandler handler = GwtConfig.get().getWindowOperationsHandler();
   if (handler != null) {
     handler.alert(msg);
   }
 }
コード例 #4
0
  @PatchMethod
  static String prompt(String msg, String initialValue) {
    WindowOperationsHandler handler = GwtConfig.get().getWindowOperationsHandler();
    if (handler != null) {
      return handler.prompt(msg, initialValue);
    }

    return null;
  }
コード例 #5
0
  @PatchMethod
  static boolean confirm(String msg) {
    WindowOperationsHandler handler = GwtConfig.get().getWindowOperationsHandler();
    if (handler != null) {
      return handler.confirm(msg);
    }

    return false;
  }
コード例 #6
0
  @PatchMethod
  public static CurrencyData getDefaultJava(CurrencyList currencyList) {
    Locale locale = GwtConfig.get().getLocale();
    if (locale == null) {
      locale = Locale.ENGLISH;
    }

    CurrencyData currencyData = currencyDatas.get(locale);
    if (currencyData == null) {
      currencyData = createCurrencyData(locale);
      currencyDatas.put(locale, currencyData);
    }

    return currencyData;
  }
コード例 #7
0
ファイル: GwtTest.java プロジェクト: MaxDhn/gwt-test-utils
 @Before
 public final void setUpGwtTest() throws Exception {
   GwtConfig.setup(this);
 }
コード例 #8
0
ファイル: GwtConfig.java プロジェクト: MaxDhn/gwt-test-utils
 /**
  * Setup a GWT module to be run. <strong>This method must be run only once, at the very beginning
  * of the GWT module emulation.</strong>
  *
  * @param gwtModuleRunner The configuration of the module to be run.
  */
 public static void setup(GwtModuleRunner gwtModuleRunner) {
   INSTANCE.setupInstance(gwtModuleRunner);
 }