public interface EasyFxml
NoSpringSupport if
the project does not use Spring.FxmlNode,
Try| 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 node,
Class<T> nodeClass)
Same as
loadNode(FxmlNode) except you can choose the return type wished for instead of just Pane. |
<T extends javafx.scene.Node> |
loadNode(FxmlNode node,
Class<T> nodeClass,
Object selector)
|
io.vavr.control.Try<javafx.scene.layout.Pane> |
loadNode(FxmlNode node,
Object selector)
Same as
loadNode(FxmlNode) but offers a selector parameter for multistage usage of ControllerManager. |
io.vavr.control.Try<javafx.scene.layout.Pane> loadNode(FxmlNode node)
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.
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.
node - 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.io.vavr.control.Try<javafx.scene.layout.Pane> loadNode(FxmlNode node, Object selector)
loadNode(FxmlNode) but offers a selector parameter for multistage usage of ControllerManager.node - The element's FxmlNode counterpart.selector - The selector for deduplication of Panes sharing the same FxmlNode.Pane to be loaded. See loadNode(FxmlNode) for more information on Try.<T extends javafx.scene.Node> io.vavr.control.Try<T> loadNode(FxmlNode node, Class<T> nodeClass)
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.
T - The type of the node. Mostly for type safety.node - The element's FxmlNode counterpart.nodeClass - The class of the JavaFX Node represented by this FxmlNode.Node to be loaded. See loadNode(FxmlNode) for more information on Try.<T extends javafx.scene.Node> io.vavr.control.Try<T> loadNode(FxmlNode node, Class<T> nodeClass, Object selector)
T - The type of the node. Mostly for type safety.node - 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 loadNode(FxmlNode) for more information on Try.Copyright © 2018. All rights reserved.