コード例 #1
0
 /** Show message dilaog. The dialog is centered and the screen is blocked for edition */
 private void doShow() {
   try {
     dialogBox.center();
     dialogBox.show();
     okButton.setFocus(true);
     OpenEvent.fire(ConfirmDialog.this, ConfirmDialog.this);
   } catch (Exception e) {
     Crux.getErrorHandler().handleError(e);
     Screen.unblockToUser();
   }
 }
コード例 #2
0
  /** Show message dilaog. The dialog is centered and the screen is blocked for edition */
  public void show() {
    Screen.blockToUser("crux-ConfirmDialogScreenBlocker");

    // if it's a touch device, then we should wait for virtual keyboard to get closed.
    // Otherwise the dialog message will not be properly centered in screen.
    if (Screen.getCurrentDevice().getInput().equals(DeviceAdaptive.Input.touch)) {
      Scheduler.get()
          .scheduleFixedDelay(
              new RepeatingCommand() {
                @Override
                public boolean execute() {
                  doShow();
                  return false;
                }
              },
              1000);
    } else {
      doShow();
    }
  }
コード例 #3
0
 /** Hides the message dialog */
 public void hide() {
   dialogBox.hide();
   Screen.unblockToUser();
   CloseEvent.fire(ConfirmDialog.this, ConfirmDialog.this);
 }