-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
224 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package controller; | ||
|
||
public class HomeFormController { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,86 @@ | ||
package controller; | ||
|
||
import javafx.animation.KeyFrame; | ||
import javafx.animation.Timeline; | ||
import javafx.event.ActionEvent; | ||
import javafx.event.EventHandler; | ||
import javafx.fxml.FXMLLoader; | ||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.layout.AnchorPane; | ||
import javafx.scene.shape.Rectangle; | ||
import javafx.stage.Stage; | ||
import javafx.util.Duration; | ||
import util.Navigation; | ||
|
||
import java.io.IOException; | ||
|
||
public class SplashScreenFormController { | ||
public Label lblStatus; | ||
public Rectangle pgbContainer; | ||
public Rectangle pgbLoad; | ||
|
||
public void initialize() { | ||
Timeline timeline = new Timeline(); | ||
KeyFrame frameOne = new KeyFrame(Duration.millis(0), new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent actionEvent) { | ||
lblStatus.setText("Welcome to National Fuel Pass App...!"); | ||
pgbLoad.setWidth(pgbLoad.getWidth()); | ||
} | ||
}); | ||
KeyFrame frameTwo = new KeyFrame(Duration.millis(1000), new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent actionEvent) { | ||
lblStatus.setText("Connecting with the database...!"); | ||
pgbLoad.setWidth(pgbLoad.getWidth() + 70); | ||
} | ||
}); | ||
KeyFrame frameThree = new KeyFrame(Duration.millis(1750), new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent actionEvent) { | ||
lblStatus.setText("Loading data...!"); | ||
pgbLoad.setWidth(pgbLoad.getWidth() + 130); | ||
} | ||
}); | ||
KeyFrame frameFour = new KeyFrame(Duration.millis(2500), new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent actionEvent) { | ||
lblStatus.setText("Setting up the UI...!"); | ||
pgbLoad.setWidth(pgbLoad.getWidth() + 250); | ||
} | ||
}); | ||
KeyFrame frameFive = new KeyFrame(Duration.millis(3000), new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent actionEvent) { | ||
lblStatus.setText("Setting up the UI...!"); | ||
pgbLoad.setWidth(pgbContainer.getWidth()); | ||
} | ||
}); | ||
KeyFrame frameSix = new KeyFrame(Duration.millis(3500), new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent actionEvent) { | ||
try { | ||
pgbLoad.setWidth(pgbContainer.getWidth()); | ||
Parent homeFormContainer = FXMLLoader.load(this.getClass().getResource("/view/HomeForm.fxml")); | ||
Scene scene = new Scene(homeFormContainer); | ||
AnchorPane pneContainer = (AnchorPane) homeFormContainer.lookup("#pneContainer"); | ||
Navigation.init(pneContainer); | ||
Stage stage = new Stage(); | ||
stage.setScene(scene); | ||
stage.setTitle("National Fuel Pass App"); | ||
stage.setMinWidth(700); | ||
stage.setMinHeight(525); | ||
stage.show(); | ||
stage.centerOnScreen(); | ||
lblStatus.getScene().getWindow().hide(); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
}); | ||
timeline.getKeyFrames().addAll(frameOne,frameTwo,frameThree,frameFour,frameFive,frameSix); | ||
timeline.playFromStart(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package controller; | ||
|
||
public class WelcomeFormController { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package util; | ||
|
||
import javafx.fxml.FXMLLoader; | ||
import javafx.scene.Parent; | ||
import javafx.scene.layout.AnchorPane; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
|
||
public class Navigation { | ||
|
||
private static AnchorPane pneContainer; | ||
|
||
public static void init(AnchorPane anchorPane) { | ||
Navigation.pneContainer = anchorPane; | ||
} | ||
|
||
public static Object navigate(Routes route) throws IOException { | ||
pneContainer.getChildren().clear(); | ||
URL resource = null; | ||
switch (route) { | ||
case WELCOME: | ||
resource = Navigation.class.getResource("/view/WelcomeForm.fxml"); | ||
break; | ||
} | ||
FXMLLoader fxmlLoader = new FXMLLoader(resource); | ||
Parent root = fxmlLoader.load(); | ||
pneContainer.getChildren().add(root); | ||
AnchorPane.setLeftAnchor(root,0.0); | ||
AnchorPane.setRightAnchor(root,0.0); | ||
AnchorPane.setBottomAnchor(root,0.0); | ||
AnchorPane.setTopAnchor(root,0.0); | ||
return fxmlLoader.getController(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package util; | ||
|
||
public enum Routes { | ||
WELCOME, REGISTRATION, LOGIN, ADMIN_LOGIN, CONTROL_CENTER, DASHBOARD | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import java.lang.*?> | ||
<?import java.util.*?> | ||
<?import javafx.scene.*?> | ||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<AnchorPane xmlns="http://javafx.com/javafx" | ||
xmlns:fx="http://javafx.com/fxml" | ||
fx:controller="controller.HomeFormController" | ||
prefHeight="400.0" prefWidth="600.0"> | ||
|
||
</AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import java.lang.*?> | ||
<?import java.util.*?> | ||
<?import javafx.scene.*?> | ||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.image.Image?> | ||
<?import javafx.scene.image.ImageView?> | ||
<?import javafx.scene.layout.AnchorPane?> | ||
<?import javafx.scene.layout.VBox?> | ||
<?import javafx.scene.shape.Circle?> | ||
<?import javafx.scene.shape.Rectangle?> | ||
<?import javafx.scene.text.Font?> | ||
|
||
<AnchorPane xmlns="http://javafx.com/javafx" | ||
xmlns:fx="http://javafx.com/fxml" | ||
fx:controller="controller.SplashScreenFormController" | ||
prefHeight="400.0" prefWidth="600.0"> | ||
|
||
<AnchorPane prefHeight="355.0" prefWidth="563.0" style="-fx-background-color: rgba(0,0,0,0);" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.SplashScreenFormController"> | ||
<children> | ||
<AnchorPane layoutY="51.0" prefHeight="315.0" prefWidth="563.0" style="-fx-background-color: black;" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0"> | ||
<children> | ||
<Circle fill="WHITE" layoutX="101.0" layoutY="65.0" radius="97.0" stroke="BLACK" strokeType="INSIDE" /> | ||
<AnchorPane prefHeight="315.0" prefWidth="563.0" style="-fx-background-color: white;" AnchorPane.bottomAnchor="1.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="1.0"> | ||
<children> | ||
<ImageView fitHeight="60.0" fitWidth="271.0" layoutX="23.0" layoutY="232.0" pickOnBounds="true" preserveRatio="true"> | ||
<image> | ||
<Image url="@../img/logo.png" /> | ||
</image> | ||
</ImageView> | ||
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="23.0" layoutY="14.0" pickOnBounds="true" preserveRatio="true"> | ||
<image> | ||
<Image url="@../img/fuelStation.png" /> | ||
</image> | ||
</ImageView> | ||
<VBox layoutX="188.9199981689453" layoutY="14.0" spacing="3.0"> | ||
<children> | ||
<Label prefHeight="42.0" prefWidth="357.0" text="National Fuel Pass App"> | ||
<font> | ||
<Font name="Cantarell Bold" size="33.0" /> | ||
</font> | ||
</Label> | ||
<Label text=" " /> | ||
<Label prefHeight="25.0" prefWidth="52.0" text="v1.0.0"> | ||
<font> | ||
<Font name="Cantarell Extra Bold" size="16.0" /> | ||
</font> | ||
</Label> | ||
<Label fx:id="lblStatus" prefHeight="18.0" prefWidth="363.0" text="Welcome to National Fuel Pass App...!"> | ||
<font> | ||
<Font name="Cantarell Extra Bold" size="14.0" /> | ||
</font> | ||
</Label> | ||
</children> | ||
</VBox> | ||
<ImageView fitHeight="60.0" fitWidth="60.0" layoutX="495.0" layoutY="241.0" pickOnBounds="true" preserveRatio="true"> | ||
<image> | ||
<Image url="@../img/ceypetco.png" /> | ||
</image> | ||
</ImageView> | ||
<ImageView fitHeight="60.0" fitWidth="64.0" layoutX="435.0" layoutY="240.0" pickOnBounds="true" preserveRatio="true"> | ||
<image> | ||
<Image url="@../img/ioc.png" /> | ||
</image> | ||
</ImageView> | ||
<Rectangle fx:id="pgbContainer" fill="#3790e4" height="5.0" layoutY="286.0" stroke="#10a6f2" strokeType="INSIDE" strokeWidth="0.0" width="563.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="-1.0" AnchorPane.rightAnchor="-1.0" /> | ||
<Rectangle fx:id="pgbLoad" fill="#0eab13" height="5.0" layoutY="286.0" stroke="#219723" strokeType="INSIDE" width="32.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="-1.0" /> | ||
</children> | ||
</AnchorPane> | ||
</children> | ||
</AnchorPane> | ||
</children> | ||
</AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import java.lang.*?> | ||
<?import java.util.*?> | ||
<?import javafx.scene.*?> | ||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<AnchorPane xmlns="http://javafx.com/javafx" | ||
xmlns:fx="http://javafx.com/fxml" | ||
fx:controller="controller.WelcomeFormController" | ||
prefHeight="400.0" prefWidth="600.0"> | ||
|
||
</AnchorPane> |