@Override public void onSuccess(Void result) { Info.display( UserMessages.MESSAGE_CONNECTION_REQUEST_TITLE, UserMessages.MESSAGE_CONNECTION_REQUEST_SUCCESS); }
@Override protected void onDragEnd(DragEvent de) { endValue = this.getValue(); super.onDragEnd(de); if (startValue != endValue) { if (startValue == 0) Info.display("startView", "0"); if (endValue == 0) Info.display("endView", "0"); if (timeSpaceModel.getTimeIntervalPixels() == 0) Info.display("TimeIntervalPixel", "0"); // Do the calculus in double for a better precision (f**k GWT) double a = endValue * timeSpaceModel.getTimeIntervalPixels() / startValue; timeSpaceModel.setTimeIntervalPixels((int) a); Info.display("Zoom", "" + timeSpaceModel.getTimeIntervalPixels()); // partial update since there's no need to update the location grid timeSpaceView.update(); } }
public static void handle(Throwable caught) { if (caught instanceof GwtKuraException) { GwtKuraException gee = (GwtKuraException) caught; GwtKuraErrorCode code = gee.getCode(); switch (code) { default: Info.display(CMSGS.error(), caught.getLocalizedMessage()); break; } } else if (caught instanceof StatusCodeException && ((StatusCodeException) caught).getStatusCode() == 0) { // the current operation was interrupted as the user started a new one // or navigated away from the page. // we can ignore this error and do nothing. } else { Info.display(CMSGS.error(), caught.getLocalizedMessage()); caught.printStackTrace(); } }
@Override protected void onDragEnd(DragEvent de) { endValue = this.getValue(); super.onDragEnd(de); if (startValue != endValue) { timeSpaceModel.setTimeIntervalMinutes(this.getValue()); Info.display( "Precision change", "You've set a precision of " + timeSpaceModel.getTimeIntervalMinutes()); // partial update since there's no need to update the location grid timeSpaceView.updateTimeGridDimensions(); timeSpaceView.updateBoundaryDimensions(); timeSpaceView.updateEvents(); } timeSpaceView.loading.setVisible(false); }
public void info(String command, String message) { Info.display(command, message); }
/** * Display an Info Message in the Application * * @param title * @param message */ public static void infoMessage(String title, String message) { Info.display(title, message); }
@Override public void onSuccess(Void result) { Info.display("Информация", "Информация о студенте обновлена успешно!"); }
/** * Displays error message * * @param msg */ public void error(String msg, Throwable trowable) { Info.display("Błąd", msg); Log.error(msg, trowable); }
/** * Displays info message * * @param msg */ public void info(String msg) { Info.display("Informacja", msg); Log.info(msg); }
/** * Displays worning message * * @param msg */ public void worn(String msg) { Info.display("Ostrzezenie", msg); Log.warn(msg); }
public void chartClick(ChartEvent ce) { Info.display("Chart Clicked", "You selected {0}.", "" + ce.getValue()); }
@SuppressWarnings("unchecked") public static boolean handleFormException(FormPanel form, Throwable caught) { boolean isWarning = false; if (caught instanceof GwtKuraException) { List<Field<?>> fields = form.getFields(); GwtKuraException gee = (GwtKuraException) caught; GwtKuraErrorCode code = gee.getCode(); switch (code) { case DUPLICATE_NAME: boolean fieldFound = false; String duplicateFieldName = gee.getArguments()[0]; for (Field<?> field : fields) { if (duplicateFieldName.equals(field.getName())) { TextField<String> textField = (TextField<String>) field; textField.markInvalid(MSGS.duplicateValue()); fieldFound = true; break; } } if (!fieldFound) { Info.display(CMSGS.error(), caught.getLocalizedMessage()); } break; case ILLEGAL_NULL_ARGUMENT: String invalidFieldName = gee.getArguments()[0]; for (Field<?> field : fields) { if (invalidFieldName.equals(field.getName())) { TextField<String> textField = (TextField<String>) field; textField.markInvalid(MSGS.invalidNullValue()); break; } } break; case ILLEGAL_ARGUMENT: String invalidFieldName1 = gee.getArguments()[0]; for (Field<?> field : fields) { if (invalidFieldName1.equals(field.getName())) { TextField<String> textField = (TextField<String>) field; textField.markInvalid(gee.getCause().getMessage()); break; } } break; case INVALID_RULE_QUERY: for (Field<?> field : fields) { if ("query".equals(field.getName())) { TextArea statement = (TextArea) field; statement.markInvalid(caught.getLocalizedMessage()); break; } } break; case WARNING: isWarning = true; Info.display(CMSGS.warning(), caught.getLocalizedMessage()); break; default: Info.display(CMSGS.error(), caught.getLocalizedMessage()); caught.printStackTrace(); break; } } else { Info.display(CMSGS.error(), caught.getLocalizedMessage()); caught.printStackTrace(); } return isWarning; }