Skip to content
Snippets Groups Projects
Commit c2368385 authored by Edvard Granheim Harbo's avatar Edvard Granheim Harbo
Browse files

Merge branch 'Checkstyle' into 'dev'

Refactor: Fixed checkstyle

See merge request !52
parents a8963717 e2d5e18a
No related branches found
No related tags found
2 merge requests!54Final release,!52Refactor: Fixed checkstyle
......@@ -52,7 +52,8 @@ public class View extends BorderPane implements ChaosGameObserver {
* @param canvasController The CanvasController object associated with the View object.
* @param fileController The FileController object associated with the View object.
*/
public View(GameController gameController, CanvasController canvasController, FileController fileController) {
public View(GameController gameController, CanvasController canvasController,
FileController fileController) {
this.gameController = gameController;
this.canvasController = canvasController;
this.fileController = fileController;
......
......@@ -2,14 +2,13 @@ package edu.ntnu.idatt2003.mappevurderingprog2.views.components;
import edu.ntnu.idatt2003.mappevurderingprog2.controllers.FileController;
import edu.ntnu.idatt2003.mappevurderingprog2.controllers.GameController;
import edu.ntnu.idatt2003.mappevurderingprog2.views.View;
import java.util.Optional;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextInputDialog;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.geometry.Pos;
/**
* This class represents a menu for the current fractal.
......
......@@ -50,7 +50,8 @@ public class ExistingFractalsMenu extends VBox {
});
Button savedFractalsButton = new Button("Saved Fractals");
savedFractalsButton.setOnAction(event -> showSavedFractalsDialog(gameController, fileController));
savedFractalsButton.setOnAction(
event -> showSavedFractalsDialog(gameController, fileController));
getChildren().addAll(headline, sierpinskiTriangleButton,
barnsleyFernButton, juliaButton, savedFractalsButton);
......@@ -63,7 +64,8 @@ public class ExistingFractalsMenu extends VBox {
*
* @param gameController the game controller
*/
private void showSavedFractalsDialog(GameController gameController, FileController fileController) {
private void showSavedFractalsDialog(
GameController gameController, FileController fileController) {
if (fileController.listTransformationFileNames().isEmpty()) {
UserFeedback.showErrorPopup("Error", "There are no saved fractals");
return;
......
......@@ -78,7 +78,8 @@ public class ExtraUserOptions extends VBox {
this.downButton = new Button("Down");
this.leftButton = new Button("Left");
this.rightButton = new Button("Right");
getStylesheets().add(getClass().getResource("/edu/ntnu/idatt2003/mappevurderingprog2/styles/extraUserOptions.css").toExternalForm());
getStylesheets().add(getClass().getResource(
"/edu/ntnu/idatt2003/mappevurderingprog2/styles/extraUserOptions.css").toExternalForm());
this.getStyleClass().add("extra-user-options");
setupZoomButtons();
......
......@@ -41,7 +41,8 @@ public class Menu extends VBox {
* @param gameController the game controller
* @param canvasController the canvas controller
*/
public Menu(View view, GameController gameController, CanvasController canvasController, FileController fileController) {
public Menu(View view, GameController gameController, CanvasController canvasController,
FileController fileController) {
existingFractalsMenu = new ExistingFractalsMenu(gameController, fileController);
createFractalMenu = new CreateFractalMenu(gameController);
currentFractalMenu = new CurrentFractalMenu(gameController, fileController);
......@@ -54,7 +55,8 @@ public class Menu extends VBox {
* Initializes the menu by setting up its components and layout.
*/
private void initializeMenu() {
getStylesheets().add(getClass().getResource("/edu/ntnu/idatt2003/mappevurderingprog2/styles/menu.css").toExternalForm());
getStylesheets().add(getClass().getResource(
"/edu/ntnu/idatt2003/mappevurderingprog2/styles/menu.css").toExternalForm());
Label menuLabel = new Label("Menu");
menuLabel.getStyleClass().add("menu-label");
quitButton.getStyleClass().add("quit-button");
......
......@@ -40,7 +40,8 @@ public class ScaleCanvasSize extends VBox {
* @param view The View object associated with the canvas.
* @param gameController The GameController object associated with the canvas.
*/
public ScaleCanvasSize(View view, GameController gameController, CanvasController canvasController) {
public ScaleCanvasSize(View view, GameController gameController,
CanvasController canvasController) {
this.gameController = gameController;
this.canvasController = canvasController;
Label scaleLabel = new Label("Scale canvas size");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment