Skip to content

Commit 9a7d469

Browse files
ddamkeddamke
authored andcommitted
code review changes
1 parent 358bc75 commit 9a7d469

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/main/java/de/doubleslash/keeptime/view/ManageProjectController.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ private void initialize() {
7676
validateTextAlert.visibleProperty().bind(formValidProperty.not());
7777

7878
Platform.runLater(() ->{
79-
if(nameTextField.getText().isBlank()){
8079
nameTextField.requestFocus();
81-
}else {
82-
descriptionTextArea.requestFocus();
83-
}
80+
nameTextField.end();
8481
});
8582
}
8683

src/main/resources/layouts/manage-project.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
<Label text="IsWork:" GridPane.rowIndex="5" />
3434
<Label text="SortIndex:" GridPane.rowIndex="6" />
3535
<TextField fx:id="nameTextField" GridPane.columnIndex="1" />
36+
<TextArea fx:id="descriptionTextArea" prefHeight="120.0" prefWidth="300.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
3637
<ColorPicker fx:id="textFillColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="4" />
3738
<CheckBox fx:id="isWorkCheckBox" mnemonicParsing="false" selected="true" GridPane.columnIndex="1" GridPane.rowIndex="5" />
3839
<Spinner fx:id="sortIndexSpinner" GridPane.columnIndex="1" GridPane.rowIndex="6" />
39-
<TextArea fx:id="descriptionTextArea" prefHeight="120.0" prefWidth="300.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
4040
<VBox alignment="CENTER_LEFT" GridPane.rowIndex="2">
4141
<children>
4242
<Label text="Description:" />

src/main/resources/layouts/manage-work.fxml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<?import javafx.scene.layout.RowConstraints?>
1212
<?import javafx.scene.text.Font?>
1313

14-
<GridPane fx:id="grid" hgap="5.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="214.0" prefWidth="371.0" vgap="5.0" xmlns="http://javafx.com/javafx/8.0.202-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.ManageWorkController">
14+
<GridPane fx:id="grid" hgap="5.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="214.0" prefWidth="371.0" vgap="5.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.ManageWorkController">
1515
<columnConstraints>
1616
<ColumnConstraints hgrow="SOMETIMES" />
1717
<ColumnConstraints hgrow="SOMETIMES" maxWidth="200.0" minWidth="100.0" prefWidth="150.0" />
@@ -23,6 +23,7 @@
2323
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
2424
<RowConstraints vgrow="SOMETIMES" />
2525
<RowConstraints vgrow="SOMETIMES" />
26+
<RowConstraints />
2627
</rowConstraints>
2728
<children>
2829
<Label text="Start">
@@ -31,12 +32,14 @@
3132
</font>
3233
</Label>
3334
<DatePicker fx:id="startDatePicker" GridPane.columnIndex="1" />
35+
<Spinner fx:id="startTimeSpinner" editable="true" GridPane.columnIndex="2" />
3436
<Label text="End" GridPane.rowIndex="1">
3537
<font>
3638
<Font name="Open Sans Regular" size="12.0" />
3739
</font>
3840
</Label>
3941
<DatePicker fx:id="endDatePicker" GridPane.columnIndex="1" GridPane.rowIndex="1" />
42+
<Spinner fx:id="endTimeSpinner" editable="true" GridPane.columnIndex="2" GridPane.rowIndex="1" />
4043
<Label text="Project" GridPane.rowIndex="3">
4144
<font>
4245
<Font name="Open Sans Regular" size="12.0" />
@@ -48,8 +51,6 @@
4851
<Font name="Open Sans Regular" size="12.0" />
4952
</font>
5053
</Label>
51-
<Spinner fx:id="startTimeSpinner" editable="true" GridPane.columnIndex="2" />
52-
<Spinner fx:id="endTimeSpinner" editable="true" GridPane.columnIndex="2" GridPane.rowIndex="1" />
5354
<TextArea fx:id="noteTextArea" prefHeight="200.0" prefWidth="200.0" wrapText="true" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="4" />
5455
<Label text="Changing the times may result in overlapping times!" textFill="#ffa100" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2">
5556
<font>

0 commit comments

Comments
 (0)