Search in sources :

Example 1 with MainViewController

use of com.exalttech.trex.ui.controllers.MainViewController in project trex-stateless-gui by cisco-system-traffic-generator.

the class TrexApp method start.

@Override
public void start(Stage stage) throws Exception {
    speedupTooltip();
    primaryStage = stage;
    FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/MainView.fxml"));
    AnchorPane page = fxmlLoader.load();
    MainViewController mainviewcontroller = fxmlLoader.getController();
    Scene scene = new Scene(page);
    scene.getStylesheets().add(TrexApp.class.getResource("/styles/mainStyle.css").toExternalForm());
    stage.setScene(scene);
    stage.setTitle("TRex");
    stage.setResizable(true);
    stage.setMinWidth(780);
    stage.setMinHeight(700);
    stage.getIcons().add(new Image("/icons/trex.png"));
    packetBuilderAppController = injector.getInstance(AppController.class);
    PreferencesManager.getInstance().setPacketEditorConfigurations(packetBuilderAppController.getConfigurations());
    packetBuilderAppController.registerEventBusHandler(mainviewcontroller);
    stage.show();
}
Also used : MainViewController(com.exalttech.trex.ui.controllers.MainViewController) AppController(com.xored.javafx.packeteditor.controllers.AppController) Scene(javafx.scene.Scene) Image(javafx.scene.image.Image) FXMLLoader(javafx.fxml.FXMLLoader) AnchorPane(javafx.scene.layout.AnchorPane)

Aggregations

MainViewController (com.exalttech.trex.ui.controllers.MainViewController)1 AppController (com.xored.javafx.packeteditor.controllers.AppController)1 FXMLLoader (javafx.fxml.FXMLLoader)1 Scene (javafx.scene.Scene)1 Image (javafx.scene.image.Image)1 AnchorPane (javafx.scene.layout.AnchorPane)1