Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103T-T15-1#105 from officialchengyud/b…
Browse files Browse the repository at this point in the history
…ranch-ui

Add region between appointment cards in JavaFx
  • Loading branch information
alfaloo authored Mar 31, 2024
2 parents cf0b289 + 9a4b8e1 commit d5da79e
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 73 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ shadowJar {
archiveFileName = 'addressbook.jar'
}

run {
enableAssertions = true
}

defaultTasks 'clean', 'test'
151 changes: 78 additions & 73 deletions src/main/resources/view/AppointmentListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,84 +11,89 @@

<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.Image?>
<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
</columnConstraints>
<HBox spacing="5" alignment="CENTER_LEFT">
<padding>
<Insets top="5" right="5" bottom="5" left="15" />
</padding>
<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>
</HBox>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="35" />
</padding>
<HBox>
<VBox>
<VBox xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
</columnConstraints>
<HBox spacing="5" alignment="CENTER_LEFT">
<padding>
<Insets top="5" right="5" bottom="5" left="15" />
</padding>
<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>
</HBox>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="35" />
</padding>
<HBox>
<padding>
<Insets bottom="5"/>
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/doctorIcon.png" />
</ImageView>
<HBox>
<padding>
<Insets left="5"/>
</padding>
<Label fx:id="doctorNric" styleClass="cell_big_label" text="Doctor: \$doctorNric" />
</HBox>
</HBox>
<VBox>
<HBox>
<padding>
<Insets bottom="5"/>
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/doctorIcon.png" />
</ImageView>
<HBox>
<padding>
<Insets left="5"/>
</padding>
<Label fx:id="doctorNric" styleClass="cell_big_label" text="Doctor: \$doctorNric" />
</HBox>
</HBox>

<HBox>
<padding>
<Insets top="5"/>
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/patientIcon.png" />
</ImageView>
<HBox>
<padding>
<Insets left="5"/>
</padding>
<Label fx:id="patientNric" styleClass="cell_big_label" text="Patient \$patientNric" />
</HBox>
</HBox>
</VBox>
<HBox>
<padding>
<Insets top="5"/>
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/patientIcon.png" />
</ImageView>
<HBox>
<padding>
<Insets left="5"/>
</padding>
<Label fx:id="patientNric" styleClass="cell_big_label" text="Patient \$patientNric" />
</HBox>
</HBox>
</VBox>

<HBox alignment="CENTER">
<padding>
<Insets right="5" left="55" />
</padding>
<VBox>
<HBox>
<HBox alignment="CENTER">
<padding>
<Insets top="5" right="5" bottom="5" left="35" />
<Insets right="5" left="55" />
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/calendar.png" />
</ImageView>
</HBox>
<VBox>
<HBox>
<padding>
<Insets top="5" right="5" bottom="5" left="35" />
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/calendar.png" />
</ImageView>
</HBox>

<HBox>
<padding>
<Insets left="5" top="5" />
</padding>
<Label fx:id="appointmentDate" styleClass="cell_big_label" text="\$appointmentDate" />
<HBox>
<padding>
<Insets left="5" top="5" />
</padding>
<Label fx:id="appointmentDate" styleClass="cell_big_label" text="\$appointmentDate" />
</HBox>
</VBox>
<!-- <Label fx:id="appointmentId" text="\$appointmentId" styleClass="cell_small_label" />-->
</HBox>
</VBox>
<!-- <Label fx:id="appointmentId" text="\$appointmentId" styleClass="cell_small_label" />-->
</HBox>
</HBox>
</HBox>

</VBox>
</GridPane>
</HBox>
</VBox>
</GridPane>
</HBox>
<Region maxHeight="-Infinity" minHeight="-Infinity" prefHeight="10.0" prefWidth="200.0" />
</children>
</VBox>

0 comments on commit d5da79e

Please sign in to comment.