Compare commits

3 Commits

Author SHA1 Message Date
c4d3153bd1 commit 30/10/2025 2025-10-30 08:57:31 +07:00
0b389afe62 commit 03/10/2025 2025-10-03 11:00:51 +07:00
d5fbd2bc0a commit 03/10/2025 2025-10-03 08:09:04 +07:00
11 changed files with 327 additions and 82 deletions

52
.idea/artifacts/Dermies.xml generated Normal file
View File

@@ -0,0 +1,52 @@
<component name="ArtifactManager">
<artifact type="jar" name="Dermies">
<output-path>$PROJECT_DIR$/out/artifacts/Dermies</output-path>
<root id="archive" name="Dermies.jar">
<element id="module-output" name="ErhaCam" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/controlsfx/controlsfx/11.2.1/controlsfx-11.2.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/libfreenect2/0.2.0-1.5.9/libfreenect2-0.2.0-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/ffmpeg/6.1.1-1.5.10/ffmpeg-6.1.1-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/beust/jcommander/1.82/jcommander-1.82.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.27.0/error_prone_annotations-2.27.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/opencv/4.9.0-1.5.10/opencv-4.9.0-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/opencv/4.9.0-1.5.10/opencv-4.9.0-1.5.10-windows-x86_64.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/zxing/core/3.5.3/core-3.5.3.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/flycapture/2.13.3.31-1.5.9/flycapture-2.13.3.31-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/leptonica/1.84.1-1.5.10/leptonica-1.84.1-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/21/javafx-controls-21.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/openblas/0.3.26-1.5.10/openblas-0.3.26-1.5.10-windows-x86_64.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/21/javafx-fxml-21.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-net/commons-net/3.11.1/commons-net-3.11.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/libfreenect/0.5.7-1.5.9/libfreenect-0.5.7-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/21/javafx-controls-21-win.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/videoinput/0.200-1.5.9/videoinput-0.200-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-base/21/javafx-base-21-win.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/net/java/dev/jna/jna/5.15.0/jna-5.15.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/tinylog/tinylog-impl/2.7.0/tinylog-impl-2.7.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/github/jai-imageio/jai-imageio-core/1.4.0/jai-imageio-core-1.4.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/xerial/sqlite-jdbc/3.46.0.0/sqlite-jdbc-3.46.0.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/21/javafx-graphics-21.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/openblas/0.3.26-1.5.10/openblas-0.3.26-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/tesseract/5.3.4-1.5.10/tesseract-5.3.4-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/librealsense2/2.53.1-1.5.9/librealsense2-2.53.1-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-base/21/javafx-base-21.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/21/javafx-graphics-21-win.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/zxing/javase/3.5.3/javase-3.5.3.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/libdc1394/2.2.6-1.5.9/libdc1394-2.2.6-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/javacpp/1.5.10/javacpp-1.5.10-windows-x86_64.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-jcl/1.7.36/slf4j-jcl-1.7.36.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/artoolkitplus/2.3.1-1.5.9/artoolkitplus-2.3.1-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/ffmpeg/6.1.1-1.5.10/ffmpeg-6.1.1-1.5.10-windows-x86_64.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/librealsense/1.12.4-1.5.9/librealsense-1.12.4-1.5.9.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/javacv/1.5.10/javacv-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/javacpp/1.5.10/javacpp-1.5.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/tinylog/tinylog-api/2.7.0/tinylog-api-2.7.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/21/javafx-fxml-21-win.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/bytedeco/videoinput/0.200-1.5.9/videoinput-0.200-1.5.9-windows-x86_64.jar" path-in-jar="/" />
</root>
</artifact>
</component>

BIN
banners/WelcomeDermies.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

View File

@@ -50,6 +50,8 @@ import static org.bytedeco.opencv.global.opencv_core.CV_64F;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class SomeCodes { public class SomeCodes {
// dermiesMode = true means for Dermies Clinic, false means for Erha Clinic
public static boolean DermiesMode = false;
public final static String currentDirectory = System.getProperty("user.dir"); public final static String currentDirectory = System.getProperty("user.dir");
private static final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); private static final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
public static final Java2DFrameConverter converter = new Java2DFrameConverter(); public static final Java2DFrameConverter converter = new Java2DFrameConverter();

View File

@@ -29,7 +29,6 @@ public class ErhaAPI {
private String auth; private String auth;
private String API_URL=""; private String API_URL="";
private boolean DermiesMode = false;
private final Gson gson = new Gson(); private final Gson gson = new Gson();
@@ -41,15 +40,7 @@ public class ErhaAPI {
setProduction(isProduction); setProduction(isProduction);
} }
/**
* Create Erha API object
* @param isProduction if true will use Production URL, if false will use Staging URL
* @param dermiesMode if true will use Dermies Mode (for Dermies Clinic)
*/
public ErhaAPI(boolean isProduction, boolean dermiesMode){
setProduction(isProduction);
this.DermiesMode = dermiesMode;
}
public void setProduction(boolean 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";

View File

@@ -41,7 +41,13 @@ public class AutoCloseAlert {
private static Circle Cam5; private static Circle Cam5;
public static void init(){ public static void init(){
String f_01 = ExtractResource("/IU photoboth-01.jpg"); String f_01;
if (DermiesMode){
f_01 = ExtractResource("/WelcomeDermies.jpg");
} else {
f_01 = ExtractResource("/IU photoboth-01.jpg");
}
//System.out.println("Banner 01 extracted as file: "+f_01); //System.out.println("Banner 01 extracted as file: "+f_01);
String f_02 = ExtractResource("/IU photoboth-02.jpg"); String f_02 = ExtractResource("/IU photoboth-02.jpg");
//System.out.println("Banner 02 extracted as file: "+f_02); //System.out.println("Banner 02 extracted as file: "+f_02);
@@ -52,17 +58,20 @@ public class AutoCloseAlert {
Cam1 = new Circle(10, Color.RED); Cam1 = new Circle(10, Color.RED);
Cam2 = new Circle(10, Color.RED); Cam2 = new Circle(10, Color.RED);
Cam3 = new Circle(10, Color.RED); Cam3 = new Circle(10, Color.RED);
if (!DermiesMode){
Cam4 = new Circle(10, Color.RED); Cam4 = new Circle(10, Color.RED);
Cam5 = new Circle(10, Color.RED); Cam5 = new Circle(10, Color.RED);
} }
}
public static void ChangeCamStatus(int id, boolean active){ public static void ChangeCamStatus(int id, boolean active){
Circle x = switch (id){ Circle x = switch (id){
case 1 -> Cam1; case 1 -> Cam1;
case 2 -> Cam2; case 2 -> Cam2;
case 3 -> Cam3; case 3 -> Cam3;
case 4 -> Cam4; case 4 -> DermiesMode? null: Cam4;
case 5 -> Cam5; case 5 -> DermiesMode ? null : Cam5;
default -> null; default -> null;
}; };
if (x!=null){ if (x!=null){
@@ -236,7 +245,8 @@ public class AutoCloseAlert {
imageView.setSmooth(true); imageView.setSmooth(true);
stackPane.getChildren().add(imageView); stackPane.getChildren().add(imageView);
} }
HBox CamStatus = new HBox(30, Cam1, Cam2, Cam3, Cam4, Cam5);
HBox CamStatus = DermiesMode ? new HBox(30, Cam1, Cam2, Cam3) : new HBox(30, Cam1, Cam2, Cam3, Cam4, Cam5);
CamStatus.setMinHeight(60); CamStatus.setMinHeight(60);
CamStatus.setAlignment(Pos.CENTER); CamStatus.setAlignment(Pos.CENTER);

View File

@@ -90,8 +90,8 @@ public class CaptureView {
private final AtomicBoolean isTakingPhoto = new AtomicBoolean(false); private final AtomicBoolean isTakingPhoto = new AtomicBoolean(false);
// dermiesMode = true means for Dermies Clinic, false means for Erha Clinic
private final ErhaAPI erhaAPI = new ErhaAPI(config.isProduction(), 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;
@@ -576,7 +576,7 @@ public class CaptureView {
} }
} else { } else {
if (AutoCloseAlert.banner_01!=null){ if (AutoCloseAlert.banner_01!=null){
AutoCloseAlert.showbanner(AutoCloseAlert.banner_01,0, null); //AutoCloseAlert.showbanner(AutoCloseAlert.banner_01,0, null);
} }
} }
TakePhotoButtonChange(); TakePhotoButtonChange();
@@ -604,8 +604,10 @@ public class CaptureView {
LoadCameraDetail(cam1, 1, CameraConfigEnum.CameraConfigLeft90); LoadCameraDetail(cam1, 1, CameraConfigEnum.CameraConfigLeft90);
LoadCameraDetail(cam2, 2, CameraConfigEnum.CameraConfigLeft45); LoadCameraDetail(cam2, 2, CameraConfigEnum.CameraConfigLeft45);
LoadCameraDetail(cam3, 3, CameraConfigEnum.CameraConfigCenter); LoadCameraDetail(cam3, 3, CameraConfigEnum.CameraConfigCenter);
if (!DermiesMode){
LoadCameraDetail(cam4, 4, CameraConfigEnum.CameraConfigRight45); LoadCameraDetail(cam4, 4, CameraConfigEnum.CameraConfigRight45);
LoadCameraDetail(cam5, 5, CameraConfigEnum.CameraConfigRight90); LoadCameraDetail(cam5, 5, CameraConfigEnum.CameraConfigRight90);
}
Platform.runLater(()->{ Platform.runLater(()->{
clear(); clear();

View File

@@ -18,13 +18,12 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static Config.SomeCodes.ShowAlert; import static Config.SomeCodes.*;
import static Config.SomeCodes.config;
public class MainApplication extends Application { public class MainApplication extends Application {
final String version = "30092025-STAGING-1.0.7"; final String version = "29102025-STAGING-1.0.8";
PhotoCleaner photoCleaner; PhotoCleaner photoCleaner;
public static Map<Integer, Detectors> detectorsList = new HashMap<>(); public static Map<Integer, Detectors> detectorsList = new HashMap<>();
@@ -48,13 +47,29 @@ public class MainApplication extends Application {
String UserID = Integer.toHexString(sd.ReadUserID()) ; String UserID = Integer.toHexString(sd.ReadUserID()) ;
sd.Close(); sd.Close();
if (UserID.equals("14022025")){ if (UserID.equals("14022025") || UserID.equals("3102025")){
Logger.info("Secure Dongle UserID valid"); // 14022025 = Erha, 3102025 = Dermies
DermiesMode = !UserID.equals("14022025");
Logger.info("Secure Dongle UserID valid for "+(DermiesMode?"Dermies":"Erha"));
if (DermiesMode){
boolean needsave = false;
if (!config.getCameraRight45().isEmpty()){
System.out.println("Dermies mode, disable Camera 4");
config.SetCameraRight45("");
needsave = true;
}
if (!config.getCameraRight90().isEmpty()){
System.out.println("Dermies mode, disable Camera 5");
config.SetCameraRight90("");
needsave = true;
}
if (needsave) config.Save();
}
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml")); FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml"));
Screen screen = Screen.getPrimary(); Screen screen = Screen.getPrimary();
Rectangle2D screenbound = screen.getBounds(); Rectangle2D screenbound = screen.getBounds();
Scene scene = new Scene(fxmlLoader.load(), screenbound.getWidth(), screenbound.getHeight()); Scene scene = new Scene(fxmlLoader.load(), screenbound.getWidth(), screenbound.getHeight());
stage.setTitle("MultiCam Capture App for Dermies "+version); stage.setTitle("MultiCam Capture App for "+(DermiesMode?"Dermies ":"Erha ") + version);
stage.setScene(scene); stage.setScene(scene);
stage.setResizable(true); stage.setResizable(true);
stage.setMaximized(true); stage.setMaximized(true);

View File

@@ -9,6 +9,7 @@ import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import org.tinylog.Logger; import org.tinylog.Logger;
import static Config.SomeCodes.DermiesMode;
import static Config.SomeCodes.ValidString; import static Config.SomeCodes.ValidString;
@SuppressWarnings("unused") @SuppressWarnings("unused")
@@ -41,8 +42,9 @@ public class MainView {
@FXML @FXML
private void CaptureClick(ActionEvent event){ private void CaptureClick(ActionEvent event){
if (currentselected.equals("capture-view.fxml")) return; String fxmlfile = DermiesMode?"capture-view-dermies.fxml":"capture-view.fxml";
loadContent("capture-view.fxml"); if (currentselected.equals(fxmlfile)) return;
loadContent(fxmlfile);
} }
@FXML @FXML

View File

@@ -13,15 +13,37 @@ import static Config.SomeCodes.*;
public class SettingView { public class SettingView {
@FXML @FXML
private ComboBox<String> CameraLeft90; private Label lblCamera1;
@FXML @FXML
private ComboBox<String> CameraLeft45; private Label lblCamera2;
@FXML @FXML
private ComboBox<String> CameraCenter; private Label lblCamera3;
@FXML @FXML
private ComboBox<String> CameraRight45; private Label lblCamera4;
@FXML @FXML
private ComboBox<String> CameraRight90; private Label lblCamera5;
@FXML
private ComboBox<String> Camera1;
@FXML
private ComboBox<String> Camera2;
@FXML
private ComboBox<String> Camera3;
@FXML
private ComboBox<String> Camera4;
@FXML
private ComboBox<String> Camera5;
@FXML
private Button ApplyCamera1;
@FXML
private Button ApplyCamera2;
@FXML
private Button ApplyCamera3;
@FXML
private Button ApplyCamera4;
@FXML
private Button ApplyCamera5;
@FXML @FXML
private TextField FTPHost; private TextField FTPHost;
@@ -316,32 +338,60 @@ public class SettingView {
Platform.runLater(()->{ Platform.runLater(()->{
CameraLeft90.getItems().clear(); if (DermiesMode){
CameraLeft45.getItems().clear(); lblCamera4.setVisible(false);
CameraCenter.getItems().clear(); lblCamera5.setVisible(false);
CameraRight45.getItems().clear(); Camera4.setVisible(false);
CameraRight90.getItems().clear(); Camera5.setVisible(false);
ApplyCamera4.setVisible(false);
ApplyCamera5.setVisible(false);
Cam4BottomCrop.setVisible(false);
Cam5BottomCrop.setVisible(false);
Cam4TopCrop.setVisible(false);
Cam5TopCrop.setVisible(false);
Cam4LeftCrop.setVisible(false);
Cam5LeftCrop.setVisible(false);
Cam4RightCrop.setVisible(false);
Cam5RightCrop.setVisible(false);
}
Camera1.getItems().clear();
Camera2.getItems().clear();
Camera3.getItems().clear();
if (!DermiesMode){
Camera4.getItems().clear();
Camera5.getItems().clear();
}
Camera1.getItems().add("");
Camera2.getItems().add("");
Camera3.getItems().add("");
if (!DermiesMode){
Camera4.getItems().add("");
Camera5.getItems().add("");
}
CameraLeft90.getItems().add("");
CameraLeft45.getItems().add("");
CameraCenter.getItems().add("");
CameraRight45.getItems().add("");
CameraRight90.getItems().add("");
for(String camera: cameranames){ for(String camera: cameranames){
Logger.info("adding camera : "+camera+" to camera list"); Logger.info("adding camera : "+camera+" to camera list");
CameraLeft90.getItems().add(camera); Camera1.getItems().add(camera);
CameraLeft45.getItems().add(camera); Camera2.getItems().add(camera);
CameraCenter.getItems().add(camera); Camera3.getItems().add(camera);
CameraRight45.getItems().add(camera); if (!DermiesMode){
CameraRight90.getItems().add(camera); Camera4.getItems().add(camera);
Camera5.getItems().add(camera);
}
}
Camera1.setValue(config.getCameraLeft90());
Camera2.setValue(config.getCameraLeft45());
Camera3.setValue(config.getCameraCenter());
if (!DermiesMode){
Camera4.setValue(config.getCameraRight45());
Camera5.setValue(config.getCameraRight90());
} }
CameraLeft90.setValue(config.getCameraLeft90());
CameraLeft45.setValue(config.getCameraLeft45());
CameraCenter.setValue(config.getCameraCenter());
CameraRight45.setValue(config.getCameraRight45());
CameraRight90.setValue(config.getCameraRight90());
TextFieldSetText(FTPHost,config.getFTPHost()); TextFieldSetText(FTPHost,config.getFTPHost());
TextFieldSetText(FTPPort,config.getFTPPort()); TextFieldSetText(FTPPort,config.getFTPPort());
@@ -374,6 +424,7 @@ public class SettingView {
TextFieldSetText(Cam3BottomCrop,String.valueOf(config.getCam3BottomCrop())); TextFieldSetText(Cam3BottomCrop,String.valueOf(config.getCam3BottomCrop()));
TextFieldSetText(Cam3LeftCrop,String.valueOf(config.getCam3LeftCrop())); TextFieldSetText(Cam3LeftCrop,String.valueOf(config.getCam3LeftCrop()));
TextFieldSetText(Cam3RightCrop,String.valueOf(config.getCam3RightCrop())); TextFieldSetText(Cam3RightCrop,String.valueOf(config.getCam3RightCrop()));
if (!DermiesMode){
TextFieldSetText(Cam4TopCrop,String.valueOf(config.getCam4TopCrop())); TextFieldSetText(Cam4TopCrop,String.valueOf(config.getCam4TopCrop()));
TextFieldSetText(Cam4BottomCrop,String.valueOf(config.getCam4BottomCrop())); TextFieldSetText(Cam4BottomCrop,String.valueOf(config.getCam4BottomCrop()));
TextFieldSetText(Cam4LeftCrop,String.valueOf(config.getCam4LeftCrop())); TextFieldSetText(Cam4LeftCrop,String.valueOf(config.getCam4LeftCrop()));
@@ -382,6 +433,8 @@ public class SettingView {
TextFieldSetText(Cam5BottomCrop,String.valueOf(config.getCam5BottomCrop())); TextFieldSetText(Cam5BottomCrop,String.valueOf(config.getCam5BottomCrop()));
TextFieldSetText(Cam5LeftCrop,String.valueOf(config.getCam5LeftCrop())); TextFieldSetText(Cam5LeftCrop,String.valueOf(config.getCam5LeftCrop()));
TextFieldSetText(Cam5RightCrop,String.valueOf(config.getCam5RightCrop())); TextFieldSetText(Cam5RightCrop,String.valueOf(config.getCam5RightCrop()));
}
}); });
} }
@@ -392,27 +445,27 @@ public class SettingView {
@FXML @FXML
private void ApplyCameraLeft90(){ private void ApplyCameraLeft90(){
config.SetCameraLeft90(CameraLeft90.getValue()); config.SetCameraLeft90(Camera1.getValue());
} }
@FXML @FXML
private void ApplyCameraLeft45(){ private void ApplyCameraLeft45(){
config.SetCameraLeft45(CameraLeft45.getValue()); config.SetCameraLeft45(Camera2.getValue());
} }
@FXML @FXML
private void ApplyCameraFront(){ private void ApplyCameraFront(){
config.SetCameraCenter(CameraCenter.getValue()); config.SetCameraCenter(Camera3.getValue());
} }
@FXML @FXML
private void ApplyCameraRight45(){ private void ApplyCameraRight45(){
config.SetCameraRight45(CameraRight45.getValue()); config.SetCameraRight45(Camera4.getValue());
} }
@FXML @FXML
private void ApplyCameraRight90(){ private void ApplyCameraRight90(){
config.SetCameraRight90(CameraRight90.getValue()); config.SetCameraRight90(Camera5.getValue());
} }
@FXML @FXML

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<AnchorPane fx:id="CaptureViewAnchor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="768.0" prefWidth="1024.0" xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.co.gtc.erhacam.CaptureView">
<children>
<GridPane layoutX="147.0" layoutY="239.0" AnchorPane.bottomAnchor="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane fx:id="cam1" prefHeight="200.0" prefWidth="200.0" />
<AnchorPane fx:id="cam2" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" />
<AnchorPane fx:id="cam3" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" />
</children>
</GridPane>
<GridPane layoutX="99.0" layoutY="147.0" style="-fx-grid-lines-visible: true;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="-Infinity" minHeight="10.0" prefHeight="175.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane fx:id="controlpane" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
<padding>
<Insets top="5.0" />
</padding>
<children>
<Button fx:id="TakePhotoButton" disable="true" mnemonicParsing="false" onAction="#TakePhotos" prefHeight="175.0" prefWidth="512.0" text="Take Photo" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0">
<font>
<Font size="48.0" />
</font>
</Button>
</children></AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0">
<children>
<GridPane layoutX="68.0" layoutY="14.0" prefHeight="175.2" prefWidth="512.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="30.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<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>
<children>
<AnchorPane prefHeight="200.0" prefWidth="200.0">
<children>
<Label layoutX="31.0" layoutY="6.0" prefHeight="30.0" prefWidth="154.0" text="Nomor Barcode" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
<children>
<Label layoutX="63.0" layoutY="6.0" prefHeight="30.4" prefWidth="154.4" text="Medical Record ID" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
<children>
<Label layoutX="63.0" layoutY="5.0" prefHeight="30.4" prefWidth="154.4" text="Patient Name" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
<children>
<TextArea fx:id="barcodeData" editable="false" layoutX="-21.0" layoutY="-85.0" prefHeight="115.0" prefWidth="358.0" promptText="barcode read result" wrapText="true" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
<font>
<Font size="18.0" />
</font>
</TextArea>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children>
<TextArea fx:id="medicalRecordID" editable="false" layoutX="14.0" layoutY="-84.0" prefHeight="116.0" prefWidth="358.4" promptText="medical record ID" wrapText="true" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
<font>
<Font size="18.0" />
</font>
</TextArea>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<children>
<TextArea fx:id="PatientName" editable="false" layoutX="-21.0" layoutY="-84.0" prefHeight="116.0" prefWidth="358.4" promptText="patient name" wrapText="true" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
<font>
<Font size="18.0" />
</font>
</TextArea>
</children>
</AnchorPane>
</children>
</GridPane>
</children></AnchorPane>
</children>
</GridPane>
</children>
</AnchorPane>

View File

@@ -62,77 +62,77 @@
<children> <children>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
<children> <children>
<Label layoutX="30.0" layoutY="12.0" prefHeight="40.8" prefWidth="87.2" text="Cam 1" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" /> <Label fx:id="lblCamera1" layoutX="30.0" layoutY="12.0" prefHeight="40.8" prefWidth="87.2" text="Cam 1" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
<children> <children>
<Label layoutX="44.0" layoutY="12.0" prefHeight="40.8" prefWidth="87.2" text="Cam 2" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" /> <Label fx:id="lblCamera2" layoutX="44.0" layoutY="12.0" prefHeight="40.8" prefWidth="87.2" text="Cam 2" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3">
<children> <children>
<Label layoutX="30.0" layoutY="6.0" prefHeight="40.8" prefWidth="87.2" text="Cam 3" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" /> <Label fx:id="lblCamera3" layoutX="30.0" layoutY="6.0" prefHeight="40.8" prefWidth="87.2" text="Cam 3" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="4"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="4">
<children> <children>
<Label layoutX="24.0" layoutY="6.0" prefHeight="40.0" prefWidth="87.2" text="Cam 4" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" /> <Label fx:id="lblCamera4" layoutX="24.0" layoutY="6.0" prefHeight="40.0" prefWidth="87.2" text="Cam 4" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="5"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="5">
<children> <children>
<Label layoutX="36.0" layoutY="11.0" prefHeight="40.0" prefWidth="87.2" text="Cam 5" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" /> <Label fx:id="lblCamera5" layoutX="36.0" layoutY="11.0" prefHeight="40.0" prefWidth="87.2" text="Cam 5" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="0.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children> <children>
<ComboBox fx:id="CameraLeft90" layoutX="54.0" layoutY="8.0" prefHeight="40.8" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <ComboBox fx:id="Camera1" layoutX="54.0" layoutY="8.0" prefHeight="40.8" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<children> <children>
<ComboBox fx:id="CameraLeft45" layoutX="26.0" layoutY="14.0" prefHeight="40.8" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <ComboBox fx:id="Camera2" layoutX="26.0" layoutY="14.0" prefHeight="40.8" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
<children> <children>
<ComboBox fx:id="CameraCenter" layoutX="88.0" layoutY="8.0" prefHeight="40.8" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <ComboBox fx:id="Camera3" layoutX="88.0" layoutY="8.0" prefHeight="40.8" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="4"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="4">
<children> <children>
<ComboBox fx:id="CameraRight45" layoutX="54.0" layoutY="8.0" prefHeight="40.0" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <ComboBox fx:id="Camera4" layoutX="54.0" layoutY="8.0" prefHeight="40.0" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="5"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="5">
<children> <children>
<ComboBox fx:id="CameraRight90" layoutX="75.0" layoutY="1.0" prefHeight="40.0" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <ComboBox fx:id="Camera5" layoutX="75.0" layoutY="1.0" prefHeight="40.0" prefWidth="408.0" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="1"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="1">
<children> <children>
<Button layoutY="8.0" mnemonicParsing="false" onAction="#ApplyCameraLeft90" prefHeight="40.8" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <Button fx:id="ApplyCamera1" layoutY="8.0" mnemonicParsing="false" onAction="#ApplyCameraLeft90" prefHeight="40.8" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="2"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="2">
<children> <children>
<Button layoutX="22.0" layoutY="2.0" mnemonicParsing="false" onAction="#ApplyCameraLeft45" prefHeight="40.8" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <Button fx:id="ApplyCamera2" layoutX="22.0" layoutY="2.0" mnemonicParsing="false" onAction="#ApplyCameraLeft45" prefHeight="40.8" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="3"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="3">
<children> <children>
<Button layoutX="18.0" layoutY="2.0" mnemonicParsing="false" onAction="#ApplyCameraFront" prefHeight="40.8" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <Button fx:id="ApplyCamera3" layoutX="18.0" layoutY="2.0" mnemonicParsing="false" onAction="#ApplyCameraFront" prefHeight="40.8" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="4"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="4">
<children> <children>
<Button layoutX="22.0" layoutY="8.0" mnemonicParsing="false" onAction="#ApplyCameraRight45" prefHeight="40.0" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <Button fx:id="ApplyCamera4" layoutX="22.0" layoutY="8.0" mnemonicParsing="false" onAction="#ApplyCameraRight45" prefHeight="40.0" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="5"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="5">
<children> <children>
<Button layoutX="22.0" layoutY="8.0" mnemonicParsing="false" onAction="#ApplyCameraRight90" prefHeight="40.0" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" /> <Button fx:id="ApplyCamera5" layoutX="22.0" layoutY="8.0" mnemonicParsing="false" onAction="#ApplyCameraRight90" prefHeight="40.0" prefWidth="88.0" text="Apply" AnchorPane.bottomAnchor="2.0" AnchorPane.leftAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="6"> <AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="6">