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.
Felix Roske (felix.roske@zalando.de) changed this to use annotation for fxml path.
| Type | Property and Description |
|---|---|
javafx.beans.property.StringProperty |
title |
| Modifier and Type | Field and Description |
|---|---|
protected ResourceBundle |
bundle |
protected javafx.fxml.FXMLLoader |
fxmlLoader |
protected javafx.beans.property.ObjectProperty<Object> |
presenterProperty |
protected URL |
resource |
protected javafx.beans.property.StringProperty |
title |
| Constructor and Description |
|---|
AbstractFxmlView() |
AbstractFxmlView(String path) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getConventionalName() |
protected String |
getConventionalName(String ending) |
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.
|
ResourceBundle |
getResourceBundle() |
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) |
protected void |
setTitle(String title)
Sets the value of the property title.
|
javafx.beans.property.StringProperty |
titleProperty() |
public javafx.beans.property.StringProperty titleProperty
setTitle(String)protected javafx.beans.property.ObjectProperty<Object> presenterProperty
protected javafx.beans.property.StringProperty title
protected javafx.fxml.FXMLLoader fxmlLoader
protected ResourceBundle bundle
protected URL resource
public AbstractFxmlView()
public AbstractFxmlView(String path)
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()
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.AnchorPanepublic Object getPresenter()
public void getPresenter(java.util.function.Consumer<Object> presenterConsumer)
presenterConsumer - listener for the presenter constructionprotected String getConventionalName(String ending)
ending - the suffix to appendprotected String getConventionalName()
public ResourceBundle getResourceBundle()
protected void setTitle(String title)
public javafx.beans.property.StringProperty titleProperty()
setTitle(String)Copyright © 2016. All rights reserved.