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 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.voidinitialize(URL url, ResourceBundle resourceBundle)voidsetScene(javafx.scene.Scene scene)Sets a scene for this controller.
-
-
-
Method Detail
-
initialize
public void initialize(URL url, ResourceBundle resourceBundle)
- Specified by:
initializein interfacejavafx.fxml.Initializable
-
addControllerInitializedCallback
public void addControllerInitializedCallback(NativeCallbackToRustChannelSupport callback)
Description copied from interface:FxControllerThis will be called when the initialize method ofInitializableis called.- Specified by:
addControllerInitializedCallbackin 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:FxControllerAdd a handler for anActionEventthat comes from a component with a specific id.- Specified by:
addEventHandlerin 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:FxControllerRetrieves a node given its ID.- Specified by:
getNodeByIdin interfaceFxController- Parameters:
id- The id of the node to retrieve.- Returns:
- The
Nodefound. - Throws:
ComponentNotFoundException- In case that the node is not found.
-
setScene
public void setScene(javafx.scene.Scene scene)
Description copied from interface:FxControllerSets a scene for this controller.- Specified by:
setScenein interfaceFxController- Parameters:
scene- The scene to set.
-
-