nl.coderight.jazz.form.field.validatable
Class ValidatableField<V>
java.lang.Object
nl.coderight.jazz.form.FormField<V>
nl.coderight.jazz.form.field.validatable.ValidatableField<V>
- All Implemented Interfaces:
- ClipboardSupport, Editable, Validation
- Direct Known Subclasses:
- InputField, PasswordField
public abstract class ValidatableField<V>
- extends FormField<V>
- implements Validation, Editable, ClipboardSupport
Base class for validatable fields.
Methods inherited from class nl.coderight.jazz.form.FormField |
dispatchEvent, dispose, focus, focusNextField, focusPreviousField, getBackground, getBindID, getBorder, getComponent, getCursor, getDataBinding, getForeground, getForm, getLabel, getParent, getPreferredSize, getToolTip, getValue, hasFocus, isBindable, isChanged, isEnabled, isOpaque, isReadonly, isShowing, isValueChanged, isVisible, onChange, onClick, onDoubleClick, onMouseEnter, onMouseLeave, onPopup, registerKeyboardAction, setBackground, setBindID, setBorder, setChanged, setCursor, setDataBinding, setEnabled, setFocusable, setForeground, setOnFocusGainedEvent, setOnFocusLostEvent, setOpaque, setPopupMenu, setPreferredSize, setReadonly, setVisible, translate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidatableField
public ValidatableField()
setComponent
protected void setComponent(JComponent component)
- Overrides:
setComponent
in class FormField<V>
setCopyAction
public void setCopyAction(Action action)
setCutAction
public void setCutAction(Action action)
setPasteAction
public void setPasteAction(Action action)
setValue
public void setValue(V value)
- Description copied from class:
FormField
- Sets field value.
- Overrides:
setValue
in class FormField<V>
setInputPrompt
public void setInputPrompt(String text)
setIcon
public void setIcon(Icon icon)
isValid
public final boolean isValid()
- Specified by:
isValid
in interface Validation
isRequired
public boolean isRequired()
setRequired
public void setRequired(boolean required)
setRequiredMessage
public void setRequiredMessage(Message message)
setToolTip
public void setToolTip(String text)
- Description copied from class:
FormField
- Sets field tooltip text.
- Overrides:
setToolTip
in class FormField<V>
getError
public final ValidationError getError()
- Specified by:
getError
in interface Validation
setValidator
public void setValidator(Validator<V> validator)
getValidator
public Validator<V> getValidator()
isFocusable
public boolean isFocusable()
- Description copied from class:
FormField
- Returns whether field is focusable.
- Overrides:
isFocusable
in class FormField<V>
onFocusGained
protected void onFocusGained()
- Overrides:
onFocusGained
in class FormField<V>
onFocusLost
protected void onFocusLost()
- Overrides:
onFocusLost
in class FormField<V>
checkIsRequired
protected void checkIsRequired()
throws ValidationException
- Throws:
ValidationException
validate
public void validate()
throws ValidationException
- Specified by:
validate
in interface Validation
- Throws:
ValidationException
onValidate
protected void onValidate()
onIconClicked
protected void onIconClicked()
Copyright 2010 CodeRight, All rights reserved.