Browse Source

Integrated new AddMovie window

Veloe 4 years ago
parent
commit
c34f63542a

+ 18 - 5
src/com/moviesdb/ActorRoleSegment.fxml

@@ -2,13 +2,26 @@
 
 <?import javafx.scene.control.TextField?>
 <?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.layout.HBox?>
 <?import javafx.scene.layout.Pane?>
 
-<AnchorPane maxHeight="35.0" minHeight="35.0" minWidth="304.0" prefHeight="35.0" prefWidth="304.0" style="-fx-background-color: #212121;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.moviesdb.ActorRoleSegment">
+<AnchorPane maxHeight="35.0" maxWidth="1.7976931348623157E308" minHeight="35.0" minWidth="250.0" prefHeight="35.0" style="-fx-background-color: #212121;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.moviesdb.ActorRoleSegment">
    <children>
-      <TextField id="actorName" layoutY="2.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.topAnchor="0.0" />
-      <TextField id="actorRole" layoutX="149.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="154.0" />
-      <Pane layoutY="35.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="25.0" />
-      <Pane layoutX="156.0" layoutY="25.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="25.0" />
+      <HBox fillHeight="false" prefHeight="35.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
+         <children>
+            <AnchorPane maxWidth="1.7976931348623157E308" AnchorPane.leftAnchor="0.0" HBox.hgrow="ALWAYS">
+               <children>
+                  <TextField id="actorName" maxWidth="1.7976931348623157E308" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
+                  <Pane prefHeight="3.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="25.0" />
+               </children>
+            </AnchorPane>
+            <AnchorPane maxWidth="1.7976931348623157E308" AnchorPane.rightAnchor="0.0" HBox.hgrow="ALWAYS">
+               <children>
+                  <TextField id="actorRole" maxWidth="1.7976931348623157E308" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
+                  <Pane prefHeight="3.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="25.0" />
+               </children>
+            </AnchorPane>
+         </children>
+      </HBox>
    </children>
 </AnchorPane>

+ 21 - 5
src/com/moviesdb/AddMovieController.java

@@ -27,11 +27,21 @@ public class AddMovieController extends Controller {
     @FXML
             TextField urlTextBox;
     @FXML
-            TextField nameTextBox;
+            TextField titleTextBox;
     @FXML
             TextField genreTextBox;
     @FXML
     TextArea descriptionTextBox;
+    @FXML
+            TextField yearTextBox;
+    @FXML
+            TextField timeTextBox;
+    @FXML
+            TextField studioTextBox;
+    @FXML
+            TextField directorTextBox;
+    @FXML
+            TextField rateTextBox;
 
     Object caller;
 
@@ -48,6 +58,7 @@ public class AddMovieController extends Controller {
     public void addActor(){
         try {
             AnchorPane row = FXMLLoader.load(getClass().getResource("ActorRoleSegment.fxml"));
+            //row.setPrefWidth(actorsGrid.getWidth());
             actorsGrid.getChildren().add(row);
         }
         catch (IOException ex)
@@ -60,10 +71,15 @@ public class AddMovieController extends Controller {
     public void addMovie(){
         //read all textboxes
         Movie NewMovie = new Movie();
-        NewMovie.movie_ImageLink = urlTextBox.getText();
-        NewMovie.movie_Name = nameTextBox.getText();
-        NewMovie.movie_Genre = genreTextBox.getText();
-        NewMovie.movie_Description = descriptionTextBox.getText();
+        NewMovie.setCover(urlTextBox.getText());
+        NewMovie.setName(titleTextBox.getText());
+        NewMovie.setGenre(genreTextBox.getText());
+        NewMovie.setYear(yearTextBox.getText());
+        NewMovie.setDuration(timeTextBox.getText());
+        NewMovie.setStudio(studioTextBox.getText());
+        NewMovie.setDirector(directorTextBox.getText());
+        NewMovie.setRating(rateTextBox.getText());
+        NewMovie.setDescription(descriptionTextBox.getText());
 
         try{
             //AnchorPane row = (AnchorPane) actorsGrid.getChildren().get(1);

+ 50 - 30
src/com/moviesdb/AdditionController.fxml → src/com/moviesdb/AddMovieWindow.fxml

@@ -1,14 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <?import javafx.scene.control.Label?>
+<?import javafx.scene.control.ScrollPane?>
 <?import javafx.scene.control.TextArea?>
 <?import javafx.scene.control.TextField?>
 <?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.layout.FlowPane?>
 <?import javafx.scene.layout.Pane?>
+<?import javafx.scene.layout.VBox?>
 <?import javafx.scene.text.Font?>
 
-<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="470.0" prefHeight="544.0" prefWidth="604.0" style="-fx-background-color: #212121;" stylesheets="@AdditionControllerStyle.css" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.moviesdb.AdditionController">
+<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="470.0" prefWidth="604.0" style="-fx-background-color: #212121;" stylesheets="@AddMovieWindowStyle.css" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.moviesdb.AddMovieController">
    <children>
+      <AnchorPane VBox.vgrow="SOMETIMES">
+              <children>
       <Label layoutX="24.0" layoutY="24.0" text="Add movie" textFill="#9f9f9f" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0">
          <font>
             <Font size="24.0" />
@@ -21,7 +26,7 @@
       </Label>
       <Pane layoutX="24.0" layoutY="74.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="75.0" />
       <Pane layoutX="169.0" layoutY="96.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="75.0" />
-      <TextField id="actorName" layoutX="175.0" layoutY="47.0" maxWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="50.0">
+      <TextField id="actorName" fx:id="titleTextBox" layoutX="175.0" layoutY="47.0" maxWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="50.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -33,7 +38,7 @@
       </Label>
       <Pane layoutX="29.0" layoutY="140.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="115.0" />
       <Pane layoutX="174.0" layoutY="162.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="115.0" />
-      <TextField id="actorName" layoutX="180.0" layoutY="113.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="90.0">
+      <TextField id="actorName" fx:id="urlTextBox" layoutX="180.0" layoutY="113.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="90.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -45,7 +50,7 @@
       </Label>
       <Pane layoutX="22.0" layoutY="234.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="155.0" />
       <Pane layoutX="167.0" layoutY="256.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="155.0" />
-      <TextField id="actorName" layoutX="221.0" layoutY="134.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="130.0">
+      <TextField id="actorName" fx:id="genreTextBox" layoutX="221.0" layoutY="134.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="130.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -57,7 +62,7 @@
       </Label>
       <Pane layoutX="32.0" layoutY="244.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="195.0" />
       <Pane layoutX="177.0" layoutY="266.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="195.0" />
-      <TextField id="actorName" layoutX="183.0" layoutY="217.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="170.0">
+      <TextField id="actorName" fx:id="yearTextBox" layoutX="183.0" layoutY="217.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="170.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -69,7 +74,7 @@
       </Label>
       <Pane layoutX="32.0" layoutY="244.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="235.0" />
       <Pane layoutX="177.0" layoutY="266.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="235.0" />
-      <TextField id="actorName" layoutX="183.0" layoutY="217.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="210.0">
+      <TextField id="actorName" fx:id="timeTextBox" layoutX="183.0" layoutY="217.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="210.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -81,7 +86,7 @@
       </Label>
       <Pane layoutX="42.0" layoutY="254.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="275.0" />
       <Pane layoutX="187.0" layoutY="276.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="275.0" />
-      <TextField id="actorName" layoutX="193.0" layoutY="227.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="250.0">
+      <TextField id="actorName" fx:id="studioTextBox" layoutX="193.0" layoutY="227.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="250.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -93,7 +98,7 @@
       </Label>
       <Pane layoutX="12.0" layoutY="349.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="315.0" />
       <Pane layoutX="157.0" layoutY="371.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="315.0" />
-      <TextField id="actorName" layoutX="163.0" layoutY="322.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="290.0">
+      <TextField id="actorName" fx:id="directorTextBox" layoutX="163.0" layoutY="322.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="290.0">
          <font>
             <Font size="14.0" />
          </font>
@@ -111,7 +116,7 @@
          </font>
       </Label>
       <Pane layoutX="392.0" layoutY="369.0" maxHeight="1.0" maxWidth="64.0" minHeight="1.0" minWidth="64.0" prefHeight="1.0" prefWidth="64.0" style="-fx-background-color: #9f9f9f;" AnchorPane.rightAnchor="62.0" AnchorPane.topAnchor="355.0" />
-      <Label alignment="CENTER" layoutX="555.0" layoutY="323.0" prefHeight="17.0" prefWidth="24.0" text="+" textFill="#9f9f9f" AnchorPane.rightAnchor="38.0" AnchorPane.topAnchor="325.0">
+      <Label alignment="CENTER" layoutX="555.0" layoutY="323.0" onMouseClicked="#addActor" prefHeight="17.0" prefWidth="24.0" text="+" textFill="#9f9f9f" AnchorPane.rightAnchor="38.0" AnchorPane.topAnchor="325.0">
          <font>
             <Font name="System Bold" size="24.0" />
          </font>
@@ -121,45 +126,60 @@
             <Font name="System Bold" size="24.0" />
          </font>
       </Label>
-      <Label layoutX="15.0" layoutY="388.0" text="User Rating" textFill="#9f9f9f" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="375.0">
+      <ScrollPane fitToHeight="true" fitToWidth="true" layoutX="174.0" layoutY="362.0" prefHeight="70.0" prefWidth="416.0" vbarPolicy="ALWAYS" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="362.0">
+         <content>
+            <FlowPane fx:id="actorsGrid" alignment="TOP_CENTER" columnHalignment="CENTER" hgap="9999" orientation="HORIZONTAL" prefHeight="68.0" prefWidth="414.0" style="-fx-background-color: #212121;" />
+         </content>
+      </ScrollPane>
+      <Label fx:id="closeButton" onMouseClicked="#closeStage" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="4.0" AnchorPane.topAnchor="4.0">
          <font>
-            <Font size="14.0" />
+            <Font name="Arimo" size="12.0" />
          </font>
       </Label>
-      <Pane layoutX="21.0" layoutY="446.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="395.0" />
-      <Pane layoutX="194.0" layoutY="406.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="395.0" />
-      <TextField id="actorName" layoutX="172.0" layoutY="419.0" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="370.0">
+      <Label fx:id="minimizeButton" onMouseClicked="#minimizeStage" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="24.0" AnchorPane.topAnchor="4.0">
          <font>
-            <Font size="14.0" />
+            <Font name="Arimo" size="12.0" />
          </font>
-      </TextField>
-      <Label layoutX="25.0" layoutY="398.0" text="Description" textFill="#9f9f9f" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="415.0">
+      </Label>
+              </children>
+      </AnchorPane>
+      <AnchorPane VBox.vgrow="SOMETIMES">
+         <children>
+      <Label text="User Rating" textFill="#9f9f9f" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="38.0">
          <font>
             <Font size="14.0" />
          </font>
       </Label>
-      <Pane layoutX="31.0" layoutY="456.0" prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="435.0" />
-      <TextArea layoutX="208.0" layoutY="407.0" minHeight="30.0" prefHeight="70.0" prefWidth="200.0" style="-fx-text-fill: #9f9f9f;" wrapText="true" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="410.0">
+      <Pane prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="58.0" />
+      <Pane prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="58.0" />
+      <TextField id="actorName" fx:id="rateTextBox" maxWidth="150.0" minWidth="150.0" style="-fx-opacity: 1; -fx-background-color: transparent; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="33.0">
          <font>
             <Font size="14.0" />
          </font>
-      </TextArea>
-      <Pane layoutX="146.0" layoutY="445.0" prefHeight="43.0" prefWidth="1.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.topAnchor="435.0" />
-      <Pane layoutX="204.0" layoutY="416.0" prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="475.0" />
-      <Label fx:id="deleteMovieButton" layoutX="61.0" layoutY="468.0" text="Add" textFill="#9f9f9f" AnchorPane.bottomAnchor="14.0" AnchorPane.rightAnchor="14.0">
+      </TextField>
+      <Label text="Description" textFill="#9f9f9f" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="78.0">
          <font>
-            <Font name="System Bold" size="16.0" />
+            <Font size="14.0" />
          </font>
       </Label>
-      <Label fx:id="closeButton" layoutX="231.0" layoutY="24.0" onMouseClicked="#closeStage" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="4.0" AnchorPane.topAnchor="4.0">
+      <Pane prefHeight="1.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="24.0" AnchorPane.topAnchor="98.0" />
+      <TextArea fx:id="descriptionTextBox" minHeight="30.0" prefHeight="70.0" prefWidth="200.0" style="-fx-text-fill: #9f9f9f;" wrapText="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="71.0">
          <font>
-            <Font name="Arimo" size="12.0" />
+            <Font size="14.0" />
          </font>
-      </Label>
-      <Label fx:id="minimizeButton" layoutX="211.0" layoutY="14.0" onMouseClicked="#minimizeStage" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="24.0" AnchorPane.topAnchor="4.0">
+      </TextArea>
+      <Pane prefHeight="43.0" prefWidth="1.0" style="-fx-background-color: #9f9f9f;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="174.0" AnchorPane.topAnchor="98.0" />
+      <Pane prefHeight="3.0" prefWidth="150.0" style="-fx-background-color: #9f9f9f;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="174.0" AnchorPane.rightAnchor="14.0" />
+         </children>
+      </AnchorPane>
+      <AnchorPane prefWidth="200.0" VBox.vgrow="NEVER">
+         <children>
+      <Label onMouseClicked="#addMovie" text="Add" textFill="#9f9f9f" AnchorPane.bottomAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0">
          <font>
-            <Font name="Arimo" size="12.0" />
+            <Font name="System Bold" size="16.0" />
          </font>
       </Label>
+         </children>
+      </AnchorPane>
    </children>
-</AnchorPane>
+</VBox>

+ 0 - 0
src/com/moviesdb/AdditionControllerStyle.css → src/com/moviesdb/AddMovieWindowStyle.css


+ 0 - 18
src/com/moviesdb/AdditionController.java

@@ -1,18 +0,0 @@
-package com.moviesdb;
-import javafx.fxml.FXML;
-import javafx.scene.control.*;
-import javafx.stage.Modality;
-
-public class AdditionController extends Controller{
-
-    Object caller;
-
-    public void open(Object caller) {
-        prepare();
-        stage.initModality(Modality.WINDOW_MODAL);
-        stage.initOwner(((BrowserController)caller).stage.getScene().getWindow());
-        this.caller = caller;
-        stage.setTitle("Add Movie");
-        stage.show();
-    }
-}

+ 7 - 5
src/com/moviesdb/BrowserController.java

@@ -52,6 +52,8 @@ public class BrowserController extends Controller {
     Button logInButton2;
     @FXML
     MenuBar menuPane;
+    @FXML
+    MenuItem reloadMenu;
 
     @FXML
     Label deleteMovieButton;
@@ -119,7 +121,7 @@ public class BrowserController extends Controller {
     {
         //detailsPane.setMinWidth(300);
         //get movies array
-        if (my_connector.initialized() & my_connector.granted("USAGE")) {
+        if (my_connector.initialized() & (my_connector.granted("USAGE") || my_connector.granted("SELECT"))) {
             movies = my_connector.getMovies();
             labelsMovies = new Label[movies.length];
 
@@ -347,7 +349,7 @@ public class BrowserController extends Controller {
     public void openAddForm() {
 
         try {
-            FXMLLoader loader = new FXMLLoader(getClass().getResource("add.fxml"));
+            FXMLLoader loader = new FXMLLoader(getClass().getResource("AddMovieWindow.fxml"));
             Parent root = loader.load();
             addWindow = loader.getController();
             addWindow.stage = new Stage();
@@ -361,10 +363,10 @@ public class BrowserController extends Controller {
 
     }
 
-    AdditionController altAddition;
+    /*AdditionController altAddition;
     public void openAltAddForm(){
         try {
-            FXMLLoader loader = new FXMLLoader(getClass().getResource("AdditionController.fxml"));
+            FXMLLoader loader = new FXMLLoader(getClass().getResource("AddMovieWindow.fxml"));
             Parent root = loader.load();
             altAddition = loader.getController();
             altAddition.stage = new Stage();
@@ -376,7 +378,7 @@ public class BrowserController extends Controller {
             e.printStackTrace();
         }
     }
-
+*/
     public Boolean newArgLogin(String user, String pass){
 
         Properties property = new Properties();

+ 6 - 6
src/com/moviesdb/test2.fxml → src/com/moviesdb/BrowserWindow.fxml

@@ -58,13 +58,13 @@
               <menus>
                 <Menu mnemonicParsing="false" text="File">
                   <items>
-                    <MenuItem mnemonicParsing="false" text="Close" />
+                      <MenuItem fx:id="reloadMenu" mnemonicParsing="false" onAction="#loadPosters" text="Reload" />
+                      <MenuItem mnemonicParsing="false" text="Close" />
                   </items>
                 </Menu>
                 <Menu mnemonicParsing="false" text="Edit">
                   <items>
                     <MenuItem fx:id="addMenu" mnemonicParsing="false" onAction="#openAddForm" text="Add" />
-                    <MenuItem fx:id="addMenuAlt" mnemonicParsing="false" onAction="#openAltAddForm" text="AddAlt" />
                   </items>
                 </Menu>
                 <Menu mnemonicParsing="false" text="Help">
@@ -109,17 +109,17 @@
                         <Color red="0.624" green="0.624" blue="0.624" fx:id="x21" />
                      </textFill>
                   </Label>
-                  <ScrollPane fx:id="scrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" layoutX="14.0" layoutY="48.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="400.0" prefHeight="470.0" prefWidth="858.0" style="-fx-background-color: transparent; -fx-border-color: #212121;" vbarPolicy="NEVER" AnchorPane.bottomAnchor="31.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="8.0" AnchorPane.topAnchor="48.0">
+                  <ScrollPane fx:id="scrollPane" fitToWidth="true" hbarPolicy="NEVER" layoutX="14.0" layoutY="48.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="400.0" prefHeight="470.0" prefWidth="858.0" style="-fx-background-color: transparent; -fx-border-color: #212121;" vbarPolicy="NEVER" AnchorPane.bottomAnchor="31.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="8.0" AnchorPane.topAnchor="48.0">
                      <styleClass>
                         <String fx:value="split-pane" />
                         <String fx:value="split-pane-divider" />
                      </styleClass>
                      <content>
-                         <AnchorPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
+                        <AnchorPane prefHeight="200.0" prefWidth="200.0">
                            <children>
-                              <FlowPane fx:id="moviesGrid" layoutY="-26.0" prefHeight="469.0" prefWidth="854.0" style="-fx-background-color: #212121;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
+                              <FlowPane fx:id="moviesGrid" prefHeight="469.0" prefWidth="854.0" style="-fx-background-color: #212121;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
                            </children>
-                         </AnchorPane>
+                        </AnchorPane>
                      </content>
                   </ScrollPane>
                   <Label alignment="CENTER" layoutX="11.0" layoutY="520.0" onMouseClicked="#openFilter" style="&#10;" text="Advanced search?" textAlignment="CENTER" wrapText="false" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="11.0">

+ 1 - 1
src/com/moviesdb/Main.java

@@ -17,7 +17,7 @@ public class Main extends Application {
     @Override
     public void start(Stage primaryStage) throws Exception{
         FXMLLoader loader = new FXMLLoader();
-        loader.setLocation(getClass().getResource("test2.fxml"));
+        loader.setLocation(getClass().getResource("BrowserWindow.fxml"));
         Parent root = loader.load();
         primaryStage.initStyle(StageStyle.UNDECORATED);
         primaryStage.setUserData(loader);

+ 18 - 9
src/com/moviesdb/Movie.java

@@ -84,47 +84,56 @@ public class Movie {
     }
 
     public int setName(String newName) {
-        movie_Name = newName;
+        if (newName != "")
+            movie_Name = newName;
         return 0;
     }
 
     public int setGenre(String newGenre){
-        movie_Genre = newGenre;
+        if (newGenre != "")
+            movie_Genre = newGenre;
         return 0;
     }
 
     public int setDescription(String newDescription){
-        movie_Description = newDescription;
+        if (newDescription != "")
+            movie_Description = newDescription;
         return 0;
     }
 
     public int setDuration(String newDuration){
-        movie_Duration = newDuration;
+        if (newDuration != "")
+            movie_Duration = newDuration;
         return 0;
     }
 
     public int setRating(String newRating){
-        movie_Rating = newRating;
+        if (newRating != "")
+            movie_Rating = newRating;
         return 0;
     }
 
     public int setYear(String newYear){
-        movie_Year = newYear;
+        if (newYear != "")
+            movie_Year = newYear;
         return 0;
     }
 
     public int setStudio(String newStudio){
-        movie_Studio = newStudio;
+        if (newStudio != "")
+            movie_Studio = newStudio;
         return 0;
     }
 
     public int setDirector(String newDirector){
-        movie_Director = newDirector;
+        if (newDirector != "")
+            movie_Director = newDirector;
         return 0;
     }
 
     public int setCover(String newImageLink){
-        movie_ImageLink = newImageLink;
+        if (newImageLink != "")
+            movie_ImageLink = newImageLink;
         return 0;
     }
 }

+ 0 - 31
src/com/moviesdb/add.fxml

@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<?import javafx.scene.control.Button?>
-<?import javafx.scene.control.Label?>
-<?import javafx.scene.control.ScrollPane?>
-<?import javafx.scene.control.TextArea?>
-<?import javafx.scene.control.TextField?>
-<?import javafx.scene.layout.AnchorPane?>
-<?import javafx.scene.layout.FlowPane?>
-
-<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="635.0" prefWidth="377.0" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.moviesdb.AddMovieController">
-   <children>
-      <Label layoutX="14.0" layoutY="14.0" text="Add movie master" />
-      <TextField fx:id="urlTextBox" layoutX="63.0" layoutY="40.0" prefHeight="25.0" prefWidth="305.0" />
-      <Label layoutX="14.0" layoutY="44.0" text="Label" />
-      <TextField fx:id="nameTextBox" layoutX="63.0" layoutY="72.0" />
-      <Label layoutX="14.0" layoutY="76.0" text="Label" />
-      <TextField fx:id="genreTextBox" layoutX="63.0" layoutY="105.0" />
-      <Label layoutX="14.0" layoutY="109.0" text="Label" />
-      <Label layoutX="14.0" layoutY="141.0" text="Label" />
-      <TextArea fx:id="descriptionTextBox" layoutX="11.0" layoutY="394.0" prefHeight="200.0" prefWidth="356.0" />
-      <ScrollPane layoutX="11.0" layoutY="169.0" prefHeight="200.0" prefWidth="356.0">
-         <content>
-            <FlowPane fx:id="actorsGrid" prefHeight="200.0" prefWidth="339.0" />
-         </content>
-      </ScrollPane>
-      <Label layoutX="13.0" layoutY="377.0" text="Description" />
-      <Button layoutX="329.0" layoutY="599.0" mnemonicParsing="false" onMouseClicked="#addMovie" text="Add" />
-      <Button fx:id="addActorButton" layoutX="340.0" layoutY="137.0" mnemonicParsing="false" onMouseClicked="#addActor" text="+" />
-   </children>
-</AnchorPane>