/** 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(); } }
/** 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(); } }
/** Hides the message dialog */ public void hide() { dialogBox.hide(); Screen.unblockToUser(); CloseEvent.fire(ConfirmDialog.this, ConfirmDialog.this); }