forked from se-edu/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request se-edu#83 from jingchen-z/master
Changed UI layout
- Loading branch information
Showing
9 changed files
with
171 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package seedu.address.ui; | ||
|
||
import javafx.collections.ObservableList; | ||
|
||
import javafx.fxml.FXML; | ||
|
||
import javafx.scene.control.SplitPane; | ||
import javafx.scene.layout.AnchorPane; | ||
import javafx.scene.layout.Region; | ||
|
||
import seedu.address.model.task.Task; | ||
|
||
/** | ||
* Default page contains calendar, reminder and timeline. | ||
*/ | ||
public class DefaultPage extends UiPart<Region> { | ||
|
||
private static final String FXML = "DefaultPage.fxml"; | ||
|
||
@FXML | ||
private SplitPane overallPane; | ||
|
||
@FXML | ||
private AnchorPane calendarAnchorPane; | ||
|
||
@FXML | ||
private AnchorPane reminderAnchorPane; | ||
|
||
@FXML | ||
private AnchorPane timelineAnchorPane; | ||
|
||
@FXML | ||
private AnchorPane upperPartAnchorPane; | ||
|
||
public DefaultPage(ObservableList<Task> taskList) { | ||
super(FXML); | ||
upperPartAnchorPane.maxHeightProperty().bind(overallPane.heightProperty().multiply(0.5)); | ||
timelineAnchorPane.maxHeightProperty().bind(overallPane.heightProperty().multiply(0.5)); | ||
calendarAnchorPane.maxWidthProperty().bind(upperPartAnchorPane.widthProperty().multiply(0.5)); | ||
reminderAnchorPane.maxWidthProperty().bind(upperPartAnchorPane.widthProperty().multiply(0.5)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package seedu.address.ui.calendar; | ||
|
||
/** | ||
* The real implementation will be here. | ||
*/ | ||
public class Calendar { | ||
//TBC | ||
//In development. | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/seedu/address/ui/calendar/CalendarController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package seedu.address.ui.calendar; | ||
|
||
/** | ||
* Link between calendar and PaneNodes. | ||
*/ | ||
public class CalendarController { | ||
// Get the pane to put the calendar on | ||
//@FXML Pane calendarAnchorPane; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package seedu.address.ui.calendar; | ||
|
||
import java.time.LocalDate; | ||
|
||
import javafx.scene.Node; | ||
import javafx.scene.layout.AnchorPane; | ||
|
||
|
||
/** | ||
* This is each single date grid. | ||
*/ | ||
public class PaneNode extends AnchorPane { | ||
|
||
private LocalDate day; | ||
|
||
/** | ||
* Initialize. | ||
* @param children | ||
*/ | ||
public PaneNode(Node... children) { | ||
super(children); | ||
} | ||
|
||
/** | ||
* Get today. | ||
* @return | ||
*/ | ||
public LocalDate getDay() { | ||
return day; | ||
} | ||
|
||
public void setDay(LocalDate newDay) { this.day = newDay; } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<SplitPane fx:id="overallPane" dividerPositions="0.5" orientation="VERTICAL" prefHeight="424.0" prefWidth="860.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1"> | ||
<items> | ||
<AnchorPane fx:id="upperPartAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0"> | ||
<children> | ||
<SplitPane dividerPositions="0.5" prefHeight="224.0" prefWidth="682.0"> | ||
<items> | ||
<AnchorPane fx:id="calendarAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0" /> | ||
<AnchorPane fx:id="reminderAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="189.0" prefWidth="292.0" /> | ||
</items> | ||
</SplitPane> | ||
</children></AnchorPane> | ||
<AnchorPane fx:id="timelineAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0" /> | ||
</items> | ||
</SplitPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters