updates
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -14,7 +14,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "lodge.TestMainFx",
|
"mainClass": "lodge.TestMainFx",
|
||||||
"projectName": "reservationsystem",
|
"projectName": "reservationsystem",
|
||||||
"vmArgs": " --module-path ./libs:. --add-modules ALL-MODULE-PATH --enable-native-access=javafx.graphics -Dcom.sun.management.jmxremote=false -Djava.awt.headless=true -XX:+DisableAttachMechanism",
|
"vmArgs": " --module-path ./libs:. --add-modules ALL-MODULE-PATH --enable-native-access=javafx.web,javafx.controls,javafx.graphics -Dcom.sun.management.jmxremote=false -Djava.awt.headless=true -XX:+DisableAttachMechanism",
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"console": "integratedTerminal"
|
"console": "integratedTerminal"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ sourceSets {
|
|||||||
java {
|
java {
|
||||||
srcDirs = ['src/main/java']
|
srcDirs = ['src/main/java']
|
||||||
}
|
}
|
||||||
|
resources {
|
||||||
|
srcDirs = ['src/resources/media']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
test {
|
test {
|
||||||
java {
|
java {
|
||||||
|
|||||||
BIN
libs/javafx-media-24.0.1-linux.jar
Normal file
BIN
libs/javafx-media-24.0.1-linux.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
libs/javafx-media-24.0.1.jar
Normal file
BIN
libs/javafx-media-24.0.1.jar
Normal file
Binary file not shown.
@@ -1,34 +1,27 @@
|
|||||||
package lodge;
|
package lodge;
|
||||||
|
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.scene.layout.StackPane;
|
|
||||||
import javafx.scene.paint.Color;
|
|
||||||
import javafx.scene.shape.Ellipse;
|
|
||||||
import javafx.scene.text.Font;
|
|
||||||
import javafx.scene.text.Text;
|
|
||||||
|
|
||||||
public class TestMainFx extends Application {
|
public class TestMainFx extends Application {
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) {
|
public void start(Stage primaryStage) {
|
||||||
|
try {
|
||||||
primaryStage.setTitle("Lodge ReservationSystem");
|
primaryStage.setTitle("Lodge ReservationSystem");
|
||||||
// Create an Ellipse and set fill color
|
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("main.fxml"));
|
||||||
Ellipse ellipse = new Ellipse(110, 70);
|
Scene scene = new Scene(root, 800, 600);
|
||||||
ellipse.setFill(Color.LIGHTBLUE);
|
|
||||||
// Create a Text shape with font and size
|
|
||||||
Text text = new Text("My Shapes");
|
|
||||||
text.setFont(new Font("Arial Bold", 24));
|
|
||||||
StackPane stackPane = new StackPane();
|
|
||||||
stackPane.getChildren().addAll(ellipse, text);
|
|
||||||
Scene scene = new Scene(stackPane,800, 600, Color.LIGHTYELLOW);
|
|
||||||
primaryStage.setScene(scene);
|
primaryStage.setScene(scene);
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
116
src/resources/media/main.fxml
Normal file
116
src/resources/media/main.fxml
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2015, 2019, Gluon and/or its affiliates.
|
||||||
|
All rights reserved. Use is subject to license terms.
|
||||||
|
|
||||||
|
This file is available and licensed under the following license:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
- Neither the name of Oracle Corporation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<?import javafx.geometry.Insets?>
|
||||||
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.ButtonBar?>
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.ListView?>
|
||||||
|
<?import javafx.scene.control.SplitPane?>
|
||||||
|
<?import javafx.scene.control.TextField?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
<?import javafx.scene.layout.HBox?>
|
||||||
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
<?import javafx.scene.paint.Color?>
|
||||||
|
<?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">
|
||||||
|
<children>
|
||||||
|
<SplitPane dividerPositions="0.11469933184855234" focusTraversable="true" prefHeight="-1.0" prefWidth="-1.0" VBox.vgrow="ALWAYS">
|
||||||
|
<items>
|
||||||
|
<AnchorPane maxWidth="100.0" prefHeight="549.0" prefWidth="100.0">
|
||||||
|
<children>
|
||||||
|
<Label alignment="CENTER" layoutX="14.0" layoutY="14.0" minWidth="60.0" prefWidth="-1.0" style=" " text="Master" textAlignment="CENTER" wrapText="false">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" fx:id="x1" />
|
||||||
|
</font>
|
||||||
|
<textFill>
|
||||||
|
<Color red="0.624" green="0.624" blue="0.624" fx:id="x2" />
|
||||||
|
</textFill>
|
||||||
|
</Label>
|
||||||
|
<SplitPane dividerPositions="0.2979094076655052, 0.6480836236933798" layoutY="88.0" orientation="VERTICAL" prefHeight="576.0" prefWidth="140.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<items>
|
||||||
|
<AnchorPane prefHeight="291.0" prefWidth="98.0">
|
||||||
|
<children>
|
||||||
|
<ButtonBar layoutY="71.0" prefHeight="40.0" prefWidth="129.0">
|
||||||
|
<buttons>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="30.0" text="Add" />
|
||||||
|
</buttons>
|
||||||
|
</ButtonBar>
|
||||||
|
</children></AnchorPane>
|
||||||
|
<AnchorPane prefHeight="78.0" prefWidth="98.0" />
|
||||||
|
<AnchorPane prefHeight="223.0" prefWidth="98.0" />
|
||||||
|
</items>
|
||||||
|
</SplitPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
<AnchorPane prefHeight="459.0" prefWidth="574.0">
|
||||||
|
<children>
|
||||||
|
<Label alignment="CENTER" font="$x1" layoutX="14.0" layoutY="14.0" style=" " text="Details" textAlignment="CENTER" textFill="$x2" wrapText="false" />
|
||||||
|
<VBox layoutX="34.0" layoutY="54.0" prefHeight="576.0" prefWidth="761.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<children>
|
||||||
|
<HBox prefHeight="36.0" prefWidth="483.0">
|
||||||
|
<children>
|
||||||
|
<Label prefHeight="30.0" prefWidth="66.0" text="Label" />
|
||||||
|
<Label prefHeight="28.0" prefWidth="115.0" />
|
||||||
|
<TextField prefHeight="31.0" prefWidth="314.0" promptText="search" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<ListView prefHeight="536.0" prefWidth="761.0" />
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
</items>
|
||||||
|
</SplitPane>
|
||||||
|
<HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER">
|
||||||
|
<children>
|
||||||
|
<Label maxHeight="1.7976931348623157E308" maxWidth="-1.0" text="Left status" HBox.hgrow="ALWAYS">
|
||||||
|
<font>
|
||||||
|
<Font size="11.0" fx:id="x3" />
|
||||||
|
</font>
|
||||||
|
<textFill>
|
||||||
|
<Color red="0.625" green="0.625" blue="0.625" fx:id="x4" />
|
||||||
|
</textFill>
|
||||||
|
</Label>
|
||||||
|
<Pane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS" />
|
||||||
|
<Label font="$x3" maxWidth="-1.0" text="Right status" textFill="$x4" HBox.hgrow="NEVER" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
Reference in New Issue
Block a user