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);
}
}
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);
}
}
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);
}
}
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);
}
}
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();
}
Aggregations