|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silvermindsoftware.hitch.validation.response.DefaultValidationResponder
public class DefaultValidationResponder
A default ValidationResponder that makes the background of the corresponding GUI element red.
Field Summary | |
---|---|
protected Color |
m_invalidColor
Color to mark value as invalid. |
protected static String |
VALID_COLOR
Identifier for valid color in component's client property. |
Constructor Summary | |
---|---|
DefaultValidationResponder()
The default constructor reading the invalidColor from Spring config. |
|
DefaultValidationResponder(Color color)
|
Method Summary | |
---|---|
void |
setInvalid(Object object,
JComponent component,
String message)
The value in the component is invalid. |
void |
setValid(Object object,
JComponent component)
The value in the component is valid. |
void |
setValid(Object object,
JComponent component,
boolean valid)
The value in the component is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String VALID_COLOR
protected final Color m_invalidColor
Constructor Detail |
---|
public DefaultValidationResponder()
public DefaultValidationResponder(Color color)
color
- the background color if value is invalidMethod Detail |
---|
public void setValid(Object object, JComponent component, boolean valid)
setValid
in interface ValidationResponder
object
- the validated objectcomponent
- the component holding the validated valuevalid
- true
if values is validpublic void setValid(Object object, JComponent component)
setValid
in interface ValidationResponder
object
- the validated objectcomponent
- the component holding the validated valuepublic void setInvalid(Object object, JComponent component, String message)
setInvalid
in interface ValidationResponder
object
- the validated objectcomponent
- the component holding the invalidated valuemessage
- the message explaining why the value is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |