|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.view.swing.ValidationHelper
Handles ModelBindable.validationFailed(java.lang.Exception)
and
ModelBindable.validationSuccess()
by setting the
background colour of the parent component to a new colour and being able to
generate an "error tooltip" that is coloured and contains the localized error
message from the validation failure.
Field Summary | |
static java.awt.Color |
VALIDATION_FAILED_COLOR
TODO: describe of the Field |
Constructor Summary | |
ValidationHelper(javax.swing.JComponent inComponent)
|
Method Summary | |
javax.swing.JToolTip |
createToolTip(javax.swing.JToolTip inTip)
Parent should call this in its createTooltip() to allow helper to substitute an error tooltip. |
void |
validationFailed(java.lang.Exception inException)
Signal that validation failed. |
void |
validationSuccess()
Signal that validation succeeded. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.awt.Color VALIDATION_FAILED_COLOR
Constructor Detail |
public ValidationHelper(javax.swing.JComponent inComponent)
inComponent
- parent JComponent.Method Detail |
public void validationFailed(java.lang.Exception inException)
inException
- what caused the validation failure. Should contain a
user-readable message in getLocalizedMessage().public void validationSuccess()
public javax.swing.JToolTip createToolTip(javax.swing.JToolTip inTip)
inTip
- normal tooltip created by parent.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |