public class InputControlWrapper<VALUE_TYPE> extends ControlWrapper implements IInputControl<VALUE_TYPE>
| Constructor and Description |
|---|
InputControlWrapper(IInputControl<VALUE_TYPE> widget) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInputListener(IInputListener listener)
Adds an input listener
|
void |
addValidationConditionListener(IValidationConditionListener listener)
Adds a validation condition listener
|
void |
addValidator(IValidator<VALUE_TYPE> validator)
Adds a validator to the input component
|
VALUE_TYPE |
getValue()
Gets the value
|
protected IInputControl<VALUE_TYPE> |
getWidget() |
boolean |
hasModifications()
Determines if modifications has been occurred since object creation or the last invocation of
resetModificationState().
|
boolean |
isEditable()
Gets the editable state
|
void |
removeInputListener(IInputListener listener)
Removes an input listener
|
void |
removeValidationConditionListener(IValidationConditionListener listener)
Removes a validation condition listener
|
void |
resetModificationState()
Resets the modification state.
|
void |
setEditable(boolean editable)
Sets the editable state of the input component.
|
void |
setValue(VALUE_TYPE value)
Sets the value
|
IValidationResult |
validate()
Does the validation
|
addParentListener, getDragSource, getDropTarget, getLayoutConstraints, getMaxSize, getMinSize, getParent, getPreferredSize, getRoot, removeParentListener, setLayoutConstraints, setMaxSize, setMinSize, setParent, setPreferredSize, setToolTipTextaddComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addPopupDetectionListener, addShowingStateListener, createPopupMenu, fromComponent, getBackgroundColor, getBounds, getForegroundColor, getPosition, getSize, hasFocus, isReparentable, isShowing, isVisible, redraw, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePopupDetectionListener, removeShowingStateListener, requestFocus, setBackgroundColor, setBounds, setCursor, setForegroundColor, setPopupMenu, setPosition, setPosition, setRedrawEnabled, setSize, setSize, setVisible, toComponent, toLocal, toScreenaddDisposeListener, dispose, getUiReference, isDisposed, isEnabled, removeDisposeListener, setEnabledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDragSource, getDropTarget, getParent, getRoot, setMaxSize, setMinSize, setParent, setPreferredSizegetLayoutConstraints, getMaxSize, getMinSize, getPreferredSize, setLayoutConstraints, setToolTipTextaddParentListener, removeParentListenercreatePopupMenu, fromComponent, getBounds, hasFocus, isReparentable, isShowing, setBounds, setPopupMenu, setPosition, setSize, toComponent, toLocal, toScreendispose, isDisposedaddDisposeListener, removeDisposeListeneraddShowingStateListener, removeShowingStateListenergetBackgroundColor, getForegroundColor, getPosition, getSize, isVisible, redraw, requestFocus, setBackgroundColor, setCursor, setForegroundColor, setPosition, setRedrawEnabled, setSize, setVisiblegetUiReference, isEnabled, setEnabledaddComponentListener, removeComponentListeneraddFocusListener, removeFocusListeneraddKeyListener, removeKeyListeneraddMouseListener, removeMouseListeneraddMouseMotionListener, removeMouseMotionListeneraddPopupDetectionListener, removePopupDetectionListenerpublic InputControlWrapper(IInputControl<VALUE_TYPE> widget)
protected IInputControl<VALUE_TYPE> getWidget()
getWidget in class ControlWrapperpublic void addValidator(IValidator<VALUE_TYPE> validator)
IInputComponentaddValidator in interface IInputComponent<VALUE_TYPE>validator - The validator to add, must not be nullpublic boolean hasModifications()
IInputComponentIInputComponent.resetModificationState() method will be invoked,
so the method IInputComponent.hasModifications() returns false.
After pressing the '2' key, the method IInputComponent.hasModifications() returns true, but the value is still null.
After pressing the keys '0', '1' , '1', the method IInputComponent.hasModifications() returns still true and the value is
a Date object representing "12-11-2011". If the user presses the backspace key 4 times, the value
is 'null' and the method IInputComponent.hasModifications() returns false again, which indicates that the field is in it's
original state.hasModifications in interface IInputComponent<VALUE_TYPE>IInputComponent.hasModifications()public void resetModificationState()
IInputComponentIInputComponent.hasModifications() method must return false,
until modification was made by the user or programmatically.
Remark: This method invocation must not reset the modifications. Only the modification state (modified or not)
will be reseted.resetModificationState in interface IInputComponent<VALUE_TYPE>public void setValue(VALUE_TYPE value)
IInputValueAccessorsetValue in interface IInputValueAccessor<VALUE_TYPE>value - The value, may be nullpublic VALUE_TYPE getValue()
IInputValueAccessorgetValue in interface IInputValueAccessor<VALUE_TYPE>public IValidationResult validate()
IValidateablevalidate in interface IValidateablepublic void addValidationConditionListener(IValidationConditionListener listener)
IValidateableaddValidationConditionListener in interface IValidateablelistener - The listener to addpublic void removeValidationConditionListener(IValidationConditionListener listener)
IValidateableremoveValidationConditionListener in interface IValidateablelistener - The listener to removepublic void setEditable(boolean editable)
IInputComponentCommonsetEditable in interface IInputComponentCommoneditable - The editable state to setpublic void addInputListener(IInputListener listener)
IInputObservableaddInputListener in interface IInputObservablelistener - The listener to addpublic void removeInputListener(IInputListener listener)
IInputObservableremoveInputListener in interface IInputObservablelistener - The listener to removepublic boolean isEditable()
IInputComponentisEditable in interface IInputComponent<VALUE_TYPE>Siehe auch Jowidgets Nutzerhandbuch