Search in sources :

Example 91 with FXMLLoader

use of javafx.fxml.FXMLLoader in project jgnash by ccavanaugh.

the class InvestmentSlipManager method buildAdjustShareTab.

private SlipControllerContainer buildAdjustShareTab(final String name, final TransactionType transactionType) {
    try {
        final FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("AdjustSharesSlip.fxml"), resources);
        final Pane pane = fxmlLoader.load();
        final AdjustSharesSlipController slipController = fxmlLoader.getController();
        slipController.setTransactionType(transactionType);
        slipController.accountProperty().bind(accountProperty());
        return new SlipControllerContainer(name, slipController, pane);
    } catch (final IOException e) {
        throw new RuntimeException(e);
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) StackPane(javafx.scene.layout.StackPane) Pane(javafx.scene.layout.Pane)

Example 92 with FXMLLoader

use of javafx.fxml.FXMLLoader in project jgnash by ccavanaugh.

the class InvestmentSlipManager method buildSellShareTab.

private SlipControllerContainer buildSellShareTab(final String name) {
    try {
        final FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("SellShareSlip.fxml"), resources);
        final Pane pane = fxmlLoader.load();
        final SellShareSlipController slipController = fxmlLoader.getController();
        slipController.accountProperty().bind(accountProperty());
        return new SlipControllerContainer(name, slipController, pane);
    } catch (final IOException e) {
        throw new RuntimeException(e);
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) StackPane(javafx.scene.layout.StackPane) Pane(javafx.scene.layout.Pane)

Example 93 with FXMLLoader

use of javafx.fxml.FXMLLoader in project jgnash by ccavanaugh.

the class LockedBasicRegisterPaneController method initialize.

@FXML
@Override
void initialize() {
    super.initialize();
    // Load the register table
    try {
        final FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("BasicRegisterTable.fxml"), resources);
        registerTablePane.getChildren().add(fxmlLoader.load());
        registerTableController.set(fxmlLoader.getController());
    } catch (final IOException e) {
        Logger.getLogger(getClass().getName()).log(Level.SEVERE, e.getLocalizedMessage(), e);
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) FXML(javafx.fxml.FXML)

Example 94 with FXMLLoader

use of javafx.fxml.FXMLLoader in project jgnash by ccavanaugh.

the class LockedInvestmentRegisterPaneController method initialize.

@FXML
@Override
void initialize() {
    super.initialize();
    // Load the register table
    try {
        final FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("InvestmentRegisterTable.fxml"), resources);
        registerTablePane.getChildren().add(fxmlLoader.load());
        registerTableController.set(fxmlLoader.getController());
    } catch (final IOException e) {
        Logger.getLogger(getClass().getName()).log(Level.SEVERE, e.getLocalizedMessage(), e);
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) FXML(javafx.fxml.FXML)

Example 95 with FXMLLoader

use of javafx.fxml.FXMLLoader 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

FXMLLoader (javafx.fxml.FXMLLoader)113 IOException (java.io.IOException)67 Scene (javafx.scene.Scene)37 Parent (javafx.scene.Parent)33 Stage (javafx.stage.Stage)28 URL (java.net.URL)24 FXML (javafx.fxml.FXML)24 Pane (javafx.scene.layout.Pane)24 ActionEvent (javafx.event.ActionEvent)18 AnchorPane (javafx.scene.layout.AnchorPane)18 ResourceBundle (java.util.ResourceBundle)16 BorderPane (javafx.scene.layout.BorderPane)16 Initializable (javafx.fxml.Initializable)14 JFXButton (com.jfoenix.controls.JFXButton)13 StackPane (javafx.scene.layout.StackPane)13 KeyFrame (javafx.animation.KeyFrame)12 Timeline (javafx.animation.Timeline)12 Duration (javafx.util.Duration)12 Level (java.util.logging.Level)11 Logger (java.util.logging.Logger)11