本文整理汇总了Java中com.google.gwt.editor.client.EditorError.getEditor方法的典型用法代码示例。如果您正苦于以下问题:Java EditorError.getEditor方法的具体用法?Java EditorError.getEditor怎么用?Java EditorError.getEditor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.editor.client.EditorError
的用法示例。
在下文中一共展示了EditorError.getEditor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showErrors
import com.google.gwt.editor.client.EditorError; //导入方法依赖的package包/类
@Override
public void showErrors(List<EditorError> errors) {
StringBuilder sb = new StringBuilder();
for (EditorError error : errors) {
if (error.getEditor() == this) {
sb.append("\n").append(error.getMessage());
}
}
boolean hasErrors = sb.length() > 0;
if (!hasErrors) {
view.clearError();
return;
}
// Show the errors.
view.showError(new SafeHtmlBuilder().appendEscaped(sb.substring(1)).toSafeHtml());
}
示例2: showErrors
import com.google.gwt.editor.client.EditorError; //导入方法依赖的package包/类
/*************************************************************
** GWT EDITOR CONTRACT METHODS **
*************************************************************/
@Override
public void showErrors(final List<EditorError> errors) {
StringBuilder sb = new StringBuilder();
for (EditorError error : errors) {
if (error.getEditor() == this) {
sb.append("\n").append(error.getMessage());
}
}
boolean hasErrors = sb.length() > 0;
if (!hasErrors) {
view.clearError();
return;
}
// Show the errors.
view.showError(new SafeHtmlBuilder().appendEscaped(sb.substring(1)).toSafeHtml());
}
示例3: showErrors
import com.google.gwt.editor.client.EditorError; //导入方法依赖的package包/类
@Override
public void showErrors(List<EditorError> errors) {
StringBuilder sb = new StringBuilder();
for (final EditorError error : errors) {
if (error.getEditor() == this) {
sb.append("\n").append(error.getMessage());
}
}
boolean hasErrors = sb.length() > 0;
if (!hasErrors) {
view.clearError();
return;
}
// Show the errors.
view.showError(new SafeHtmlBuilder().appendEscaped(sb.substring(1)).toSafeHtml());
}
示例4: showErrors
import com.google.gwt.editor.client.EditorError; //导入方法依赖的package包/类
public void showErrors(List<EditorError> errors) {
StringBuilder sb = new StringBuilder();
for (EditorError error : errors) {
Editor<?> errorEditor = error.getEditor();
if (this.equals(errorEditor) || editor.equals(errorEditor)) {
sb.append("\n").append(error.getMessage());
}
}
if (sb.length() == 0) {
errorLabel.setInnerText("");
errorLabel.getStyle().setDisplay(Display.NONE);
return;
}
errorLabel.setInnerText(sb.substring(1));
errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK);
}
示例5: editorErrorMatches
import com.google.gwt.editor.client.EditorError; //导入方法依赖的package包/类
/**
* Checks if a error belongs to this widget.
*
* @param perror editor error to check
* @return true if the error belongs to this widget
*/
protected boolean editorErrorMatches(final EditorError perror) {
return perror != null && perror.getEditor() != null
&& (this.equals(perror.getEditor()) || perror.getEditor().equals(this.editor));
}