ViewType - the generic type of the view that was loaded.ViewModelType - the generic type of the viewModel that was loaded.public class ViewTuple<ViewType extends de.saxsys.mvvmfx.internal.viewloader.View<? extends ViewModelType>,ViewModelType extends ViewModel> extends Object
Tuple for carrying view / code-behind pair. The code-behind part is the class which is known as the controller class behind a FXML file.
As a user you typically won't create instances of this class on your own. Instead you will obtain instances of this
class with the FluentViewLoader when you are loading a view.
Instances of this class are immutable.
| Constructor and Description |
|---|
ViewTuple(ViewType codeBehind,
javafx.scene.Parent view,
ViewModelType viewModel) |
| Modifier and Type | Method and Description |
|---|---|
ViewType |
getCodeBehind()
The code behind part of the view.
|
javafx.scene.Parent |
getView()
The root object of the view.
|
ViewModelType |
getViewModel() |
public ViewTuple(ViewType codeBehind, javafx.scene.Parent view, ViewModelType viewModel)
codeBehind - the codeBehind for this viewTupleview - the view for this viewTupleviewModel - the viewModel for this viewTuplepublic ViewType getCodeBehind()
The code behind part of the view. When using FXML (FxmlView) this will be an instance of the class that
is specified in the fxml file with fx:controller.
When the view is implemented in pure java (JavaView) the instance returned by this method will typically
be the same instance that is returned by getView().
public javafx.scene.Parent getView()
public ViewModelType getViewModel()
Copyright © 2019 Saxonia Systems AG. All rights reserved.