public abstract class AbstractFxmlView extends Object implements org.springframework.context.ApplicationContextAware
AbstractFxmlView is a stripped down version of FXMLView that provides DI for Java FX Controllers via Spring.
Supports annotation driven creation of FXML based view beans with FXMLView
| Constructor and Description |
|---|
AbstractFxmlView()
Instantiates a new abstract fxml view.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getPresenter()
In case the view was not initialized yet, the conventional fxml
(airhacks.fxml for the AirhacksView and AirhacksPresenter) are loaded and
the specified presenter / controller is going to be constructed and
returned.
|
void |
getPresenter(java.util.function.Consumer<Object> presenterConsumer)
Does not initialize the view.
|
Optional<ResourceBundle> |
getResourceBundle()
Gets the resource bundle.
|
javafx.scene.Parent |
getView()
Initializes the view by loading the FXML (if not happened yet) and
returns the top Node (parent) specified in the FXML file.
|
void |
getView(java.util.function.Consumer<javafx.scene.Parent> consumer)
Initializes the view synchronously and invokes the consumer with the
created parent Node within the FX UI thread.
|
javafx.scene.Node |
getViewWithoutRootContainer()
Scene Builder creates for each FXML document a root container.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
String |
toString() |
public AbstractFxmlView()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic javafx.scene.Parent getView()
FXMLLoader.public void getView(java.util.function.Consumer<javafx.scene.Parent> consumer)
consumer - - an object interested in received the Parent as
callbackpublic javafx.scene.Node getViewWithoutRootContainer()
AnchorPane) and gives you
the access to its first child.AnchorPane or null if there are no
children available from this view.public Object getPresenter()
public void getPresenter(java.util.function.Consumer<Object> presenterConsumer)
presenterConsumer - listener for the presenter constructionpublic Optional<ResourceBundle> getResourceBundle()
Copyright © 2018. All rights reserved.