|
@@ -173,12 +173,14 @@ public class EditMovieController extends Controller {
|
|
|
//TODO ADD ACTORS INFO
|
|
|
List<Role> Role = ((BrowserController) caller).getRolesFromConnection(editableMovie.id());
|
|
|
|
|
|
+
|
|
|
+ //moveFloatingElements(35);
|
|
|
+
|
|
|
for (Role row : Role) {
|
|
|
- moveFloatingElements(35);
|
|
|
addFilledRole(row);
|
|
|
}
|
|
|
|
|
|
- if ((actorsGridAncor.getChildren().size()) == 1)
|
|
|
+ if ((actorsGridAncor.getChildren().size()) < 1)
|
|
|
addActor();
|
|
|
}
|
|
|
|
|
@@ -188,8 +190,8 @@ public class EditMovieController extends Controller {
|
|
|
//row.setPrefWidth(actorsGrid.getWidth());
|
|
|
actorsGridAncor.getChildren().add(row);
|
|
|
actorsGrid.setMinHeight(actorsGrid.getMinHeight() + 35);
|
|
|
- if ((long) actorsGridAncor.getChildren().size() > 1)
|
|
|
- moveFloatingElements(35);
|
|
|
+ //if ((long) actorsGridAncor.getChildren().size() > 1)
|
|
|
+ //moveFloatingElements(35);
|
|
|
} catch (IOException ex) {
|
|
|
ex.printStackTrace();
|
|
|
}
|
|
@@ -200,12 +202,14 @@ public class EditMovieController extends Controller {
|
|
|
if (count > 1) {
|
|
|
actorsGridAncor.getChildren().remove(count - 1);
|
|
|
actorsGrid.setMinHeight(actorsGrid.getMinHeight() - 35);
|
|
|
- moveFloatingElements(-35);
|
|
|
+ //moveFloatingElements(-35);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void moveFloatingElements(int space) {
|
|
|
+
|
|
|
AnchorPane.setTopAnchor(actorLabel, actorLabel.getLayoutY() + space);
|
|
|
+ System.out.println(AnchorPane.getTopAnchor(actorLabel));
|
|
|
AnchorPane.setTopAnchor(actorUnderline, actorUnderline.getLayoutY() + space);
|
|
|
AnchorPane.setTopAnchor(roleLabel, roleLabel.getLayoutY() + space);
|
|
|
AnchorPane.setTopAnchor(roleUnderline, roleUnderline.getLayoutY() + space);
|
|
@@ -302,6 +306,8 @@ public class EditMovieController extends Controller {
|
|
|
|
|
|
|
|
|
private void addFilledRole(Role filledRole) {
|
|
|
+
|
|
|
+ //moveFloatingElements(35);
|
|
|
try {
|
|
|
//AnchorPane row = (AnchorPane) actorsGrid.getChildren().get(1);
|
|
|
addActor();
|