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 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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue