- fix reset position on add station
- replace fields y, z - implement jump to next field on commit field
This commit is contained in:
@@ -68,7 +68,15 @@ public class VendorEditorController {
|
||||
items.getSelectionModel().setCellSelectionEnabled(true);
|
||||
buy.setCellFactory(TextFieldCell.forTableColumn(new PriceStringConverter()));
|
||||
sell.setCellFactory(TextFieldCell.forTableColumn(new PriceStringConverter()));
|
||||
actSave.disabledProperty().bind(x.wrongProperty().or(y.wrongProperty().or(z.wrongProperty())));
|
||||
fillItems();
|
||||
name.setOnAction((v)->x.requestFocus());
|
||||
x.setOnAction((v) -> z.requestFocus());
|
||||
z.setOnAction((v) -> y.requestFocus());
|
||||
y.setOnAction((v) -> {
|
||||
items.requestFocus();
|
||||
items.getSelectionModel().select(0, buy);
|
||||
});
|
||||
}
|
||||
|
||||
public Action showDialog(Parent parent, Parent content, VendorModel vendor){
|
||||
@@ -96,6 +104,9 @@ public class VendorEditorController {
|
||||
|
||||
private void reset(){
|
||||
name.setText("");
|
||||
x.setValue(0);
|
||||
y.setValue(0);
|
||||
z.setValue(0);
|
||||
items.getItems().forEach(FakeOffer::reset);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
<HBox GridPane.rowIndex="1" GridPane.columnIndex="1" spacing="4" alignment="BASELINE_CENTER">
|
||||
<Label text="x:" HBox.margin="$hbox_margin" />
|
||||
<NumberField fx:id="x" prefWidth="60" />
|
||||
<Label text="y:" HBox.margin="$hbox_margin" />
|
||||
<NumberField fx:id="y" prefWidth="60" />
|
||||
<Label text="z:" HBox.margin="$hbox_margin" />
|
||||
<NumberField fx:id="z" prefWidth="60" />
|
||||
<Label text="y:" HBox.margin="$hbox_margin" />
|
||||
<NumberField fx:id="y" prefWidth="60" />
|
||||
</HBox>
|
||||
<VBox GridPane.rowIndex="2" alignment="CENTER" spacing="10">
|
||||
<Button prefWidth="30" onAction="#up"><graphic><Glyph text="FontAwesome|ARROW_UP"/></graphic></Button>
|
||||
|
||||
Reference in New Issue
Block a user