From: Debayan Sutradhar Date: Thu, 03 Dec 2020 01:27:47 +0530 Subject: work --- work --- --- 'a/pom.xml' +++ b/pom.xml @@ -43,11 +43,6 @@ 11 11 - 1.9.4 - 2.7 - - 1.7.30 - 11.5.0 11.5.0 @@ -59,29 +54,6 @@ - commons-beanutils - commons-beanutils - ${CommonsBeanUtilsVersion} - - - - org.apache.commons - commons-configuration2 - ${CommonsConfigurationVersion} - - - - org.slf4j - slf4j-api - ${SL4JVersion} - - - - org.slf4j - slf4j-log4j12 - ${SL4JVersion} - - org.kordamp.ikonli ikonli-fontawesome5-pack ${IkonliFA5PackVersion} --- 'a/src/main/java/com/StreamPi/Util/FormHelper/HBoxInputBox.java' +++ b/src/main/java/com/StreamPi/Util/FormHelper/HBoxInputBox.java @@ -10,9 +10,9 @@ import javafx.scene.layout.Region; public class HBoxInputBox extends HBox { private TextField textField; - public HBoxInputBox(String labelText, TextField textField, CheckBox enablerCheckBox) + public HBoxInputBox(String labelText, TextField textField, int prefWidth, CheckBox enablerCheckBox) { - textField.setPrefWidth(100); + textField.setPrefWidth(prefWidth); Label label = new Label(labelText); @@ -29,11 +29,22 @@ public class HBoxInputBox extends HBox { this.textField = textField; } + public HBoxInputBox(String labelText, TextField textField, CheckBox enablerCheckBox) + { + this(labelText, textField, 100, enablerCheckBox); + } + public HBoxInputBox(String labelText, TextField textField) { - this(labelText, textField, null); + this(labelText, textField, 100, null); } + public HBoxInputBox(String labelText, TextField textField, int prefWidth) + { + this(labelText, textField, prefWidth, null); + } + + public TextField getTextField() { return textField; --- 'a/src/main/java/com/StreamPi/Util/FormHelper/HBoxInputBoxWithFileChooser.java' +++ b/src/main/java/com/StreamPi/Util/FormHelper/HBoxInputBoxWithFileChooser.java @@ -17,17 +17,13 @@ import java.io.File; public class HBoxInputBoxWithFileChooser extends HBox { public HBoxInputBoxWithFileChooser(String labelText, TextField textField, CheckBox enablerCheckBox, FileChooser.ExtensionFilter extensionFilter) { - HBoxInputBox hBoxInputBox = new HBoxInputBox(labelText, textField); + textField.setDisable(true); + HBoxInputBox hBoxInputBox = new HBoxInputBox(labelText, textField, 300); setHgrow(hBoxInputBox, Priority.ALWAYS); getChildren().addAll(hBoxInputBox); setSpacing(5.0); - TextField tf = hBoxInputBox.getTextField(); - tf.setPrefWidth(300); - tf.setDisable(true); - - Button button = new Button(); FontIcon fontIcon = new FontIcon("far-folder"); //fontIcon.setIconColor(Paint.valueOf(iconColorHex)); --- 'a/src/main/java/module-info.java' +++ b/src/main/java/module-info.java @@ -1,6 +1,4 @@ module com.StreamPi.Util { - requires org.apache.commons.configuration2; - requires org.slf4j; requires org.kordamp.ikonli.javafx; requires org.kordamp.ikonli.fontawesome5;