MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / on_initialized_callback

Method on_initialized_callback

rust/src/jfx.rs:196–206  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 3

create_instanceMethod · 0.80
init_callback_channelMethod · 0.80
invokeMethod · 0.65

Tested by

no test coverage detected