Creates an InstanceReceiver that will receive an Event once the Controller in initialized by the JavaFX framework. JavaFX FXMLLoader will automatically do the call after the root element of the controller has been completely processed.
(&self, jvm: &Jvm)
| 194 | /// |
| 195 | /// JavaFX FXMLLoader will automatically do the call after the root element of the controller has been completely processed. |
| 196 | pub fn on_initialized_callback(&self, jvm: &Jvm) -> errors::Result<InstanceReceiver> { |
| 197 | let channel_support = |
| 198 | jvm.create_instance(CLASS_NATIVE_CALLBACK_TO_RUST_CHANNEL_SUPPORT, InvocationArg::empty())?; |
| 199 | let instance_receiver = jvm.init_callback_channel(&channel_support); |
| 200 | jvm.invoke( |
| 201 | &self.controller, |
| 202 | "addControllerInitializedCallback", |
| 203 | &[InvocationArg::try_from(channel_support)?], |
| 204 | )?; |
| 205 | instance_receiver |
| 206 | } |
| 207 | |
| 208 | /// Returns an InstanceReceiver that receives events of etype fx_event_type from the JavaFX node with the specified node_id (id attribute of the fxml element). |
| 209 | pub fn get_event_receiver_for_node( |
nothing calls this directly
no test coverage detected