public class ViewModel extends java.lang.Object implements IViewModel
ViewModel used in MVVM.| Constructor and Description |
|---|
ViewModel() |
ViewModel(java.lang.String title) |
| Modifier and Type | Method and Description |
|---|---|
IMutableProperty<java.lang.Boolean> |
active() |
<I,R> void |
bindCommand(ICommand<I,R> command)
Binds
command executing and errors of command to the receiver. |
void |
bindErrors(rx.Observable<IViewModelException> errorObservable)
Binds
errorsObservable to the receiver. |
void |
bindLoading(rx.Observable<java.lang.Boolean> loadingObservable)
Binds
loadingObservable to the receiver. |
IProperty<java.lang.Boolean> |
enabled() |
rx.Observable<IViewModelException> |
errors()
An Observable of all errors that occur in the receiver.
|
IProperty<java.lang.Boolean> |
loading() |
IMutableProperty<java.lang.CharSequence> |
title() |
public final IMutableProperty<java.lang.Boolean> active()
active in interface IViewModelpublic IMutableProperty<java.lang.CharSequence> title()
title in interface IViewModelpublic final IProperty<java.lang.Boolean> loading()
loading in interface IViewModelpublic final rx.Observable<IViewModelException> errors()
IViewModelerrors in interface IViewModelpublic final IProperty<java.lang.Boolean> enabled()
enabled in interface IViewModelpublic final void bindLoading(rx.Observable<java.lang.Boolean> loadingObservable)
IViewModelloadingObservable to the receiver.bindLoading in interface IViewModelloadingObservable - An Observable which sends true if loading, false otherwise.public final void bindErrors(rx.Observable<IViewModelException> errorObservable)
IViewModelerrorsObservable to the receiver.bindErrors in interface IViewModelerrorObservable - An Observable which sends IViewModelException.public final <I,R> void bindCommand(ICommand<I,R> command)
IViewModelcommand executing and errors of command to the receiver.
If command errors are not instanceof IViewModelException, these errors will not be forward from the receiver.bindCommand in interface IViewModel