mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-20 21:04:28 -04:00
initial commit. gui prototype v 0.1
This commit is contained in:
parent
e028928571
commit
bc09937785
140 changed files with 5398 additions and 2 deletions
51
src/main/java/io/bitsquare/BitSquare.java
Normal file
51
src/main/java/io/bitsquare/BitSquare.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
package io.bitsquare;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import io.bitsquare.di.BitSquareModule;
|
||||
import io.bitsquare.di.GuiceFXMLLoader;
|
||||
import io.bitsquare.setup.ISetup;
|
||||
import io.bitsquare.setup.MockSetup;
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class BitSquare extends Application
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(BitSquare.class);
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
launch(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage stage)
|
||||
{
|
||||
Injector injector = Guice.createInjector(new BitSquareModule());
|
||||
ISetup setup = injector.getInstance(MockSetup.class);
|
||||
|
||||
setup.applyPersistedData();
|
||||
|
||||
stage.setTitle("BitSquare");
|
||||
|
||||
GuiceFXMLLoader loader = new GuiceFXMLLoader(injector);
|
||||
try
|
||||
{
|
||||
Parent mainView = loader.load(BitSquare.class.getResourceAsStream("/io/bitsquare/gui/MainView.fxml"));
|
||||
Scene scene = new Scene(mainView, 800, 600);
|
||||
scene.getStylesheets().setAll(getClass().getResource("/io/bitsquare/gui/global.css").toExternalForm());
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
} catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue