Sound Events in Errors
Sounds are disabled by default in an ApplicationError
. They are enabled by calling enableSound
. A sound will be played according to the highest severity error.
Example
private void createError() {
ApplicationError error = new ApplicationError(ERROR_METADATA_ID, ERROR_MESSAGE_ID);
error.setKey(dialogWorkspace.getName());
error.setSeverity(CAError.SEV_ERROR);
error.enableSound();
dialogWorkspace.getErrorService().addError(error);
}