Compare commits
1 Commits
366e85a17c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b1e741d95f |
@@ -26,12 +26,12 @@ public class TestMainFxView {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void initialize() {
|
private void initialize() {
|
||||||
|
|
||||||
rows.add(new Address("10 wilco ave", "wilco", "WY", "82801"));
|
rows.add(new Address("10 wilco ave", "wilco", "WY", "82801"));
|
||||||
rows.add(new Address("30 Amstadam ave", "New York", "NY", "12010"));
|
rows.add(new Address("30 Amstadam ave", "New York", "NY", "12010"));
|
||||||
rows.add(new Address("400 hotel ave", "Maryland City", "MD", "20723"));
|
rows.add(new Address("400 hotel ave", "Maryland City", "MD", "20723"));
|
||||||
rows.add(new Address("160 Canal Road", "South Bethany", "Delaware", "19930"));
|
rows.add(new Address("160 Canal Road", "South Bethany", "Delaware", "19930"));
|
||||||
|
|
||||||
TableColumn<Address, String> tcStreet = new TableColumn<>("Street");
|
TableColumn<Address, String> tcStreet = new TableColumn<>("Street");
|
||||||
TableColumn<Address, String> tcCity = new TableColumn<>("City");
|
TableColumn<Address, String> tcCity = new TableColumn<>("City");
|
||||||
TableColumn<Address, String> tcState = new TableColumn<>("State");
|
TableColumn<Address, String> tcState = new TableColumn<>("State");
|
||||||
@@ -39,14 +39,13 @@ public class TestMainFxView {
|
|||||||
|
|
||||||
List<TableColumn<Address, String>> columns = new ArrayList<>();
|
List<TableColumn<Address, String>> columns = new ArrayList<>();
|
||||||
|
|
||||||
|
tcStreet.setPrefWidth(100.0d);
|
||||||
tcStreet.setPrefWidth( 100.0d );
|
|
||||||
tcStreet.setMinWidth(100.0d);
|
tcStreet.setMinWidth(100.0d);
|
||||||
tcCity.setPrefWidth( 100.0d );
|
tcCity.setPrefWidth(100.0d);
|
||||||
tcState.setPrefWidth( 100.0d );
|
tcState.setPrefWidth(100.0d);
|
||||||
tcZip.setPrefWidth( 100.0d );
|
tcZip.setPrefWidth(100.0d);
|
||||||
|
|
||||||
tcStreet.setCellValueFactory(new PropertyValueFactory<Address, String>("street"));
|
tcStreet.setCellValueFactory(new PropertyValueFactory<Address, String>("street"));
|
||||||
tcCity.setCellValueFactory(new PropertyValueFactory<Address, String>("city"));
|
tcCity.setCellValueFactory(new PropertyValueFactory<Address, String>("city"));
|
||||||
tcState.setCellValueFactory(new PropertyValueFactory<Address, String>("state"));
|
tcState.setCellValueFactory(new PropertyValueFactory<Address, String>("state"));
|
||||||
tcZip.setCellValueFactory(new PropertyValueFactory<Address, String>("zip"));
|
tcZip.setCellValueFactory(new PropertyValueFactory<Address, String>("zip"));
|
||||||
@@ -59,13 +58,13 @@ public class TestMainFxView {
|
|||||||
columns.add(tcZip);
|
columns.add(tcZip);
|
||||||
|
|
||||||
tvInventory.getColumns().addAll(columns);
|
tvInventory.getColumns().addAll(columns);
|
||||||
tvInventory.itemsProperty().bind( new SimpleObjectProperty<>(rows) );
|
tvInventory.itemsProperty().bind(new SimpleObjectProperty<>(rows));
|
||||||
|
|
||||||
btnAdd.setOnAction((ev) -> {
|
btnAdd.setOnAction((ev) -> {
|
||||||
|
|
||||||
TestMainFxCommandDialog accomodationDialog = new TestMainFxCommandDialog();
|
TestMainFxCommandDialog accomodationDialog = new TestMainFxCommandDialog();
|
||||||
|
|
||||||
Optional result = accomodationDialog.showAndWait();
|
Optional<Address> result = accomodationDialog.showAndWait();
|
||||||
|
|
||||||
if (result.isPresent()) {
|
if (result.isPresent()) {
|
||||||
System.out.println("result is present.");
|
System.out.println("result is present.");
|
||||||
|
|||||||
@@ -1 +1,41 @@
|
|||||||
{ "Account":{"account_number": "A07421233","phone_number": "301-356-3890","mailing_address": { "Address":{"street": "30 Amstadam ave","city": "New York","state": "NY","zip": "12010"}},"email_address": { "EmailAddress":{"email": "newbee952@aol.com"}},"reservations":[{"HotelReservation":{"reservation_number":"R0123087344"}},{"CabinReservation":{"reservation_number":"R2042828431"}},{"CabinReservation":{"reservation_number":"R0535276622"}},{"HouseReservation":{"reservation_number":"R0499811708"}}]}}
|
{
|
||||||
|
"Account": {
|
||||||
|
"account_number": "A07421233",
|
||||||
|
"phone_number": "301-356-3890",
|
||||||
|
"mailing_address": {
|
||||||
|
"Address": {
|
||||||
|
"street": "30 Amstadam ave",
|
||||||
|
"city": "New York",
|
||||||
|
"state": "NY",
|
||||||
|
"zip": "12010"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email_address": {
|
||||||
|
"EmailAddress": {
|
||||||
|
"email": "newbee952@aol.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"reservations": [
|
||||||
|
{
|
||||||
|
"HotelReservation": {
|
||||||
|
"reservation_number": "R0123087344"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"CabinReservation": {
|
||||||
|
"reservation_number": "R2042828431"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"CabinReservation": {
|
||||||
|
"reservation_number": "R0535276622"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"HouseReservation": {
|
||||||
|
"reservation_number": "R0499811708"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="364.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/24.0.1">
|
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="364.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/25.0.1">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="294.0" minWidth="-Infinity" prefWidth="168.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="294.0" minWidth="-Infinity" prefWidth="168.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="477.0" minWidth="10.0" prefWidth="432.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="477.0" minWidth="10.0" prefWidth="432.0" />
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<?import javafx.scene.paint.Color?>
|
<?import javafx.scene.paint.Color?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/24.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="lodge.TestMainFxView">
|
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/25.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="lodge.TestMainFxView">
|
||||||
<children>
|
<children>
|
||||||
<SplitPane dividerPositions="0.31469933184855237" focusTraversable="true" prefHeight="-1.0" prefWidth="-1.0" VBox.vgrow="ALWAYS">
|
<SplitPane dividerPositions="0.31469933184855237" focusTraversable="true" prefHeight="-1.0" prefWidth="-1.0" VBox.vgrow="ALWAYS">
|
||||||
<items>
|
<items>
|
||||||
|
|||||||
Reference in New Issue
Block a user