Skip to content

Commit

Permalink
Merge pull request #131 from DingBao-sys/MainWindowDesignBranch
Browse files Browse the repository at this point in the history
Main window design branch
  • Loading branch information
DingBao-sys authored Mar 31, 2024
2 parents a1316cd + e181933 commit a7dc94b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void fillAttributesBox() {
public void setEmptyAttributeBox() {
CustomPlaceholder emptyAttributePlaceholder =
new CustomPlaceholder("No Attributes Found", 20);
emptyAttributePlaceholder.setImageSize(120, 120);
emptyAttributePlaceholder.setImageSize(100, 100);
personCardAttributes.getChildren().add(emptyAttributePlaceholder.getRoot());
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.layout.Region;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import seedu.address.model.person.Person;
import seedu.address.model.person.relationship.Relationship;
import seedu.address.ui.PersonList;
Expand All @@ -17,9 +17,9 @@ public class AnyListSection extends UiPart<Region> {
private PersonList personList;
private TreeMapFlowPane treeMapFlowPane;
@FXML
private StackPane personListPlaceHolder;
private VBox personListPlaceHolder;
@FXML
private StackPane treeMapPlaceHolder;
private VBox treeMapPlaceHolder;

/**
* Instantiates a anyListSection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javafx.scene.control.Tooltip;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.util.Duration;
import seedu.address.model.person.Person;
import seedu.address.model.person.relationship.Relationship;
Expand All @@ -21,9 +20,6 @@
*/
public class TreeMapFlowPane extends UiPart<Region> {
private static final String FXML = "person-list-section/TreeMapPane.fxml";

@FXML
private VBox treeMapPaneContainer;
@FXML
private ScrollPane treeMapPaneScrollPane;
@FXML
Expand Down Expand Up @@ -86,6 +82,7 @@ public void updateFlowPane(ObservableList<Person> persons, ObservableList<Relati
currentRelationship.getStyleDescriptor());
}
}
treeMapPaneScrollPane.setVvalue(0);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?import javafx.scene.image.ImageView?>

<fx:root type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
title="GENE-nie" minWidth="400" minHeight="850" onCloseRequest="#handleExit">
title="GENE-nie" minWidth="400" minHeight="900" onCloseRequest="#handleExit">
<icons>
<Image url="@/images/genie_32x32.png" />
</icons>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<stylesheets>
<URL value="@any-list-section.css" />
</stylesheets>
<StackPane fx:id="treeMapPlaceHolder" styleClass="anyListSection_treeMapContainer" VBox.vgrow="NEVER"/>
<StackPane VBox.vgrow="ALWAYS" fx:id="personListPlaceHolder" styleClass="anyListSection_personListPlaceHolder"/>
<VBox fx:id="treeMapPlaceHolder" styleClass="anyListSection_treeMapContainer" VBox.vgrow="ALWAYS" alignment="CENTER"/>
<VBox fx:id="personListPlaceHolder" styleClass="anyListSection_personListPlaceHolder" VBox.vgrow="SOMETIMES"/>
</VBox>

5 changes: 2 additions & 3 deletions src/main/resources/view/person-list-section/TreeMapPane.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.ScrollPane?>

<VBox fx:id="treeMapPaneContainer" alignment="CENTER" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1">
<ScrollPane xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" fitToWidth="true" fitToHeight="true" fx:id="treeMapPaneScrollPane" styleClass="treeMapPaneScrollPane">
<stylesheets>
<URL value="@tree-map.css" />
</stylesheets>
<ScrollPane fitToWidth="true" fitToHeight="true" fx:id="treeMapPaneScrollPane" styleClass="treeMapPaneScrollPane">
<FlowPane fx:id="treeMapPane" alignment="CENTER" hgap="8" vgap="8" styleClass="tree-map_flowpane">
</FlowPane>
</ScrollPane>
</VBox>

Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
.anyListSection_container {
}

.anyListSection_treeMapContainer {
-fx-background-radius: 5;
-fx-border-radius: 5;
-fx-min-height: 100;
-fx-max-height: 200;
-fx-padding: 0 0 25 0;
-fx-border-radius: 10;
-fx-min-height: 200;
-fx-pref-height: 350;
}

.anyListSection_personListPlaceHolder {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/view/person-list-section/tree-map.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

.treeMapPaneScrollPane {
-fx-background-color: transparent;
-fx-fit-to-width: true;
}

.treeMapPaneScrollPane .scroll-bar:vertical .increment-arrow,
Expand Down

0 comments on commit a7dc94b

Please sign in to comment.