more FilmDeatilView work
This commit is contained in:
@ -1,18 +1,44 @@
|
||||
package kellerkinder.HomeFlix.application;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.text.Text;
|
||||
|
||||
public class FilmDetailView {
|
||||
|
||||
@FXML private Label lblFilm;
|
||||
@FXML private AnchorPane filmDVPane;
|
||||
@FXML private Label lblTitle;
|
||||
@FXML private Label lblYear;
|
||||
@FXML private Label lblScore;
|
||||
|
||||
@FXML private JFXButton btnWhishlist;
|
||||
@FXML private JFXButton btnFavourite;
|
||||
|
||||
@FXML private Text textPlot;
|
||||
|
||||
public void initialize() {
|
||||
System.out.println("init nested controller");
|
||||
filmDVPane.setStyle("-fx-background-color: rgba(89,89,89,0.9);");
|
||||
btnWhishlist.setGraphic(new ImageView(new Image("icons/ic_play_arrow_black_18dp_1x.png")));
|
||||
}
|
||||
|
||||
public void foo() {
|
||||
System.out.println("test");
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void btnWhishlistAction() {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void btnFavouriteAction() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ import javafx.application.Application;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
|
@ -72,6 +72,7 @@ import javafx.scene.control.TreeItem;
|
||||
import javafx.scene.control.TreeTableColumn;
|
||||
import javafx.scene.control.TreeTableColumn.SortType;
|
||||
import javafx.scene.control.TreeTableView;
|
||||
import javafx.scene.effect.BoxBlur;
|
||||
import javafx.scene.control.ScrollPane.ScrollBarPolicy;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
@ -225,7 +226,7 @@ public class MainWindowController {
|
||||
// load sources list in gui
|
||||
addSourceToTable();
|
||||
|
||||
// posterModeStartup(); // TODO testing DO NOT USE THIS!!
|
||||
posterModeStartup(); // TODO testing DO NOT USE THIS!!
|
||||
}
|
||||
|
||||
// Initialize general UI elements
|
||||
@ -252,6 +253,12 @@ public class MainWindowController {
|
||||
|
||||
setLocalUI();
|
||||
applyColor();
|
||||
|
||||
BoxBlur boxBlur = new BoxBlur();
|
||||
boxBlur.setWidth(9);
|
||||
boxBlur.setHeight(7);
|
||||
boxBlur.setIterations(3);
|
||||
posterModeFlowPane.setEffect(boxBlur);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -501,7 +508,7 @@ public class MainWindowController {
|
||||
@FXML
|
||||
private void returnBtnclicked() {
|
||||
filmsTreeTable.getSelectionModel().select(last);
|
||||
filmDetailViewController.foo();
|
||||
filmDetailViewController.foo(); // TODO
|
||||
}
|
||||
|
||||
@FXML
|
||||
@ -843,15 +850,15 @@ public class MainWindowController {
|
||||
getTextFlow().setStyle("-fx-font-size : " + ((int) Math.round(XMLController.getFontSize()) + 1) + "px;");
|
||||
|
||||
// add the image
|
||||
if (new File(cacheData[20]).isFile()) {
|
||||
try {
|
||||
try {
|
||||
if (new File(cacheData[20]).isFile()) {
|
||||
posterImageView.setImage(new Image(new File(cacheData[20]).toURI().toString()));
|
||||
} catch (Exception e) {
|
||||
posterImageView.setImage(new Image("icons/Homeflix_Poster.png"));
|
||||
LOGGER.error("No Poster found, useing default.");
|
||||
} else {
|
||||
posterImageView.setImage(new Image(cacheData[20]));
|
||||
}
|
||||
} else {
|
||||
posterImageView.setImage(new Image(cacheData[20]));
|
||||
} catch (Exception e) {
|
||||
posterImageView.setImage(new Image("icons/Homeflix_Poster.png"));
|
||||
LOGGER.error("No Poster found, useing default.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,13 +219,9 @@ public class DBController {
|
||||
while (rs.next()) {
|
||||
String[] cacheData = readCache(rs.getString("streamUrl")); // get from the cache table
|
||||
|
||||
System.out.println(rs.getString("streamUrl"));
|
||||
System.out.println(":" + cacheData[20] + ":");
|
||||
|
||||
if(cacheData[20] != null && cacheData[20].length() > 0) {
|
||||
posterElementsList.add(new PosterModeElement(rs.getString("streamUrl"), cacheData[0], new Image(new File(cacheData[20]).toURI().toString())));
|
||||
} else {
|
||||
System.out.println("adding default");
|
||||
posterElementsList.add(new PosterModeElement(rs.getString("streamUrl"), cacheData[0], new Image("icons/Homeflix_Poster.png")));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user