Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5A1][T1]Wong Kai Min Herman #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {
}

void fillInnerParts() {
browserPanel = new BrowserPanel();
browserPlaceholder.getChildren().add(browserPanel.getRoot());

personListPanel = new PersonListPanel(logic.getFilteredPersonList());
personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package seedu.address.ui;

import javafx.fxml.FXML;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
Expand Down Expand Up @@ -33,7 +34,9 @@ public class PersonCard extends UiPart<Region> {
private Label email;
@FXML
private FlowPane tags;

@FXML
CheckBox checkbox1;

public PersonCard(ReadOnlyPerson person, int displayedIndex) {
super(FXML);
name.setText(person.getName().fullName);
Expand Down
88 changes: 49 additions & 39 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.net.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Menu?>
Expand All @@ -14,43 +19,48 @@
<URL value="@DarkTheme.css" />
<URL value="@Extensions.css" />
</stylesheets>

<MenuBar VBox.vgrow="NEVER">
<Menu mnemonicParsing="false" text="File">
<MenuItem mnemonicParsing="false" onAction="#handleExit" text="Exit" />
</Menu>
<Menu mnemonicParsing="false" text="Help">
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</Menu>
</MenuBar>

<StackPane VBox.vgrow="NEVER" fx:id="commandBoxPlaceholder" styleClass="pane-with-border">
<padding>
<Insets top="5" right="10" bottom="5" left="10" />
</padding>
</StackPane>

<StackPane VBox.vgrow="NEVER" fx:id="resultDisplayPlaceholder" styleClass="pane-with-border"
minHeight="100" prefHeight="100" maxHeight="100">
<padding>
<Insets top="5" right="10" bottom="5" left="10" />
</padding>
</StackPane>

<SplitPane id="splitPane" fx:id="splitPane" dividerPositions="0.4" VBox.vgrow="ALWAYS">
<VBox fx:id="personList" minWidth="340" prefWidth="340" SplitPane.resizableWithParent="false">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="personListPanelPlaceholder" VBox.vgrow="ALWAYS"/>
</VBox>

<StackPane fx:id="browserPlaceholder" prefWidth="340" >
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
</StackPane>
</SplitPane>

<StackPane fx:id="statusbarPlaceholder" VBox.vgrow="NEVER" />
<children>

<MenuBar VBox.vgrow="NEVER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#handleExit" text="Exit" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</items>
</Menu>
</menus>
</MenuBar>

<SplitPane id="splitPane" fx:id="splitPane" VBox.vgrow="ALWAYS">
<items>
<VBox fx:id="personList" minWidth="340" prefWidth="340" SplitPane.resizableWithParent="false">
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<children>
<StackPane fx:id="personListPanelPlaceholder" VBox.vgrow="ALWAYS" />
</children>
</VBox>
</items>
</SplitPane>

<StackPane fx:id="resultDisplayPlaceholder" maxHeight="100" minHeight="100.0" prefHeight="100.0" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>

<StackPane fx:id="commandBoxPlaceholder" styleClass="pane-with-border" VBox.vgrow="NEVER">
<padding>
<Insets bottom="5" left="10" right="10" top="5" />
</padding>
</StackPane>

<StackPane fx:id="statusbarPlaceholder" VBox.vgrow="NEVER" />
</children>
</VBox>
68 changes: 45 additions & 23 deletions src/main/resources/view/PersonListCard.fxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.ColumnConstraints?>
Expand All @@ -8,29 +12,47 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.CheckBox?>

<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
</columnConstraints>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="15" />
</padding>
<HBox spacing="5" alignment="CENTER_LEFT">
<Label fx:id="id" styleClass="cell_big_label">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
<Label fx:id="name" text="\$first" styleClass="cell_big_label" />
</HBox>
<FlowPane fx:id="tags" />
<Label fx:id="phone" styleClass="cell_small_label" text="\$phone" />
<Label fx:id="address" styleClass="cell_small_label" text="\$address" />
<Label fx:id="email" styleClass="cell_small_label" text="\$email" />
</VBox>
</GridPane>
<children>
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
</columnConstraints>
<children>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
</padding>
<children>
<HBox alignment="CENTER_LEFT" spacing="5">
<children>
<Label fx:id="id" styleClass="cell_big_label">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
<Label fx:id="name" styleClass="cell_big_label" text="\$first" />
</children>
</HBox>
<FlowPane fx:id="tags" />
<Label fx:id="phone" styleClass="cell_small_label" text="\$phone" />
<Label fx:id="address" styleClass="cell_small_label" text="\$address" />
<Label fx:id="email" styleClass="cell_small_label" text="\$email" />
</children>

</VBox>
</children>
<rowConstraints>
<RowConstraints />
</rowConstraints>
</GridPane>
<AnchorPane prefHeight="60.0" prefWidth="54.0">
<children>
<CheckBox fx:id="checkbox1" layoutX="15.0" layoutY="35.0" />
</children>
</AnchorPane>
</children>
</HBox>