Compacted the amount and currency fields.
This commit is contained in:
parent
39794e36a2
commit
eefbb1c09b
|
@ -4,6 +4,7 @@ import com.andrewlalis.perfin.view.component.validation.ValidationDecorator;
|
|||
import com.andrewlalis.perfin.view.component.validation.ValidationResult;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -55,6 +56,9 @@ public class FieldSubtextDecorator implements ValidationDecorator {
|
|||
errorLabel.getStyleClass().addAll("small-font", "negative-color-text-fill");
|
||||
errorLabel.setWrapText(true);
|
||||
VBox validationContainer = new VBox(node, errorLabel);
|
||||
if (trueParent instanceof HBox) {
|
||||
HBox.setHgrow(validationContainer, HBox.getHgrow(node));
|
||||
}
|
||||
validationContainer.setUserData(WRAP_KEY);
|
||||
trueParent.getChildren().add(idx, validationContainer);
|
||||
return errorLabel;
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
<TextField fx:id="timestampField" styleClass="mono-font"/>
|
||||
|
||||
<Label text="Amount" labelFor="${amountField}" styleClass="bold-text"/>
|
||||
<TextField fx:id="amountField" styleClass="mono-font"/>
|
||||
|
||||
<Label text="Currency" labelFor="${currencyChoiceBox}" styleClass="bold-text"/>
|
||||
<HBox styleClass="std-spacing">
|
||||
<TextField fx:id="amountField" styleClass="mono-font" HBox.hgrow="ALWAYS"/>
|
||||
<ChoiceBox fx:id="currencyChoiceBox"/>
|
||||
</HBox>
|
||||
|
||||
<Label text="Description" labelFor="${descriptionField}" styleClass="bold-text"/>
|
||||
<TextArea
|
||||
|
|
Loading…
Reference in New Issue