public class ViewFactory
extends java.lang.Object
| ?????? | ????? |
|---|---|
<T> ViewContext<T> |
createByController(java.lang.Class<T> controllerClass)
Creates a new MVC based view by using the given controller class.
|
<T> ViewContext<T> |
createByController(java.lang.Class<T> controllerClass,
java.lang.String fxmlName)
Creates a new MVC based view by using the given controller class.
|
<T> ViewContext<T> |
createByController(java.lang.Class<T> controllerClass,
java.lang.String fxmlName,
ViewConfiguration viewConfiguration,
java.lang.Object... viewContextResources)
Creates a new MVC based view by using the given controller class.
|
<T> javafx.scene.control.Tab |
createTab(java.lang.Class<T> controllerClass)
This methods creates a tab that contains the given view.
|
<T> javafx.scene.control.Tab |
createTab(java.lang.Class<T> controllerClass,
io.datafx.core.ExceptionHandler exceptionHandler)
This methods creates a tab that contains the given view.
|
<T> javafx.scene.control.Tab |
createTab(ViewContext<T> context)
This methods creates a tab that contains the given view.
|
<T> javafx.scene.control.Tab |
createTab(ViewContext<T> context,
io.datafx.core.ExceptionHandler exceptionHandler)
This methods creates a tab that contains the given view.
|
static ViewFactory |
getInstance()
Returns the single instance of the ViewFactory class (singleton pattern)
|
void |
showInStage(javafx.stage.Stage stage,
java.lang.Class<?> controllerClass)
Helper method that will show exactly one view in a stage.
|
public static ViewFactory getInstance()
public <T> ViewContext<T> createByController(java.lang.Class<T> controllerClass) throws FxmlLoadException
ViewController annotation to link to the fxml file. You can skip
the annotation if you want to use the controller API conventions. By
doing so the fxml files has to be in the package as the controller and
must fit to a naming convention (see ViewController for more
informations). The method returns a ViewContext. This is a
wrapper around the view (view-node and controller) and can be used to
register your datamodel to the view. The doc of ViewContext will
provide more information about this topic.controllerClass - the class of the controller.FxmlLoadException - if the fxml file can not be loadedpublic <T> ViewContext<T> createByController(java.lang.Class<T> controllerClass, java.lang.String fxmlName) throws FxmlLoadException
ViewController annotation to link to the fxml file. You can skip
the annotation if you want to use the controller API conventions. By
doing so the fxml files has to be in the package as the controller and
must fit to a naming convention (see ViewController for more
informations). The method returns a ViewContext. This is a
wrapper around the view (view-node and controller) and can be used to
register your datamodel to the view. The doc of ViewContext will
provide more information about this topic. By using this method you can
overwrite the path to your fxml file.controllerClass - the class of the controller.fxmlName - path to the fxml file that will be used for the generated MVC
contextFxmlLoadException - if the fxml file can not be loadedpublic <T> ViewContext<T> createByController(java.lang.Class<T> controllerClass, java.lang.String fxmlName, ViewConfiguration viewConfiguration, java.lang.Object... viewContextResources) throws FxmlLoadException
ViewController annotation to link to the fxml file.
You can skip the annotation if you want to use the controller API conventions.
By doing so the fxml files has to be in the package as the controller and
must fit to a naming convention (see ViewController
for more information). The method returns a
ViewContext.
This is a wrapper around the view (view-node and controller) and can be
used to register your datamodel to the view. The doc of
ViewContext will
provide more information about this topic. By using this method you can
overwrite the path to your fxml file.T - controllerClass - fxmlName - viewConfiguration - The configuration for the viewviewContextResources - initial resources that will be added to the view contextFxmlLoadExceptionpublic void showInStage(javafx.stage.Stage stage,
java.lang.Class<?> controllerClass)
throws FxmlLoadException
stage - The stage in that the view will be showncontrollerClass - the class of the controller that defines the viewFxmlLoadExceptionpublic <T> javafx.scene.control.Tab createTab(java.lang.Class<T> controllerClass)
throws FxmlLoadException
controllerClass - the class that defines the controller of the viewFxmlLoadExceptionpublic <T> javafx.scene.control.Tab createTab(java.lang.Class<T> controllerClass,
io.datafx.core.ExceptionHandler exceptionHandler)
throws FxmlLoadException
controllerClass - the class that defines the controller of the viewexceptionHandler - the exception handle for the view. This handler will handle all exceptions that will be thrown in the DataFX container contextFxmlLoadExceptionpublic <T> javafx.scene.control.Tab createTab(ViewContext<T> context)
context - the context of the view. This includes the view and its controller instance
so that all needed informations are part of the contextpublic <T> javafx.scene.control.Tab createTab(ViewContext<T> context, io.datafx.core.ExceptionHandler exceptionHandler)
context - the context of the view. This includes the view and its controller instance
so that all needed informations are part of the contextexceptionHandler - the exception handle for the view. This handler will handle all exceptions that will be thrown in the DataFX container context