public class SideErrorHandler extends Object implements ErrorHandler
Modifier and Type | Class and Description |
---|---|
static interface |
SideErrorHandler.SideErrorResources |
static interface |
SideErrorHandler.SideErrorTooltipAppearance
Marker interface to indicate that we want a slightly different appearance than usual, to indicate that this is an
error, and not help text.
|
Modifier and Type | Field and Description |
---|---|
protected WidgetComponent |
errorIcon |
protected SideErrorHandler.SideErrorResources |
resources |
protected Widget |
target |
protected ToolTip |
tip |
Constructor and Description |
---|
SideErrorHandler(Widget target) |
Modifier and Type | Method and Description |
---|---|
protected void |
adjustSize()
Adjusts the size of the widget to account for the side icon, if visible.
|
protected void |
alignErrorIcon() |
void |
clearInvalid()
Clears the errors from the field.
|
protected void |
doAttach() |
protected void |
doDetach() |
boolean |
isAdjustTargetWidth()
Returns
true if the target width is adjusted. |
void |
markInvalid(List<EditorError> errors)
Assigns errors to be displayed on the field.
|
void |
release()
Called to indicate that the instance will no longer be used, and should clean itself up.
|
protected void |
restoreSize()
Restores the widget to its original size.
|
void |
setAdjustTargetWidth(boolean adjustTargetWidth)
True to adjust the target width when an error is displayed (defaults to true).
|
protected Widget target
protected WidgetComponent errorIcon
protected final SideErrorHandler.SideErrorResources resources
protected ToolTip tip
public void clearInvalid()
ErrorHandler
clearInvalid
in interface ErrorHandler
public boolean isAdjustTargetWidth()
true
if the target width is adjusted.public void markInvalid(List<EditorError> errors)
ErrorHandler
markInvalid
in interface ErrorHandler
errors
- the errors to display to the userprotected void adjustSize()
protected void restoreSize()
public void release()
ErrorHandler
ErrorHandler.clearInvalid()
method should be called prior to this to clean up any leftover errors.release
in interface ErrorHandler
public void setAdjustTargetWidth(boolean adjustTargetWidth)
adjustTargetWidth
- true to adjust target widthprotected void alignErrorIcon()
protected void doAttach()
protected void doDetach()
Copyright © 2018. All rights reserved.