Class FxControllerImpl
- java.lang.Object
-
- org.astonbitecode.j4rs.api.jfx.controllers.FxControllerImpl
-
- All Implemented Interfaces:
javafx.fxml.Initializable
,FxController
public class FxControllerImpl extends Object implements FxController
-
-
Constructor Summary
Constructors Constructor Description FxControllerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addControllerInitializedCallback(NativeCallbackToRustChannelSupport callback)
This will be called when the initialize method ofInitializable
is called.void
addEventHandler(String id, javafx.event.EventHandler<javafx.event.Event> handler, javafx.event.EventType<?> eventType)
Add a handler for anActionEvent
that comes from a component with a specific id.javafx.scene.Node
getNodeById(String id)
Retrieves a node given its ID.void
initialize(URL url, ResourceBundle resourceBundle)
void
setScene(javafx.scene.Scene scene)
Sets a scene for this controller.
-
-
-
Method Detail
-
initialize
public void initialize(URL url, ResourceBundle resourceBundle)
- Specified by:
initialize
in interfacejavafx.fxml.Initializable
-
addControllerInitializedCallback
public void addControllerInitializedCallback(NativeCallbackToRustChannelSupport callback)
Description copied from interface:FxController
This will be called when the initialize method ofInitializable
is called.- Specified by:
addControllerInitializedCallback
in interfaceFxController
- Parameters:
callback
- The callback to add.
-
addEventHandler
public void addEventHandler(String id, javafx.event.EventHandler<javafx.event.Event> handler, javafx.event.EventType<?> eventType) throws ComponentNotFoundException
Description copied from interface:FxController
Add a handler for anActionEvent
that comes from a component with a specific id.- Specified by:
addEventHandler
in interfaceFxController
- Parameters:
id
- The id of the callback.handler
- The handler to add.eventType
- The EventType for Event to handle.- Throws:
ComponentNotFoundException
-
getNodeById
public javafx.scene.Node getNodeById(String id) throws ComponentNotFoundException
Description copied from interface:FxController
Retrieves a node given its ID.- Specified by:
getNodeById
in interfaceFxController
- Parameters:
id
- The id of the node to retrieve.- Returns:
- The
Node
found. - Throws:
ComponentNotFoundException
- In case that the node is not found.
-
setScene
public void setScene(javafx.scene.Scene scene)
Description copied from interface:FxController
Sets a scene for this controller.- Specified by:
setScene
in interfaceFxController
- Parameters:
scene
- The scene to set.
-
-