Skip to content

Commit

Permalink
set up daily panel for mainWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiwen905 committed Nov 2, 2016
1 parent 9a5add9 commit 8ee671b
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 86 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/savvytasker/logic/Logic.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface Logic {
ObservableList<ReadOnlyTask> getFilteredFloatingTasks();

/** Returns the list of tasks on a specific day */
ObservableList<ReadOnlyTask> getFilteredDailyTasks(Date date);
ObservableList<ReadOnlyTask> getFilteredDailyTasks(int i, Date date);

/** Returns the list of tasks that occur after the selected week */
ObservableList<ReadOnlyTask> getFilteredUpcomingTasks(Date date);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/savvytasker/logic/LogicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public ObservableList<ReadOnlyTask> getFilteredFloatingTasks() {
}

@Override
public ObservableList<ReadOnlyTask> getFilteredDailyTasks(Date date) {
return model.getFilteredDailyTasks(date);
public ObservableList<ReadOnlyTask> getFilteredDailyTasks(int i, Date date) {
return model.getFilteredDailyTasks(i, date);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/savvytasker/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public interface Model {

/** Returns the filtered task list of daily task as an {@code UnmodifiableObservableList<ReadOnlyTask>}
* as of expected date */
UnmodifiableObservableList<ReadOnlyTask> getFilteredDailyTasks(Date date);
UnmodifiableObservableList<ReadOnlyTask> getFilteredDailyTasks(int dayOfWeek, Date date);

/** Returns the filtered task list of upcoming task as an {@code UnmodifiableObservableList<ReadOnlyTask>}
* as of expected date */
Expand All @@ -102,7 +102,7 @@ public interface Model {
void updateFilteredListToShowFloating();

/** Updates the filter of the filtered task list to show all tasks of the selected week*/
void updateFilteredListToShowDaily();
void updateFilteredListToShowDaily(int i);

/** Updates the filter of the filtered task list to show all upcoming tasks after the selected week*/
void updateFilteredListToShowUpcoming();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/seedu/savvytasker/ui/MainWindow.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package seedu.savvytasker.ui;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;

import javafx.fxml.FXML;
Expand Down
111 changes: 65 additions & 46 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
Expand Down Expand Up @@ -39,12 +37,11 @@
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0" />
</padding>
</AnchorPane>
<AnchorPane fx:id="resultDisplayPlaceholder" maxHeight="100" minHeight="100" prefHeight="100" styleClass="anchor-pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0" />
</padding>
</AnchorPane>
<SplitPane id="splitPane" fx:id="splitPane" dividerPositions="0.5" VBox.vgrow="ALWAYS">
<AnchorPane fx:id="resultDisplayPlaceholder" maxHeight="40.0" minHeight="40.0" prefHeight="40.0" styleClass="anchor-pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding></AnchorPane>
<SplitPane id="splitPane" fx:id="splitPane" dividerPositions="0.2" VBox.vgrow="ALWAYS">
<items>
<VBox fx:id="personList" minWidth="340" prefWidth="340">
<padding>
Expand All @@ -54,7 +51,7 @@
<AnchorPane fx:id="personListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</children>
</VBox>
<GridPane hgap="15.0" styleClass="anchor-pane-with-border" vgap="15.0">
<GridPane hgap="10.0" styleClass="anchor-pane-with-border" vgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
Expand All @@ -67,54 +64,76 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<padding>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
<Insets bottom="8.0" left="8.0" right="8.0" top="15.0" />
</padding>
<children>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="0.0" prefWidth="288.0" styleClass="floating-scrollpane" GridPane.rowSpan="2">
<padding>
<Insets bottom="10.0" left="10.0" right="15.0" top="10.0" />
</padding>
<content>
<VBox fx:id="floatingList" prefHeight="200.0" prefWidth="100.0" styleClass="floating-panel">
<VBox fx:id="floatingList" prefHeight="200.0" prefWidth="100.0" styleClass="floating-panel" GridPane.rowSpan="2">
<children>
<AnchorPane fx:id="floatingPanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
<GridPane hgap="10.0" prefHeight="570.0" vgap="10.0" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowSpan="3">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<VBox fx:id="vboxOne" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel">
<children>
<AnchorPane fx:id="day1PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
<VBox fx:id="vboxThree" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel" GridPane.rowIndex="1">
<children>
<AnchorPane fx:id="day2PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
<opaqueInsets>
<Insets />
</opaqueInsets>
</VBox>
<VBox fx:id="vboxFive" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel" GridPane.rowIndex="2">
<children>
<AnchorPane fx:id="day3PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
<VBox fx:id="vboxTwo" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel" GridPane.columnIndex="1">
<children>
<AnchorPane fx:id="day4PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
<VBox fx:id="vboxFour" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children>
<AnchorPane fx:id="floatingPanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
<AnchorPane fx:id="day5PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
</content>
<effect>
<DropShadow blurType="GAUSSIAN" color="#0000003f" />
</effect>
</ScrollPane>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="200.0" prefWidth="200.0" styleClass="overdue-scrollpane" GridPane.rowIndex="2">
<effect>
<DropShadow blurType="GAUSSIAN" color="#0000003f" />
</effect>
<content>
<VBox fx:id="overdueList" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="overdue-panel">
<VBox fx:id="vboxSix" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel" GridPane.columnIndex="1" GridPane.rowIndex="2">
<children>
<AnchorPane fx:id="overduePanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
<AnchorPane fx:id="day6PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
</content>
<padding>
<Insets bottom="10.0" left="10.0" right="15.0" top="10.0" />
</padding>
</ScrollPane>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="0.0" prefWidth="287.0" styleClass="upcoming-scrollpane" GridPane.columnIndex="3" GridPane.rowIndex="1" GridPane.rowSpan="2">
<padding>
<Insets bottom="10.0" left="10.0" right="15.0" top="10.0" />
</padding>
<content>
<VBox fx:id="vboxComing" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="upcoming-panel">
<VBox fx:id="vboxSeven" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="daily-panel" GridPane.columnIndex="2">
<children>
<AnchorPane fx:id="upcomingPanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
<AnchorPane fx:id="day7PanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
</content>
<effect>
<DropShadow blurType="GAUSSIAN" color="#0000003f" />
</effect>
</ScrollPane>
</children>
</GridPane>
<VBox fx:id="overdueList" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="overdue-panel" GridPane.rowIndex="2">
<children>
<AnchorPane fx:id="overduePanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
<VBox fx:id="vboxComing" prefHeight="200.0" prefWidth="100.0" spacing="8.0" styleClass="upcoming-panel" GridPane.columnIndex="3" GridPane.rowIndex="1" GridPane.rowSpan="2">
<children>
<AnchorPane fx:id="upcomingPanelPlaceholder" prefHeight="359.0" prefWidth="257.0" />
</children>
</VBox>
</children>
</GridPane>
</items>
Expand Down
64 changes: 29 additions & 35 deletions src/main/resources/view/TaskListCard.fxml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.net.URL?>
<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1">
<children>
<GridPane HBox.hgrow="ALWAYS" >
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="150.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<children>
<VBox alignment="CENTER_LEFT" maxHeight="250.0" minHeight="105.0" prefHeight="175.0" GridPane.columnIndex="0">
<stylesheets>
<URL value="@DarkTheme.css" />
<URL value="@Extensions.css" />
</stylesheets>
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
</padding>
<VBox alignment="CENTER_LEFT">
<stylesheets>
<URL value="@DarkTheme.css" />
<URL value="@Extensions.css" />
</stylesheets>
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
</padding>

<children>
<HBox spacing="5" alignment="CENTER_LEFT">
<children>
<HBox>
<Label fx:id="id" styleClass="cell_big_label"></Label>
<HBox>
<Label fx:id="taskName" text="\$first" styleClass="cell_big_label"/>
</HBox>
</HBox>
<!--<Label fx:id="tags" styleClass="cell_small_label" text="\$tags" /> -->
</children>
</HBox>
<Label fx:id="details" styleClass="cell_small_label" text="\$phone" />
</children>
</VBox>
</children>
</GridPane>
<children>
<HBox alignment="CENTER_LEFT" spacing="5">
<children>
<HBox>
<Label fx:id="id" styleClass="cell_big_label" />
<Label fx:id="taskName" styleClass="cell_big_label" text="\$first" />
</HBox>
<!--<Label fx:id="tags" styleClass="cell_small_label" text="\$tags" /> -->
</children>
</HBox>
<Label fx:id="startDate" alignment="CENTER_RIGHT" contentDisplay="RIGHT" styleClass="cell_small_label" text="\$phone" textAlignment="RIGHT" />
<Label fx:id="endDate" alignment="CENTER_RIGHT" contentDisplay="RIGHT" styleClass="cell_small_label" text="\$address" textAlignment="RIGHT" />
<Label fx:id="description" styleClass="cell_small_label" text="\$email" />
</children>
</VBox>
</children>
</HBox>

0 comments on commit 8ee671b

Please sign in to comment.