|
@@ -12,6 +12,8 @@ import javafx.scene.layout.GridPane;
|
|
import javafx.scene.layout.Pane;
|
|
import javafx.scene.layout.Pane;
|
|
import javafx.scene.control.Alert.AlertType;
|
|
import javafx.scene.control.Alert.AlertType;
|
|
|
|
|
|
|
|
+import com.moviesdb.Movie;
|
|
|
|
+
|
|
import java.awt.event.MouseEvent;
|
|
import java.awt.event.MouseEvent;
|
|
import java.time.chrono.AbstractChronology;
|
|
import java.time.chrono.AbstractChronology;
|
|
|
|
|
|
@@ -27,6 +29,16 @@ public class Controller {
|
|
@FXML
|
|
@FXML
|
|
AnchorPane detailsPane;
|
|
AnchorPane detailsPane;
|
|
@FXML
|
|
@FXML
|
|
|
|
+ Label detailsNameContent;
|
|
|
|
+ @FXML
|
|
|
|
+ Label detailsYearContent;
|
|
|
|
+ @FXML
|
|
|
|
+ Label detailsDurContent;
|
|
|
|
+ @FXML
|
|
|
|
+ Label detailsGenreContent;
|
|
|
|
+ @FXML
|
|
|
|
+ Label detailsDescContent;
|
|
|
|
+ @FXML
|
|
AnchorPane detailsPicPane;
|
|
AnchorPane detailsPicPane;
|
|
@FXML
|
|
@FXML
|
|
AnchorPane filterPane;
|
|
AnchorPane filterPane;
|
|
@@ -34,8 +46,17 @@ public class Controller {
|
|
|
|
|
|
Label[] movies;
|
|
Label[] movies;
|
|
|
|
|
|
|
|
+ Movie my_movie;
|
|
|
|
+
|
|
|
|
+
|
|
public void loadPosters()
|
|
public void loadPosters()
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ my_movie = new Movie();
|
|
|
|
+ my_movie.setName("Back to the Future");
|
|
|
|
+ my_movie.setDuration("1:20");
|
|
|
|
+ my_movie.setDescription("The CSS styles for text input controls such as TextField for JavaFX 8 are defined in the modena.css stylesheet as below. Create a custom CSS stylesheet and modify the colors as you wish. Use the CSS reference guide if you need help understanding the syntax and available attributes and values.");
|
|
|
|
+ //my_movie.setCover("https://m.media-amazon.com/images/M/MV5BZmU0M2Y1OGUtZjIxNi00ZjBkLTg1MjgtOWIyNThiZWIwYjRiXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_UX182_CR0,0,182,268_AL_.jpg");
|
|
//get movies array
|
|
//get movies array
|
|
movies = new Label[10];
|
|
movies = new Label[10];
|
|
//change grid size for number of movies
|
|
//change grid size for number of movies
|
|
@@ -83,11 +104,23 @@ public class Controller {
|
|
|
|
|
|
detailsPane.setMinWidth(300);
|
|
detailsPane.setMinWidth(300);
|
|
|
|
|
|
|
|
+ detailsNameContent.setText(my_movie.name());
|
|
|
|
+ detailsYearContent.setText(my_movie.year());
|
|
|
|
+ detailsDurContent.setText(my_movie.duration());
|
|
|
|
+ detailsGenreContent.setText(my_movie.genre());
|
|
|
|
+ detailsDescContent.setText(my_movie.description());
|
|
|
|
+
|
|
detailsPicPane.getChildren().clear();
|
|
detailsPicPane.getChildren().clear();
|
|
//detailsPane.setMaxWidth(300);
|
|
//detailsPane.setMaxWidth(300);
|
|
//Label movie = e;
|
|
//Label movie = e;
|
|
ImageView detailsImage = new ImageView();
|
|
ImageView detailsImage = new ImageView();
|
|
- detailsImage = ((ImageView) e.getGraphic());
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ ImageView image = new ImageView((my_movie.cover()));
|
|
|
|
+ image.setFitHeight(222);
|
|
|
|
+ image.setFitWidth(150);
|
|
|
|
+
|
|
|
|
+ detailsImage = ((ImageView) image);
|
|
detailsImage.setX((detailsPane.getWidth() - detailsImage.getFitWidth()) / 2 + 100);
|
|
detailsImage.setX((detailsPane.getWidth() - detailsImage.getFitWidth()) / 2 + 100);
|
|
detailsImage.setY(0);
|
|
detailsImage.setY(0);
|
|
//movie.
|
|
//movie.
|