| Modifier | Constructor and Description |
|---|---|
protected |
BaseEasyFxml(org.springframework.context.ApplicationContext context,
org.springframework.core.env.Environment environment,
ControllerManager controllerManager) |
| Modifier and Type | Method and Description |
|---|---|
io.vavr.control.Try<javafx.scene.layout.Pane> |
loadNode(FxmlNode node)
Loads a
FxmlNode as a Pane (this is the safest base class for all sorts of hierarchies) since most of the
base containers are subclasses of it. |
<T extends javafx.scene.Node> |
loadNode(FxmlNode nodeInfo,
Class<T> nodeClass)
Same as
EasyFxml.loadNode(FxmlNode) except you can choose the return type wished for instead of just Pane. |
<T extends javafx.scene.Node> |
loadNode(FxmlNode nodeInfo,
Class<T> nodeClass,
Object selector)
This is to
EasyFxml.loadNode(FxmlNode, Class) just what EasyFxml.loadNode(FxmlNode, Object) is to EasyFxml.loadNode(FxmlNode). |
io.vavr.control.Try<javafx.scene.layout.Pane> |
loadNode(FxmlNode node,
Object selector)
Same as
EasyFxml.loadNode(FxmlNode) but offers a selector parameter for multistage usage of ControllerManager. |
@Autowired
protected BaseEasyFxml(org.springframework.context.ApplicationContext context,
org.springframework.core.env.Environment environment,
ControllerManager controllerManager)
public io.vavr.control.Try<javafx.scene.layout.Pane> loadNode(FxmlNode node)
EasyFxmlFxmlNode as a Pane (this is the safest base class for all sorts of hierarchies) since most of the
base containers are subclasses of it.
It also registers its controller in the ControllerManager for later usage.
It returns a Try which is a monadic structure which allows us to do clean exception-handling.
loadNode in interface EasyFxmlnode - The element's FxmlNode counterpart.Try containing either the JavaFX Pane inside a Try.Success or the exception
that was raised during the chain of calls needed to load it, inside a Try.Failure. See Value.getOrElse(Object), Try.onFailure(Consumer), Try.recover(Function) and related methods for
how to handle Try.Failure.public io.vavr.control.Try<javafx.scene.layout.Pane> loadNode(FxmlNode node, Object selector)
EasyFxmlEasyFxml.loadNode(FxmlNode) but offers a selector parameter for multistage usage of ControllerManager.loadNode in interface EasyFxmlnode - The element's FxmlNode counterpart.selector - The selector for deduplication of Panes sharing the same FxmlNode.Pane to be loaded. See EasyFxml.loadNode(FxmlNode) for more information on Try.public <T extends javafx.scene.Node> io.vavr.control.Try<T> loadNode(FxmlNode nodeInfo, Class<T> nodeClass)
EasyFxmlEasyFxml.loadNode(FxmlNode) except you can choose the return type wished for instead of just Pane.
It's a bad idea but it can sometimes be actually useful on the rare case where the element is really nothing like a Pane. Be it a very complex button or a custom textfield with non-rectangular shape.
loadNode in interface EasyFxmlT - The type of the node. Mostly for type safety.nodeInfo - The element's FxmlNode counterpart.nodeClass - The class of the JavaFX Node represented by this FxmlNode.Node to be loaded. See EasyFxml.loadNode(FxmlNode) for more information on Try.public <T extends javafx.scene.Node> io.vavr.control.Try<T> loadNode(FxmlNode nodeInfo, Class<T> nodeClass, Object selector)
EasyFxmlEasyFxml.loadNode(FxmlNode, Class) just what EasyFxml.loadNode(FxmlNode, Object) is to EasyFxml.loadNode(FxmlNode).loadNode in interface EasyFxmlT - The type of the node. Mostly for type safety.nodeInfo - The element's FxmlNode counterpart.nodeClass - The class of the JavaFX Node represented by this FxmlNode.selector - The selector for deduplication of Panes sharing the same FxmlNode.Node to be loaded. See EasyFxml.loadNode(FxmlNode) for more information on Try.Copyright © 2018. All rights reserved.