package seedu.todo.ui;

import com.google.common.eventbus.Subscribe;
import javafx.application.Platform;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import seedu.todo.MainApp;
import seedu.todo.commons.core.ComponentManager;
import seedu.todo.commons.core.Config;
import seedu.todo.commons.core.LogsCenter;
import seedu.todo.commons.events.storage.DataSavingExceptionEvent;
import seedu.todo.commons.events.ui.JumpToListRequestEvent;
import seedu.todo.commons.events.ui.ShowHelpRequestEvent;
import seedu.todo.commons.util.StringUtil;
import seedu.todo.logic.Logic;

import java.util.logging.Logger;

/**
 * The manager of the UI component.
 */
public class UiManager extends ComponentManager implements Ui {
    private static final Logger logger = LogsCenter.getLogger(UiManager.class);
    private static final String ICON_APPLICATION = "/images/address_book_32.png";

    private Logic logic;
    private Config config;
    private MainWindow mainWindow;

    public UiManager(Logic logic, Config config) {
        super();
        this.logic = logic;
        this.config = config;
    }

    @Override
    public void start(Stage primaryStage) {
        logger.info("Starting UI...");
        primaryStage.setTitle(config.getAppTitle());
    }

    @Override
    public void stop() {
        mainWindow.hide();
        mainWindow.releaseResources();
    }

}

@@ -28,637 +28,195 @@
 ort 
-com.google.common.eventbus.Subscribe;%0Aimport javafx.application.Platform;%0Aimport javafx.scene.control.Alert;%0Aimport javafx.scene.control.Alert.AlertType;%0Aimport javafx.scene.image.Image;%0Aimport javafx.stage.Stage;%0Aimport seedu.todo.MainApp;%0Aimport seedu.todo.commons.core.ComponentManager;%0Aimport seedu.todo.commons.core.Config;%0Aimport seedu.todo.commons.core.LogsCenter;%0Aimport seedu.todo.commons.events.storage.DataSavingExceptionEvent;%0Aimport seedu.todo.commons.events.ui.JumpToListRequestEvent;%0Aimport seedu.todo.commons.events.ui.ShowHelpRequestEvent;%0Aimport seedu.todo.commons.util.StringUtil;%0Aimport seedu.todo.logic.Logic
+javafx.stage.Stage;%0Aimport seedu.todo.commons.core.ComponentManager;%0Aimport seedu.todo.commons.core.Config;%0Aimport seedu.todo.commons.core.LogsCenter;%0Aimport seedu.todo.ui.utils.ImageUtil
 ;%0A%0Ai
@@ -523,33 +523,8 @@
 %22;%0A%0A
-    private Logic logic;%0A
     
@@ -607,21 +607,8 @@
 ger(
-Logic logic, 
 Conf
@@ -641,36 +641,8 @@
 ();%0A
-        this.logic = logic;%0A
     
@@ -823,16 +823,129 @@
 itle());
+%0A%0A        // Set the application icon.%0A        primaryStage.getIcons().add(ImageUtil.getImage(ICON_APPLICATION));
 %0A    %7D%0A%0A

Change UiManager method signature