@@ -0,0 +1,3093 @@
+package seedu.address.ui;%0A%0Aimport java.util.List;%0A%0Aimport edu.emory.mathcs.backport.java.util.Arrays;%0Aimport javafx.collections.FXCollections;%0Aimport javafx.collections.ObservableList;%0Aimport javafx.fxml.FXML;%0Aimport javafx.scene.Node;%0Aimport javafx.scene.control.ListCell;%0Aimport javafx.scene.control.ListView;%0Aimport javafx.scene.control.SplitPane;%0Aimport javafx.scene.layout.AnchorPane;%0Aimport javafx.scene.layout.VBox;%0Aimport javafx.stage.Stage;%0A%0Apublic class NavbarPanel extends UiPart %7B%0A%09// private final Logger logger = LogsCenter.getLogger(TaskListPanel.class);%0A    private static final String FXML = %22NavbarPanel.fxml%22;%0A    private VBox panel;%0A    private AnchorPane placeHolderPane;%0A    %0A    private final String NAVBAR_TASKS = %22Tasks%22;%0A    private final String NAVBAR_DEADLINES = %22Deadlines%22;%0A    private final String NAVBAR_INCOMING_DEADLINES = %22Incoming Deadlines%22;%0A    private final String NAVBAR_FLOATING_TASKS = %22Floating Tasks%22;%0A    %0A    private final ObservableList%3CString%3E navbarElement = FXCollections.observableArrayList(NAVBAR_TASKS, NAVBAR_DEADLINES,%0A%09%09%09  %09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09 NAVBAR_INCOMING_DEADLINES, NAVBAR_FLOATING_TASKS);%0A    %0A    @FXML%0A    private ListView%3CString%3E navbarView;%0A%0A    public NavbarPanel() %7B%0A        super();%0A    %7D%0A%0A    @Override%0A    public void setNode(Node node) %7B%0A        panel = (VBox) node;%0A    %7D%0A%0A    @Override%0A    public String getFxmlPath() %7B%0A        return FXML;%0A    %7D%0A%0A    @Override%0A    public void setPlaceholder(AnchorPane pane) %7B%0A        this.placeHolderPane = pane;%0A    %7D%0A    %0A    public static NavbarPanel load(Stage primaryStage, AnchorPane navbarPlaceholder) %7B%0A    %09NavbarPanel navbarPanel = UiPartLoader.loadUiPart(primaryStage, navbarPlaceholder, new NavbarPanel());%0A    %09navbarPanel.configure();%0A    %09return navbarPanel;%0A    %7D%0A    %0A    private void configure() %7B%0A    %09setConnection();%0A    %09addToPlaceHolder();%0A    %7D%0A    %0A    private void addToPlaceHolder() %7B%0A    %09SplitPane.setResizableWithParent(placeHolderPane, false);%0A        placeHolderPane.getChildren().add(panel);%0A    %7D%0A    %0A    private void setConnection() %7B%0A    %09navbarView.setItems(navbarElement);%0A    %09navbarView.setCellFactory(listView -%3E new NavbarViewCell());%0A    %09setEventHandlerForSelectionChangeEvent();%0A    %7D%0A    %0A    private void setEventHandlerForSelectionChangeEvent() %7B%0A        navbarView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -%3E %7B%0A            if (newValue != null) %7B%0A//                logger.fine(%22Selection in task navbar changed to : '%22 + newValue + %22'%22);%0A//                raise(new TaskPanelSelectionChangedEvent(newValue));%0A            %7D%0A        %7D);%0A    %7D%0A    %0A    class NavbarViewCell extends ListCell%3CString%3E %7B%0A    %09%0A    %09public NavbarViewCell() %7B%0A    %09%7D%0A    %09%0A    %09@Override%0A        protected void updateItem(String li, boolean empty) %7B%0A            super.updateItem(li, empty);%0A%0A            if (empty %7C%7C li == null) %7B%0A                setGraphic(null);%0A                setText(null);%0A            %7D else %7B%0A                setGraphic(NavbarCard.load(li).getLayout());%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

create navbar panel element