Add Transaction Properties #15

Merged
andrewlalis merged 18 commits from transaction-properties into main 2024-02-04 04:31:04 +00:00
2 changed files with 8 additions and 4 deletions
Showing only changes of commit eefbb1c09b - Show all commits

View File

@ -4,6 +4,7 @@ import com.andrewlalis.perfin.view.component.validation.ValidationDecorator;
import com.andrewlalis.perfin.view.component.validation.ValidationResult; import com.andrewlalis.perfin.view.component.validation.ValidationResult;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -55,6 +56,9 @@ public class FieldSubtextDecorator implements ValidationDecorator {
errorLabel.getStyleClass().addAll("small-font", "negative-color-text-fill"); errorLabel.getStyleClass().addAll("small-font", "negative-color-text-fill");
errorLabel.setWrapText(true); errorLabel.setWrapText(true);
VBox validationContainer = new VBox(node, errorLabel); VBox validationContainer = new VBox(node, errorLabel);
if (trueParent instanceof HBox) {
HBox.setHgrow(validationContainer, HBox.getHgrow(node));
}
validationContainer.setUserData(WRAP_KEY); validationContainer.setUserData(WRAP_KEY);
trueParent.getChildren().add(idx, validationContainer); trueParent.getChildren().add(idx, validationContainer);
return errorLabel; return errorLabel;

View File

@ -27,10 +27,10 @@
<TextField fx:id="timestampField" styleClass="mono-font"/> <TextField fx:id="timestampField" styleClass="mono-font"/>
<Label text="Amount" labelFor="${amountField}" styleClass="bold-text"/> <Label text="Amount" labelFor="${amountField}" styleClass="bold-text"/>
<TextField fx:id="amountField" styleClass="mono-font"/> <HBox styleClass="std-spacing">
<TextField fx:id="amountField" styleClass="mono-font" HBox.hgrow="ALWAYS"/>
<Label text="Currency" labelFor="${currencyChoiceBox}" styleClass="bold-text"/>
<ChoiceBox fx:id="currencyChoiceBox"/> <ChoiceBox fx:id="currencyChoiceBox"/>
</HBox>
<Label text="Description" labelFor="${descriptionField}" styleClass="bold-text"/> <Label text="Description" labelFor="${descriptionField}" styleClass="bold-text"/>
<TextArea <TextArea