@Immutable public abstract class ComponentPropertyBinding<T,C> extends Object implements IModelBinding
SimpleComponentPropertyBinding.| Constructor and Description |
|---|
ComponentPropertyBinding(IReadOnlyModel<?> model,
PropertyMetaModel<T> propertyMeta,
IControl<C> control) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
convertControlToValue(C zheValue)
Convert the control's value of type C to a data value of type T.
|
protected abstract C |
convertValueToControl(T zheValue)
Convert the data value of type T to the control value of type C.
|
IControl<C> |
getControl() |
IReadOnlyModel<?> |
getModel() |
PropertyMetaModel<T> |
getPropertyMeta() |
void |
moveControlToModel() |
void |
moveModelToControl() |
void |
setControlsEnabled(boolean on) |
public ComponentPropertyBinding(@Nonnull IReadOnlyModel<?> model, @Nonnull PropertyMetaModel<T> propertyMeta, @Nonnull IControl<C> control)
@Nullable protected abstract C convertValueToControl(@Nullable T zheValue) throws Exception
zheValue - Exceptionprotected abstract T convertControlToValue(@Nullable C zheValue) throws Exception
zheValue - Exceptionpublic void moveControlToModel()
throws Exception
moveControlToModel in interface IModelBindingExceptionpublic void moveModelToControl()
throws Exception
moveModelToControl in interface IModelBindingExceptionpublic void setControlsEnabled(boolean on)
setControlsEnabled in interface IModelBinding@Nonnull public PropertyMetaModel<T> getPropertyMeta()
@Nonnull public IReadOnlyModel<?> getModel()
Copyright © 2017 etc.to. All rights reserved.