commit 18/08/2025
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#Tue May 27 10:31:40 WIB 2025
|
#Mon Aug 18 16:11:28 WIB 2025
|
||||||
AudioPhase1=C\:\\Users\\rdkar\\OneDrive\\Documents\\IntelliJ Project\\ErhaCam\\audio\\phase1.mp3
|
AudioPhase1=C\:\\Users\\rdkar\\OneDrive\\Documents\\IntelliJ Project\\ErhaCam\\audio\\phase1.mp3
|
||||||
AudioPhase2=C\:\\Users\\rdkar\\OneDrive\\Documents\\IntelliJ Project\\ErhaCam\\audio\\phase2.mp3
|
AudioPhase2=C\:\\Users\\rdkar\\OneDrive\\Documents\\IntelliJ Project\\ErhaCam\\audio\\phase2.mp3
|
||||||
AudioPhase3=C\:\\Users\\rdkar\\OneDrive\\Documents\\IntelliJ Project\\ErhaCam\\audio\\phase3.mp3
|
AudioPhase3=C\:\\Users\\rdkar\\OneDrive\\Documents\\IntelliJ Project\\ErhaCam\\audio\\phase3.mp3
|
||||||
@@ -8,21 +8,21 @@ Cam1BottomCrop=20.0
|
|||||||
Cam1LeftCrop=8.0
|
Cam1LeftCrop=8.0
|
||||||
Cam1RightCrop=8.0
|
Cam1RightCrop=8.0
|
||||||
Cam1TopCrop=10.0
|
Cam1TopCrop=10.0
|
||||||
Cam2BottomCrop=10.0
|
Cam2BottomCrop=20.0
|
||||||
Cam2LeftCrop=10.0
|
Cam2LeftCrop=8.0
|
||||||
Cam2RightCrop=10.0
|
Cam2RightCrop=8.0
|
||||||
Cam2TopCrop=10.0
|
Cam2TopCrop=10.0
|
||||||
Cam3BottomCrop=10.0
|
Cam3BottomCrop=20.0
|
||||||
Cam3LeftCrop=10.0
|
Cam3LeftCrop=8.0
|
||||||
Cam3RightCrop=10.0
|
Cam3RightCrop=8.0
|
||||||
Cam3TopCrop=10.0
|
Cam3TopCrop=10.0
|
||||||
Cam4BottomCrop=10.0
|
Cam4BottomCrop=20.0
|
||||||
Cam4LeftCrop=10.0
|
Cam4LeftCrop=8.0
|
||||||
Cam4RightCrop=10.0
|
Cam4RightCrop=8.0
|
||||||
Cam4TopCrop=10.0
|
Cam4TopCrop=10.0
|
||||||
Cam5BottomCrop=10.0
|
Cam5BottomCrop=20.0
|
||||||
Cam5LeftCrop=10.0
|
Cam5LeftCrop=8.0
|
||||||
Cam5RightCrop=10.0
|
Cam5RightCrop=8.0
|
||||||
Cam5TopCrop=10.0
|
Cam5TopCrop=10.0
|
||||||
CameraCenter=
|
CameraCenter=
|
||||||
CameraConfigCenter={"Brightness"\:0.0,"Contrast"\:0.0,"Saturation"\:0.0,"Hue"\:0.0,"Gain"\:1.0,"Exposure"\:1.0,"Sharpness"\:0.0,"Gamma"\:0.0,"AutoExposure"\:true,"AutoFocus"\:true,"AutoWhiteBalance"\:true}
|
CameraConfigCenter={"Brightness"\:0.0,"Contrast"\:0.0,"Saturation"\:0.0,"Hue"\:0.0,"Gain"\:1.0,"Exposure"\:1.0,"Sharpness"\:0.0,"Gamma"\:0.0,"AutoExposure"\:true,"AutoFocus"\:true,"AutoWhiteBalance"\:true}
|
||||||
@@ -41,8 +41,9 @@ FTPPort=21
|
|||||||
FTPUser=user
|
FTPUser=user
|
||||||
FlipCamera=false
|
FlipCamera=false
|
||||||
MirrorCamera=false
|
MirrorCamera=false
|
||||||
PhotoDirectory=C\:\\Users\\rdkar\\OneDrive\\Desktop\\Erha Capture
|
PhotoDirectory=D\:\\Capture
|
||||||
SharpnessThreshold=300.0
|
Production=true
|
||||||
|
SharpnessThreshold=850.0
|
||||||
cascadeMaxSize=360
|
cascadeMaxSize=360
|
||||||
cascadeMinNeighbors=3
|
cascadeMinNeighbors=3
|
||||||
cascadeMinSize=250
|
cascadeMinSize=250
|
||||||
|
|||||||
BIN
database.db
BIN
database.db
Binary file not shown.
Binary file not shown.
@@ -47,6 +47,7 @@ public class ConfigFile {
|
|||||||
|
|
||||||
private @Getter boolean MirrorCamera = false;
|
private @Getter boolean MirrorCamera = false;
|
||||||
private @Getter boolean FlipCamera = false;
|
private @Getter boolean FlipCamera = false;
|
||||||
|
private @Getter boolean isProduction = true;
|
||||||
|
|
||||||
private @Getter double SharpnessThreshold;
|
private @Getter double SharpnessThreshold;
|
||||||
|
|
||||||
@@ -83,6 +84,13 @@ public class ConfigFile {
|
|||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAPI(boolean isProduction){
|
||||||
|
if (this.isProduction != isProduction){
|
||||||
|
this.isProduction = isProduction;
|
||||||
|
needsave = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setCam1TopCrop(String value){
|
public void setCam1TopCrop(String value){
|
||||||
if (ValidDouble(value)){
|
if (ValidDouble(value)){
|
||||||
double v = toDouble(value);
|
double v = toDouble(value);
|
||||||
@@ -790,6 +798,7 @@ public class ConfigFile {
|
|||||||
if (prop.getProperty("MirrorCamera") == null) allcorrect = false;
|
if (prop.getProperty("MirrorCamera") == null) allcorrect = false;
|
||||||
if (prop.getProperty("FlipCamera") == null) allcorrect = false;
|
if (prop.getProperty("FlipCamera") == null) allcorrect = false;
|
||||||
if (prop.getProperty("SharpnessThreshold") == null) allcorrect = false;
|
if (prop.getProperty("SharpnessThreshold") == null) allcorrect = false;
|
||||||
|
if (prop.getProperty("Production") == null) allcorrect = false;
|
||||||
|
|
||||||
|
|
||||||
if (prop.getProperty(CameraConfigEnum.CameraConfigLeft90.toString()) == null) allcorrect = false;
|
if (prop.getProperty(CameraConfigEnum.CameraConfigLeft90.toString()) == null) allcorrect = false;
|
||||||
@@ -859,6 +868,7 @@ public class ConfigFile {
|
|||||||
if (MainApplication.detectorsList!=null){
|
if (MainApplication.detectorsList!=null){
|
||||||
MainApplication.detectorsList.forEach((i, d) -> {
|
MainApplication.detectorsList.forEach((i, d) -> {
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
|
System.out.println("Setting face detection parameters for detector: " + i);
|
||||||
d.setFaceMaxSize(cascadeMaxSize);
|
d.setFaceMaxSize(cascadeMaxSize);
|
||||||
d.setFaceMinSize(cascadeMinSize);
|
d.setFaceMinSize(cascadeMinSize);
|
||||||
d.setScaleFactor(cascadeScaleFactor);
|
d.setScaleFactor(cascadeScaleFactor);
|
||||||
@@ -873,6 +883,7 @@ public class ConfigFile {
|
|||||||
|
|
||||||
MirrorCamera = toBoolean(prop.getProperty("MirrorCamera"));
|
MirrorCamera = toBoolean(prop.getProperty("MirrorCamera"));
|
||||||
FlipCamera = toBoolean(prop.getProperty("FlipCamera"));
|
FlipCamera = toBoolean(prop.getProperty("FlipCamera"));
|
||||||
|
isProduction = toBoolean(prop.getProperty("Production"));
|
||||||
|
|
||||||
SharpnessThreshold = toDouble(prop.getProperty("SharpnessThreshold"));
|
SharpnessThreshold = toDouble(prop.getProperty("SharpnessThreshold"));
|
||||||
|
|
||||||
@@ -945,7 +956,7 @@ public class ConfigFile {
|
|||||||
FTPUser = "user";
|
FTPUser = "user";
|
||||||
FTPPass = "password";
|
FTPPass = "password";
|
||||||
FTPPath = "/";
|
FTPPath = "/";
|
||||||
PhotoDirectory = currentDirectory;
|
PhotoDirectory = "D:\\Capture";
|
||||||
SetDefaultCameraConfig(ConfigLeft90);
|
SetDefaultCameraConfig(ConfigLeft90);
|
||||||
SetDefaultCameraConfig(ConfigLeft45);
|
SetDefaultCameraConfig(ConfigLeft45);
|
||||||
SetDefaultCameraConfig(ConfigCenter);
|
SetDefaultCameraConfig(ConfigCenter);
|
||||||
@@ -967,7 +978,8 @@ public class ConfigFile {
|
|||||||
// Detectors.setScaleFactor(cascadeScaleFactor);
|
// Detectors.setScaleFactor(cascadeScaleFactor);
|
||||||
MirrorCamera = false;
|
MirrorCamera = false;
|
||||||
FlipCamera = false;
|
FlipCamera = false;
|
||||||
SharpnessThreshold = 300.0;
|
isProduction = true;
|
||||||
|
SharpnessThreshold = 850.0;
|
||||||
|
|
||||||
Cam1TopCrop = 10.0;
|
Cam1TopCrop = 10.0;
|
||||||
Cam1BottomCrop = 20.0;
|
Cam1BottomCrop = 20.0;
|
||||||
@@ -1052,6 +1064,7 @@ public class ConfigFile {
|
|||||||
|
|
||||||
prop.setProperty("MirrorCamera", String.valueOf(MirrorCamera));
|
prop.setProperty("MirrorCamera", String.valueOf(MirrorCamera));
|
||||||
prop.setProperty("FlipCamera", String.valueOf(FlipCamera));
|
prop.setProperty("FlipCamera", String.valueOf(FlipCamera));
|
||||||
|
prop.setProperty("Production", String.valueOf(isProduction));
|
||||||
prop.setProperty("SharpnessThreshold", String.valueOf(SharpnessThreshold));
|
prop.setProperty("SharpnessThreshold", String.valueOf(SharpnessThreshold));
|
||||||
|
|
||||||
prop.setProperty("Cam1TopCrop", String.valueOf(Cam1TopCrop));
|
prop.setProperty("Cam1TopCrop", String.valueOf(Cam1TopCrop));
|
||||||
|
|||||||
@@ -9,10 +9,13 @@ import org.tinylog.Logger;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.ConnectException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
|
import java.net.http.HttpTimeoutException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -27,7 +30,7 @@ public class ErhaAPI {
|
|||||||
|
|
||||||
|
|
||||||
private String auth;
|
private String auth;
|
||||||
private final String API_URL;
|
private String API_URL="";
|
||||||
|
|
||||||
private final Gson gson = new Gson();
|
private final Gson gson = new Gson();
|
||||||
|
|
||||||
@@ -36,11 +39,25 @@ public class ErhaAPI {
|
|||||||
* @param isProduction if true will use Production URL, if false will use Staging URL
|
* @param isProduction if true will use Production URL, if false will use Staging URL
|
||||||
*/
|
*/
|
||||||
public ErhaAPI(boolean isProduction){
|
public ErhaAPI(boolean isProduction){
|
||||||
|
setProduction(isProduction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProduction(boolean isProduction){
|
||||||
final String API_URL_PROD = "https://connect-api.aryanoble.co.id/api";
|
final String API_URL_PROD = "https://connect-api.aryanoble.co.id/api";
|
||||||
final String API_URL_STAGING = "https://connect-api-staging.aryanoble.web.id/api";
|
final String API_URL_STAGING = "https://connect-api-staging.aryanoble.web.id/api";
|
||||||
API_URL = isProduction ? API_URL_PROD : API_URL_STAGING;
|
if (isProduction){
|
||||||
update_auth();
|
if (!API_URL.equals(API_URL_PROD)){
|
||||||
|
API_URL = API_URL_PROD;
|
||||||
|
update_auth();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!API_URL.equals(API_URL_STAGING)){
|
||||||
|
API_URL = API_URL_STAGING;
|
||||||
|
update_auth();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set API Username
|
* Set API Username
|
||||||
* @param API_USERNAME API Username
|
* @param API_USERNAME API Username
|
||||||
@@ -78,7 +95,7 @@ public class ErhaAPI {
|
|||||||
public @NonNull BarcodeHttpResult Validate_Barcode(String Barcode, boolean printdebug){
|
public @NonNull BarcodeHttpResult Validate_Barcode(String Barcode, boolean printdebug){
|
||||||
BarcodeHttpResult bhr = new BarcodeHttpResult();
|
BarcodeHttpResult bhr = new BarcodeHttpResult();
|
||||||
if (ValidBarCode(Barcode)){
|
if (ValidBarCode(Barcode)){
|
||||||
|
System.out.println("Checking Barcode : " + Barcode +" on "+(config.isProduction()?"Production":"Staging")+" API " );
|
||||||
try (HttpClient client = HttpClient.newHttpClient()) {
|
try (HttpClient client = HttpClient.newHttpClient()) {
|
||||||
int medical_record_detail_id = toInt(Barcode);
|
int medical_record_detail_id = toInt(Barcode);
|
||||||
HttpRequest request = HttpRequest.newBuilder()
|
HttpRequest request = HttpRequest.newBuilder()
|
||||||
@@ -105,10 +122,26 @@ public class ErhaAPI {
|
|||||||
Logger.error("Validate_Barcode failed, status code : " , response.statusCode());
|
Logger.error("Validate_Barcode failed, status code : " , response.statusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (UnknownHostException e) {
|
||||||
Logger.error("Validate_Barcode IO Exception, Msg : " , e.getMessage());
|
// no internet or no DNS
|
||||||
} catch (InterruptedException e) {
|
Logger.error("Validate_Barcode UnknownHostException, Msg : " , e.getMessage());
|
||||||
Logger.error("Validate_Barcode Interrupted Exception, Msg : " , e.getMessage());
|
bhr.setStatusCode(0);
|
||||||
|
bhr.setBody("No internet connection or DNS error");
|
||||||
|
} catch (ConnectException e) {
|
||||||
|
// connection refused
|
||||||
|
Logger.error("Validate_Barcode ConnectException , Msg : " , e.getMessage());
|
||||||
|
bhr.setStatusCode(-1);
|
||||||
|
bhr.setBody("Connection refused");
|
||||||
|
} catch( HttpTimeoutException e){
|
||||||
|
// timeout
|
||||||
|
Logger.error("Validate_Barcode HttpTimeoutException, Msg : " , e.getMessage());
|
||||||
|
bhr.setStatusCode(408);
|
||||||
|
bhr.setBody("Http Request timeout");
|
||||||
|
} catch (IOException | InterruptedException e) {
|
||||||
|
// generic network error
|
||||||
|
Logger.error("Validate_Barcode IOException/InterruptedException, Msg : " , e.getMessage());
|
||||||
|
bhr.setStatusCode(-2);
|
||||||
|
bhr.setBody("Network error: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -158,7 +191,7 @@ public class ErhaAPI {
|
|||||||
endBoundary.getBytes()
|
endBoundary.getBytes()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
System.out.println("Uploading file : " + filename + " to " + (config.isProduction()?"Production":"Staging")+" API ");
|
||||||
HttpRequest request = HttpRequest.newBuilder()
|
HttpRequest request = HttpRequest.newBuilder()
|
||||||
.uri(new URI(API_URL + "/photobooth/photobooth"))
|
.uri(new URI(API_URL + "/photobooth/photobooth"))
|
||||||
.header("Authorization", "Basic " + auth)
|
.header("Authorization", "Basic " + auth)
|
||||||
|
|||||||
@@ -5,16 +5,14 @@ import javafx.animation.PauseTransition;
|
|||||||
import javafx.animation.Timeline;
|
import javafx.animation.Timeline;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
|
|
||||||
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.*;
|
||||||
import javafx.scene.layout.HBox;
|
|
||||||
import javafx.scene.layout.StackPane;
|
|
||||||
import javafx.scene.layout.VBox;
|
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.shape.Circle;
|
import javafx.scene.shape.Circle;
|
||||||
import javafx.stage.*;
|
import javafx.stage.*;
|
||||||
@@ -289,26 +287,37 @@ public class AutoCloseAlert {
|
|||||||
double screenwidth = Screen.getPrimary().getBounds().getWidth();
|
double screenwidth = Screen.getPrimary().getBounds().getWidth();
|
||||||
double screenheight = Screen.getPrimary().getBounds().getHeight();
|
double screenheight = Screen.getPrimary().getBounds().getHeight();
|
||||||
|
|
||||||
double height = screenheight/4;
|
double height = screenheight/4.0;
|
||||||
double width = height * 21/9;
|
double width = height * 21.0/9.0;
|
||||||
|
|
||||||
|
VBox root = new VBox(10);
|
||||||
|
root.setPadding(new Insets(12));
|
||||||
|
root.setPrefSize(width, height);
|
||||||
|
root.setAlignment(Pos.CENTER);
|
||||||
|
|
||||||
List<Node> children = new ArrayList<>();
|
|
||||||
if (ValidString(header)){
|
if (ValidString(header)){
|
||||||
Label headerLabel = new Label(header);
|
Label headerLabel = new Label(header);
|
||||||
headerLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 28px;");
|
headerLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 28px;");
|
||||||
|
headerLabel.setWrapText(true);
|
||||||
headerLabel.setMinHeight(height*0.25);
|
headerLabel.setMinHeight(height*0.25);
|
||||||
children.add(headerLabel);
|
headerLabel.setMaxWidth(Double.MAX_VALUE);
|
||||||
|
headerLabel.prefWidthProperty().bind(root.widthProperty());
|
||||||
|
root.getChildren().add(headerLabel);
|
||||||
}
|
}
|
||||||
if (ValidString(content)){
|
if (ValidString(content)){
|
||||||
Label contentLabel = new Label(content);
|
Label contentLabel = new Label(content);
|
||||||
|
contentLabel.setWrapText(true);
|
||||||
contentLabel.setStyle("-fx-font-size: 24px;");
|
contentLabel.setStyle("-fx-font-size: 24px;");
|
||||||
contentLabel.setMinHeight(height*0.75);
|
contentLabel.setMinHeight(height*0.75);
|
||||||
children.add(contentLabel);
|
contentLabel.setMaxWidth(Double.MAX_VALUE);
|
||||||
|
contentLabel.prefWidthProperty().bind(root.widthProperty());
|
||||||
|
|
||||||
|
VBox.setVgrow(contentLabel, Priority.ALWAYS);
|
||||||
|
contentLabel.setAlignment(Pos.TOP_CENTER);
|
||||||
|
root.getChildren().add(contentLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
VBox root = new VBox(10, children.toArray(new Node[0]));
|
|
||||||
root.setPrefSize(width, height);
|
|
||||||
root.setAlignment(Pos.CENTER);
|
|
||||||
|
|
||||||
Scene scene = new Scene(root);
|
Scene scene = new Scene(root);
|
||||||
alertStage.setScene(scene);
|
alertStage.setScene(scene);
|
||||||
|
|||||||
@@ -905,8 +905,8 @@ public class Cameradetail {
|
|||||||
boolean have_left_45_face = false;
|
boolean have_left_45_face = false;
|
||||||
int _face_width = 0;
|
int _face_width = 0;
|
||||||
int _face_height = 0;
|
int _face_height = 0;
|
||||||
|
|
||||||
List<DetectorResult> frontalfaces = detector.HaveFrontalFace(GrayMat.clone());
|
List<DetectorResult> frontalfaces = detector.HaveFrontalFace(GrayMat.clone());
|
||||||
|
//System.out.println("camera "+title+ (frontalfaces.isEmpty() ? " no frontal face detected" : " found "+frontalfaces.size()+" frontal faces"));
|
||||||
if (!frontalfaces.isEmpty()){
|
if (!frontalfaces.isEmpty()){
|
||||||
for(DetectorResult rect : frontalfaces){
|
for(DetectorResult rect : frontalfaces){
|
||||||
if (rect.haveFace() ){
|
if (rect.haveFace() ){
|
||||||
@@ -925,6 +925,7 @@ public class Cameradetail {
|
|||||||
// gak punya frontal face
|
// gak punya frontal face
|
||||||
// coba cek punya profile left face 45 gak
|
// coba cek punya profile left face 45 gak
|
||||||
List<DetectorResult> Left45Faces = detector.HaveLeft45Face(GrayMat.clone());
|
List<DetectorResult> Left45Faces = detector.HaveLeft45Face(GrayMat.clone());
|
||||||
|
//System.out.println("camera "+title+ (Left45Faces.isEmpty() ? " no left 45 face detected" : " found "+Left45Faces.size()+" left 45 faces"));
|
||||||
if (!Left45Faces.isEmpty()){
|
if (!Left45Faces.isEmpty()){
|
||||||
for(DetectorResult rect : Left45Faces){
|
for(DetectorResult rect : Left45Faces){
|
||||||
if (rect.haveFace()){
|
if (rect.haveFace()){
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public class CaptureView {
|
|||||||
|
|
||||||
private final AtomicBoolean isTakingPhoto = new AtomicBoolean(false);
|
private final AtomicBoolean isTakingPhoto = new AtomicBoolean(false);
|
||||||
|
|
||||||
private final ErhaAPI erhaAPI = new ErhaAPI(true);
|
private final ErhaAPI erhaAPI = new ErhaAPI(config.isProduction());
|
||||||
|
|
||||||
// for timeout 180 detik
|
// for timeout 180 detik
|
||||||
private final int timeout = 180;
|
private final int timeout = 180;
|
||||||
@@ -513,13 +513,14 @@ public class CaptureView {
|
|||||||
String[] files = prc.compressedcrop();
|
String[] files = prc.compressedcrop();
|
||||||
if (files.length>0){
|
if (files.length>0){
|
||||||
InsertSQL(prc);
|
InsertSQL(prc);
|
||||||
|
erhaAPI.setProduction(config.isProduction());
|
||||||
Task<Void> uploadtask = new Task<>() {
|
Task<Void> uploadtask = new Task<>() {
|
||||||
@Override
|
@Override
|
||||||
protected Void call() {
|
protected Void call() {
|
||||||
int totalfiles = files.length;
|
int totalfiles = files.length;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
for (String ff : files) {
|
for (String ff : files) {
|
||||||
|
|
||||||
UploadHttpResult ur = erhaAPI.Upload_File(prefix, ff,true);
|
UploadHttpResult ur = erhaAPI.Upload_File(prefix, ff,true);
|
||||||
if (ur.getResult().message.startsWith("Record has been created")) {
|
if (ur.getResult().message.startsWith("Record has been created")) {
|
||||||
counter++;
|
counter++;
|
||||||
@@ -928,6 +929,7 @@ public class CaptureView {
|
|||||||
Task<PatientRecord> checkpatientID = new Task<>() {
|
Task<PatientRecord> checkpatientID = new Task<>() {
|
||||||
@Override
|
@Override
|
||||||
protected PatientRecord call() throws Exception {
|
protected PatientRecord call() throws Exception {
|
||||||
|
erhaAPI.setProduction(config.isProduction());
|
||||||
BarcodeHttpResult br = erhaAPI.Validate_Barcode(finalbarCode,true);
|
BarcodeHttpResult br = erhaAPI.Validate_Barcode(finalbarCode,true);
|
||||||
if (br.getStatusCode()==200){
|
if (br.getStatusCode()==200){
|
||||||
if (br.getResult().message.startsWith("Records found")){
|
if (br.getResult().message.startsWith("Records found")){
|
||||||
@@ -955,7 +957,7 @@ public class CaptureView {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger.error("HTTP code ", br.getStatusCode(), " for barcode ", finalbarCode);
|
Logger.error("HTTP code ", br.getStatusCode(), " for barcode ", finalbarCode);
|
||||||
throw new Exception("HTTP code "+br.getStatusCode()+" untuk barcode "+finalbarCode);
|
throw new Exception("Barcode "+finalbarCode+" failed, code= "+br.getStatusCode()+", message: "+br.getBody());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1101,6 +1103,9 @@ public class CaptureView {
|
|||||||
};
|
};
|
||||||
image.setCameraStatus("Camera Starting");
|
image.setCameraStatus("Camera Starting");
|
||||||
if (image.StartLiveView(lce, title, use_qr_detector, use_face_detector)){
|
if (image.StartLiveView(lce, title, use_qr_detector, use_face_detector)){
|
||||||
|
image.getDetector().setFaceMaxSize(config.getCascadeMaxSize());
|
||||||
|
image.getDetector().setFaceMinSize(config.getCascadeMinSize());
|
||||||
|
image.getDetector().setScaleFactor(config.getCascadeScaleFactor());
|
||||||
MainApplication.detectorsList.put(devicenumber, image.getDetector());
|
MainApplication.detectorsList.put(devicenumber, image.getDetector());
|
||||||
Logger.info("Camera "+cameraname+" started with device number "+devicenumber);
|
Logger.info("Camera "+cameraname+" started with device number "+devicenumber);
|
||||||
} else image.setCameraStatus("Unable to Set Grabber");
|
} else image.setCameraStatus("Unable to Set Grabber");
|
||||||
|
|||||||
@@ -10,15 +10,15 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Detectors {
|
public class Detectors {
|
||||||
public static CascadeClassifier frontalfaceDetector;
|
public CascadeClassifier frontalfaceDetector;
|
||||||
private static CascadeClassifier eyeDetector;
|
private CascadeClassifier eyeDetector;
|
||||||
private static CascadeClassifier profilefaceDetector;
|
private CascadeClassifier profilefaceDetector;
|
||||||
|
|
||||||
private static double scaleFactor = 1.2; // revisi 09/05/2025, dari nilai 1.05
|
private double scaleFactor = 1.05; // revisi 09/05/2025, dari nilai 1.05
|
||||||
private final static int minNeighbors = 5; // revisi 09/05/2025, dari nilai 3
|
private final int minNeighbors = 3; // revisi 09/05/2025, dari nilai 3
|
||||||
private final static int flags = 0;
|
private final int flags = 0;
|
||||||
private static Size FaceminSize;
|
private Size FaceminSize;
|
||||||
private static Size FacemaxSize;
|
private Size FacemaxSize;
|
||||||
|
|
||||||
public Detectors(){
|
public Detectors(){
|
||||||
LoadFrontalFaceDetector();
|
LoadFrontalFaceDetector();
|
||||||
@@ -27,62 +27,38 @@ public class Detectors {
|
|||||||
LoadProfileFaceDetector();
|
LoadProfileFaceDetector();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static void LoadAllDetectors(){
|
|
||||||
//
|
|
||||||
// LoadFrontalFaceDetector();
|
|
||||||
// LoadEyeDetector();
|
|
||||||
//
|
|
||||||
// LoadProfileFaceDetector();
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
private void LoadFrontalFaceDetector(){
|
private void LoadFrontalFaceDetector(){
|
||||||
// revisi 09/05/2025, dari filename = SomeCodes.ExtractResource("/haarcascade_frontalface_default.xml");
|
// revisi 09/05/2025, dari filename = SomeCodes.ExtractResource("/haarcascade_frontalface_default.xml");
|
||||||
String filename = SomeCodes.ExtractResource("/haarcascade_frontalface_alt.xml");
|
String filename = SomeCodes.ExtractResource("/haarcascade_frontalface_alt.xml");
|
||||||
if (filename!=null) {
|
if (filename!=null) {
|
||||||
Logger.info("Face Detector file : " + filename);
|
try{
|
||||||
if (frontalfaceDetector==null) {
|
frontalfaceDetector = new CascadeClassifier(filename);
|
||||||
try{
|
} catch (Exception e){
|
||||||
frontalfaceDetector = new CascadeClassifier(filename);
|
Logger.error("Exception on loading FaceDetector : " + e.getMessage());
|
||||||
Logger.info("FaceDetector loaded");
|
}
|
||||||
} catch (Exception e){
|
|
||||||
Logger.error("Exception on loading FaceDetector : " + e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
} else Logger.info("FaceDetector already loaded");
|
|
||||||
} else Logger.error("Unable to extract face detector file");
|
} else Logger.error("Unable to extract face detector file");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadProfileFaceDetector(){
|
private void LoadProfileFaceDetector(){
|
||||||
String filename = SomeCodes.ExtractResource("/haarcascade_profileface.xml");
|
String filename = SomeCodes.ExtractResource("/haarcascade_profileface.xml");
|
||||||
if (filename!=null) {
|
if (filename!=null) {
|
||||||
Logger.info("Profile Face Detector file : " + filename);
|
try{
|
||||||
if (profilefaceDetector==null) {
|
profilefaceDetector = new CascadeClassifier(filename);
|
||||||
try{
|
} catch (Exception e){
|
||||||
profilefaceDetector = new CascadeClassifier(filename);
|
Logger.error("Exception on loading ProfileFaceDetector : " + e.getMessage());
|
||||||
Logger.info("ProfileFaceDetector loaded");
|
}
|
||||||
} catch (Exception e){
|
|
||||||
Logger.error("Exception on loading ProfileFaceDetector : " + e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
} else Logger.info("ProfileFaceDetector already loaded");
|
|
||||||
} else Logger.error("Unable to extract profile face detector file");
|
} else Logger.error("Unable to extract profile face detector file");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadEyeDetector(){
|
private void LoadEyeDetector(){
|
||||||
String filename = SomeCodes.ExtractResource("/haarcascade_eye.xml");
|
String filename = SomeCodes.ExtractResource("/haarcascade_eye.xml");
|
||||||
if (filename!=null) {
|
if (filename!=null) {
|
||||||
Logger.info("Eye Detector file : " + filename);
|
try{
|
||||||
if (eyeDetector==null) {
|
|
||||||
try{
|
|
||||||
|
|
||||||
eyeDetector = new CascadeClassifier(filename);
|
eyeDetector = new CascadeClassifier(filename);
|
||||||
Logger.info("EyeDetector loaded");
|
} catch (Exception e){
|
||||||
} catch (Exception e){
|
Logger.error("Exception on loading EyeDetector : " + e.getMessage());
|
||||||
Logger.error("Exception on loading EyeDetector : " + e.getMessage());
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} else Logger.info("EyeDetector already loaded");
|
|
||||||
} else Logger.error("Unable to extract eye detector file");
|
} else Logger.error("Unable to extract eye detector file");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,14 +69,16 @@ public class Detectors {
|
|||||||
*/
|
*/
|
||||||
public @NonNull List<DetectorResult> HaveFrontalFace(Mat graymat){
|
public @NonNull List<DetectorResult> HaveFrontalFace(Mat graymat){
|
||||||
List<DetectorResult> result = new ArrayList<>();
|
List<DetectorResult> result = new ArrayList<>();
|
||||||
|
//System.out.println("Detecting frontal from "+ graymat.size().width() + "x" + graymat.size().height());
|
||||||
RectVector faces = DetectFrontalFace(graymat);
|
RectVector faces = DetectFrontalFace(graymat);
|
||||||
if (faces!=null && faces.size()>0){
|
if (faces!=null && faces.size()>0){
|
||||||
|
//System.out.println("faces size = " + faces.size());
|
||||||
for(Rect face : faces.get()){
|
for(Rect face : faces.get()){
|
||||||
RectVector eyes = DetectEye(graymat, face.width());
|
RectVector eyes = DetectEye(graymat, face.width());
|
||||||
DetectorResult dr = new DetectorResult();
|
DetectorResult dr = new DetectorResult();
|
||||||
dr.setFace(face);
|
dr.setFace(face);
|
||||||
if (eyes!=null && eyes.size()>=2){
|
//System.out.println("eyes size = " + eyes.size());
|
||||||
|
if (eyes.size()>=2){
|
||||||
for(Rect eye : eyes.get()){
|
for(Rect eye : eyes.get()){
|
||||||
if (SomeCodes.IsInsideRect(eye, face)) {
|
if (SomeCodes.IsInsideRect(eye, face)) {
|
||||||
dr.AddEye(eye);
|
dr.AddEye(eye);
|
||||||
@@ -109,7 +87,7 @@ public class Detectors {
|
|||||||
}
|
}
|
||||||
result.add(dr);
|
result.add(dr);
|
||||||
}
|
}
|
||||||
}
|
} //else System.out.println("faces size = 0");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +100,7 @@ public class Detectors {
|
|||||||
RectVector eyes = DetectEye(graymat, face.width());
|
RectVector eyes = DetectEye(graymat, face.width());
|
||||||
DetectorResult dr = new DetectorResult();
|
DetectorResult dr = new DetectorResult();
|
||||||
dr.setFace(face);
|
dr.setFace(face);
|
||||||
if (eyes!=null && eyes.size()>0){
|
if (eyes.size()>0){
|
||||||
for(Rect eye : eyes.get()){
|
for(Rect eye : eyes.get()){
|
||||||
if (SomeCodes.IsInsideRect(eye, face)) dr.AddEye(eye);
|
if (SomeCodes.IsInsideRect(eye, face)) dr.AddEye(eye);
|
||||||
}
|
}
|
||||||
@@ -144,11 +122,11 @@ public class Detectors {
|
|||||||
if (FaceminSize!=null){
|
if (FaceminSize!=null){
|
||||||
if (FaceminSize.width()!=value || FaceminSize.height()!=value) {
|
if (FaceminSize.width()!=value || FaceminSize.height()!=value) {
|
||||||
FaceminSize = new Size(value, value);
|
FaceminSize = new Size(value, value);
|
||||||
//Logger.info("FaceMinSize changed to : " + FaceminSize.width());
|
Logger.info("FaceMinSize changed to : " + FaceminSize.width());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FaceminSize = new Size(value, value);
|
FaceminSize = new Size(value, value);
|
||||||
//Logger.info("FaceMinSize created with value : " + FaceminSize.width());
|
Logger.info("FaceMinSize created with value : " + FaceminSize.width());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -157,11 +135,11 @@ public class Detectors {
|
|||||||
if (FacemaxSize!=null){
|
if (FacemaxSize!=null){
|
||||||
if (FacemaxSize.width()!=value || FacemaxSize.height()!=value) {
|
if (FacemaxSize.width()!=value || FacemaxSize.height()!=value) {
|
||||||
FacemaxSize = new Size(value, value);
|
FacemaxSize = new Size(value, value);
|
||||||
//Logger.info("FaceMaxSize changed to : " + FacemaxSize.width());
|
Logger.info("FaceMaxSize changed to : " + FacemaxSize.width());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FacemaxSize = new Size(value, value);
|
FacemaxSize = new Size(value, value);
|
||||||
//Logger.info("FaceMaxSize created with value : " + FacemaxSize.width());
|
Logger.info("FaceMaxSize created with value : " + FacemaxSize.width());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -192,6 +170,7 @@ public class Detectors {
|
|||||||
int maxwidth = (int)(facewidth*0.4);
|
int maxwidth = (int)(facewidth*0.4);
|
||||||
Size minsize = new Size(minwidth, minwidth);
|
Size minsize = new Size(minwidth, minwidth);
|
||||||
Size maxsize = new Size(maxwidth, maxwidth);
|
Size maxsize = new Size(maxwidth, maxwidth);
|
||||||
|
//System.out.println("Detecting Eye with minsize = " + minsize.width() + "x" + minsize.height() + ", maxsize = " + maxsize.width() + "x" + maxsize.height());
|
||||||
return Detect(graymat, eyeDetector, scaleFactor, minNeighbors, flags, minsize, maxsize);
|
return Detect(graymat, eyeDetector, scaleFactor, minNeighbors, flags, minsize, maxsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,13 +190,13 @@ public class Detectors {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Detectors Detect Error, Message : " + e.getMessage());
|
System.out.println("Detectors Detect Error, Message : " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
} else System.out.println("graymat is smaller than minSize");
|
||||||
|
|
||||||
}
|
} else System.out.println("minSize is larger than maxSize");
|
||||||
}
|
} else System.out.println("minSize or maxSize is null");
|
||||||
}
|
} else System.out.println("graymat is null, not 1 channel, or empty");
|
||||||
|
|
||||||
}
|
} else System.out.println("detector empty");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import static Config.SomeCodes.config;
|
|||||||
|
|
||||||
public class MainApplication extends Application {
|
public class MainApplication extends Application {
|
||||||
|
|
||||||
final String version = "10072025-PRODUCTION-1.0.3";
|
final String version = "18082025-PRODUCTION-1.0.6";
|
||||||
PhotoCleaner photoCleaner;
|
PhotoCleaner photoCleaner;
|
||||||
public static Map<Integer, Detectors> detectorsList = new HashMap<>();
|
public static Map<Integer, Detectors> detectorsList = new HashMap<>();
|
||||||
|
|
||||||
@@ -75,6 +75,7 @@ public class MainApplication extends Application {
|
|||||||
|
|
||||||
Logger.info("Application started");
|
Logger.info("Application started");
|
||||||
System.out.println("Application version : " + version+" started");
|
System.out.println("Application version : " + version+" started");
|
||||||
|
System.out.println("Using "+(config.isProduction()?"Production":"Staging")+" API URL ");
|
||||||
sd.setEvent(new SecureDongleEvent() {
|
sd.setEvent(new SecureDongleEvent() {
|
||||||
@Override
|
@Override
|
||||||
public void onDongleMissing() {
|
public void onDongleMissing() {
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ package id.co.gtc.erhacam;
|
|||||||
import FTP.FTPCheck;
|
import FTP.FTPCheck;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Alert;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.CheckBox;
|
|
||||||
import javafx.scene.control.ComboBox;
|
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import org.bytedeco.javacv.VideoInputFrameGrabber;
|
import org.bytedeco.javacv.VideoInputFrameGrabber;
|
||||||
@@ -94,6 +91,27 @@ public class SettingView {
|
|||||||
@FXML
|
@FXML
|
||||||
private TextField Cam5RightCrop;
|
private TextField Cam5RightCrop;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private RadioButton apiStaging;
|
||||||
|
@FXML
|
||||||
|
private RadioButton apiProduction;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public void changeAPIClick(){
|
||||||
|
if (apiStaging.isSelected()){
|
||||||
|
config.setAPI(false);
|
||||||
|
config.Save();
|
||||||
|
ShowAlert(Alert.AlertType.INFORMATION, "API Change", "API Change", "API Staging is selected, API will use Staging URL");
|
||||||
|
} else if (apiProduction.isSelected()){
|
||||||
|
config.setAPI(true);
|
||||||
|
config.Save();
|
||||||
|
ShowAlert(Alert.AlertType.INFORMATION, "API Change", "API Change", "API Production is selected, API will use Production URL");
|
||||||
|
} else {
|
||||||
|
ShowAlert(Alert.AlertType.ERROR, "API Change Error", "API Change Error", "Please select API Staging or API Production");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void ApplyCropClick(){
|
private void ApplyCropClick(){
|
||||||
// Apply crop settings for each camera
|
// Apply crop settings for each camera
|
||||||
@@ -340,6 +358,8 @@ public class SettingView {
|
|||||||
|
|
||||||
MirrorCamera.setSelected(config.isMirrorCamera());
|
MirrorCamera.setSelected(config.isMirrorCamera());
|
||||||
FlipCamera.setSelected(config.isFlipCamera());
|
FlipCamera.setSelected(config.isFlipCamera());
|
||||||
|
apiStaging.setSelected(!config.isProduction());
|
||||||
|
apiProduction.setSelected(config.isProduction());
|
||||||
|
|
||||||
TextFieldSetText(Sharpness,String.valueOf(config.getSharpnessThreshold()));
|
TextFieldSetText(Sharpness,String.valueOf(config.getSharpnessThreshold()));
|
||||||
TextFieldSetText(Cam1TopCrop,String.valueOf(config.getCam1TopCrop()));
|
TextFieldSetText(Cam1TopCrop,String.valueOf(config.getCam1TopCrop()));
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ module id.co.gtc.erhacam {
|
|||||||
requires java.sql;
|
requires java.sql;
|
||||||
requires javafx.graphics;
|
requires javafx.graphics;
|
||||||
requires java.net.http;
|
requires java.net.http;
|
||||||
|
requires org.tinylog.impl;
|
||||||
|
|
||||||
|
|
||||||
opens id.co.gtc.erhacam to javafx.fxml;
|
opens id.co.gtc.erhacam to javafx.fxml;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import static Config.SomeCodes.*;
|
import static Config.SomeCodes.*;
|
||||||
import static id.co.gtc.erhacam.Detectors.frontalfaceDetector;
|
|
||||||
import static org.bytedeco.opencv.global.opencv_core.CV_8UC3;
|
import static org.bytedeco.opencv.global.opencv_core.CV_8UC3;
|
||||||
import static org.bytedeco.opencv.global.opencv_core.mean;
|
import static org.bytedeco.opencv.global.opencv_core.mean;
|
||||||
import static org.bytedeco.opencv.global.opencv_imgcodecs.imwrite;
|
import static org.bytedeco.opencv.global.opencv_imgcodecs.imwrite;
|
||||||
@@ -776,11 +775,11 @@ public class Cameradetail_Arducam {
|
|||||||
* @return true if face detected, otherwise false
|
* @return true if face detected, otherwise false
|
||||||
*/
|
*/
|
||||||
private RectVector DetectFace(UMat graymat){
|
private RectVector DetectFace(UMat graymat){
|
||||||
if (frontalfaceDetector!=null){
|
// if (frontalfaceDetector!=null){
|
||||||
val face = new RectVector();
|
// val face = new RectVector();
|
||||||
frontalfaceDetector.detectMultiScale(graymat, face);
|
// frontalfaceDetector.detectMultiScale(graymat, face);
|
||||||
return face;
|
// return face;
|
||||||
}
|
// }
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
@@ -168,6 +169,25 @@
|
|||||||
<children>
|
<children>
|
||||||
<Button mnemonicParsing="false" onAction="#SharpnessApply" prefHeight="37.0" prefWidth="92.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
|
<Button mnemonicParsing="false" onAction="#SharpnessApply" prefHeight="37.0" prefWidth="92.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
|
||||||
</children>
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
<AnchorPane GridPane.rowIndex="8">
|
||||||
|
<children>
|
||||||
|
<Label text="API Type" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
<AnchorPane GridPane.columnIndex="1" GridPane.rowIndex="8">
|
||||||
|
<children>
|
||||||
|
<RadioButton fx:id="apiStaging" layoutX="14.0" layoutY="8.0" mnemonicParsing="false" text="Staging" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.topAnchor="2.0">
|
||||||
|
<toggleGroup>
|
||||||
|
<ToggleGroup fx:id="apiselect" />
|
||||||
|
</toggleGroup></RadioButton>
|
||||||
|
<RadioButton fx:id="apiProduction" layoutX="103.0" layoutY="11.0" mnemonicParsing="false" text="Production" toggleGroup="$apiselect" AnchorPane.bottomAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
<AnchorPane GridPane.columnIndex="2" GridPane.rowIndex="8">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#changeAPIClick" prefHeight="33.6" prefWidth="102.4" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
|
||||||
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|||||||
Reference in New Issue
Block a user