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 voidaddControllerInitializedCallback(NativeCallbackToRustChannelSupport callback)This will be called when the initialize method ofInitializableis called.voidaddEventHandler(String id, javafx.event.EventHandler<javafx.event.Event> handler, javafx.event.EventType<?> eventType)Add a handler for anActionEventthat comes from a component with a specific id.javafx.scene.NodegetNodeById(String id)Retrieves a node given its ID.voidsetScene(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 ofInitializableis 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 anActionEventthat 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
Nodefound. - 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.
-
-