added a sample nested controller
This commit is contained in:
parent
bb8bcd460a
commit
f23e6c77ea
|
@ -0,0 +1,18 @@
|
||||||
|
package kellerkinder.HomeFlix.application;
|
||||||
|
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Label;
|
||||||
|
|
||||||
|
public class FilmDetailView {
|
||||||
|
|
||||||
|
@FXML private Label lblFilm;
|
||||||
|
|
||||||
|
public void initialize() {
|
||||||
|
System.out.println("init nested controller");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void foo() {
|
||||||
|
System.out.println("test");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -34,6 +34,7 @@ import javafx.application.Application;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
|
|
@ -163,6 +163,9 @@ public class MainWindowController {
|
||||||
// poster-mode
|
// poster-mode
|
||||||
@FXML private ScrollPane posterModeScrollPane;
|
@FXML private ScrollPane posterModeScrollPane;
|
||||||
@FXML private FlowPane posterModeFlowPane;
|
@FXML private FlowPane posterModeFlowPane;
|
||||||
|
|
||||||
|
// FilmDetailView
|
||||||
|
@FXML private FilmDetailView filmDetailViewController;
|
||||||
|
|
||||||
private DBController dbController;
|
private DBController dbController;
|
||||||
private UpdateController updateController;
|
private UpdateController updateController;
|
||||||
|
@ -498,6 +501,7 @@ public class MainWindowController {
|
||||||
@FXML
|
@FXML
|
||||||
private void returnBtnclicked() {
|
private void returnBtnclicked() {
|
||||||
filmsTreeTable.getSelectionModel().select(last);
|
filmsTreeTable.getSelectionModel().select(last);
|
||||||
|
filmDetailViewController.foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
|
||||||
|
<AnchorPane prefHeight="568.0" prefWidth="980.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="kellerkinder.HomeFlix.application.FilmDetailView">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="lblFilm" layoutX="461.0" layoutY="277.0" text="Test Pane" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
|
@ -74,6 +74,9 @@
|
||||||
</FlowPane>
|
</FlowPane>
|
||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
|
<AnchorPane>
|
||||||
|
<fx:include source="/fxml/FilmDetailView.fxml" fx:id="filmDetailView" />
|
||||||
|
</AnchorPane>
|
||||||
<ScrollPane fx:id="settingsScrollPane" fitToHeight="true" fitToWidth="true" prefHeight="568.0" prefWidth="800.0" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="32.0">
|
<ScrollPane fx:id="settingsScrollPane" fitToHeight="true" fitToWidth="true" prefHeight="568.0" prefWidth="800.0" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="32.0">
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane fx:id="settingsAnchorPane" style="-fx-background-color: white;">
|
<AnchorPane fx:id="settingsAnchorPane" style="-fx-background-color: white;">
|
||||||
|
|
Loading…
Reference in New Issue