mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-04 03:03:48 +01:00
28 lines
675 B
Java
28 lines
675 B
Java
package io.bitsquare.di;
|
|
|
|
import com.google.inject.Injector;
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
/**
|
|
* Guice support for fxml controllers
|
|
*/
|
|
public class GuiceFXMLLoader extends FXMLLoader
|
|
{
|
|
|
|
private static Injector injector = null;
|
|
|
|
public GuiceFXMLLoader()
|
|
{
|
|
if (GuiceFXMLLoader.injector != null)
|
|
setControllerFactory(new GuiceControllerFactory(GuiceFXMLLoader.injector));
|
|
}
|
|
|
|
public GuiceFXMLLoader(Injector injector)
|
|
{
|
|
if (GuiceFXMLLoader.injector == null)
|
|
{
|
|
GuiceFXMLLoader.injector = injector;
|
|
setControllerFactory(new GuiceControllerFactory(GuiceFXMLLoader.injector));
|
|
}
|
|
}
|
|
}
|