Package swingtree.api.mvvm
Interface ViewSupplier<M>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A provider of a view, usually a view model or a simple data model with the purpose of
making it possible to dynamically creating sub-views for inside a view for a given
sub-view model.
See:
UIForAnySwing.add(Val, ViewSupplier)
,
UIForAnySwing.add(Vals, ViewSupplier)
,
UIForAnySwing.add(String, Val, ViewSupplier)
,
UIForAnySwing.add(String, Vals, ViewSupplier)
,
UIForAnySwing.add(AddConstraint, Val, ViewSupplier)
,
UIForAnySwing.add(AddConstraint, Vals, ViewSupplier)
,
-
Method Summary
Modifier and TypeMethodDescriptionUIForAnySwing<?,
?> createViewFor
(M viewModel) Creates a view representing an instance of the typeM
, which is a view model or a simple data model.
-
Method Details
-
createViewFor
Creates a view representing an instance of the typeM
, which is a view model or a simple data model.- Parameters:
viewModel
- The thing to create a view for, usually a view model or a simple data model.- Returns:
- A view for the given view model in the form of a
UIForAnySwing
, a builder node which wraps the actual main component of the view.
-