Interface FxController
-
- All Superinterfaces:
javafx.fxml.Initializable
- All Known Implementing Classes:
FxControllerImpl
public interface FxController extends javafx.fxml.Initializable
-
-
Method Summary
All Methods Instance Methods Abstract 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
setScene(javafx.scene.Scene scene)
Sets a scene for this controller.
-
-
-
Method Detail
-
addControllerInitializedCallback
void addControllerInitializedCallback(NativeCallbackToRustChannelSupport callback)
This will be called when the initialize method ofInitializable
is called.- Parameters:
callback
- The callback to add.
-
addEventHandler
void addEventHandler(String id, javafx.event.EventHandler<javafx.event.Event> handler, javafx.event.EventType<?> eventType) throws ComponentNotFoundException
Add a handler for anActionEvent
that comes from a component with a specific id.- Parameters:
id
- The id of the callback.handler
- The handler to add.eventType
- The EventType for Event to handle.- Throws:
ComponentNotFoundException
-
getNodeById
javafx.scene.Node getNodeById(String id) throws ComponentNotFoundException
Retrieves a node given its ID.- Parameters:
id
- The id of the node to retrieve.- Returns:
- The
Node
found. - Throws:
ComponentNotFoundException
- In case that the node is not found.
-
setScene
void setScene(javafx.scene.Scene scene)
Sets a scene for this controller.- Parameters:
scene
- The scene to set.
-
-