From 3239dc3e665e4b572c37e3319c29b9120f050c76 Mon Sep 17 00:00:00 2001 From: Sebastian Quek Date: Sun, 26 Jul 2015 22:56:14 +0800 Subject: [PATCH] Removed redundant references to Author and SourceFile classes from MainApp. --- src/main/java/gui/MainApp.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/gui/MainApp.java b/src/main/java/gui/MainApp.java index 4340871..8a744c9 100644 --- a/src/main/java/gui/MainApp.java +++ b/src/main/java/gui/MainApp.java @@ -1,18 +1,14 @@ package main.java.gui; import java.io.IOException; -import java.util.HashMap; import javafx.application.Application; -import javafx.collections.ObservableList; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.input.KeyCode; import javafx.scene.layout.BorderPane; import javafx.stage.Stage; -import main.java.backend.Author; import main.java.backend.Logic; -import main.java.backend.SourceFile; /** * MainApp is the entry point for JavaFX applications. @@ -78,22 +74,19 @@ private void addCommandBar(MainApp mainApp) { } private void addSummary(MainApp mainApp) { - rootLayout.setCenter(new SummaryController(mainApp, getSummaryData())); + rootLayout.setCenter(new SummaryController(mainApp, + logic.getSummaryData())); } - private void addFileStats(String authorName, - HashMap statistics) { - rootLayout.setCenter(new FileStatsController(authorName, statistics)); + private void addFileStats(String authorName) { + rootLayout.setCenter(new FileStatsController(authorName, + logic.getTargetAuthorStatistics())); } // ================================================================ // Methods which refer to Logic directly // ================================================================ - - public ObservableList getSummaryData() { - return logic.getSummaryData(); - } public void handleKeyPress(CommandBarController commandBarController, KeyCode key, @@ -113,7 +106,7 @@ private void handleEnterPress(CommandBarController commandBarController, case VIEW : String authorName = logic.getTargetAuthorName(); if (authorName != null) { - addFileStats(authorName, logic.getTargetAuthorStatistics()); + addFileStats(authorName); } break; case EXIT :