Skip to content

Commit eb9989a

Browse files
committed
updated other dialogs
1 parent c4e4473 commit eb9989a

18 files changed

+181
-108
lines changed

resources/ui/css/custom_ids.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@
634634
-fx-pref-width: -fx-min-width;
635635
-fx-max-width: -fx-min-width;
636636
-fx-alignment: center-right;
637+
-fx-padding: 0 2 0 0;
637638
}
638639

639640
#CreateSkyDialogComboBox {
@@ -646,7 +647,7 @@
646647
}
647648

648649
#CreateSkyDialogSpinner {
649-
-fx-min-height: 24;
650+
-fx-min-height: 22;
650651
-fx-pref-height: -fx-min-height;
651652
-fx-max-height: -fx-min-height;
652653
-fx-min-width: 70;

src/com/ss/editor/ui/component/asset/tree/context/menu/action/NewFileByCreatorAction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
import javafx.scene.control.MenuItem;
99

1010
/**
11-
* Реализация действия по созданию файла.
11+
* The action for creating a new file.
1212
*
13-
* @author Ronn
13+
* @author JavaSaBr
1414
*/
1515
public class NewFileByCreatorAction extends MenuItem {
1616

1717
private static final FXEventManager FX_EVENT_MANAGER = FXEventManager.getInstance();
1818

1919
/**
20-
* Элемент действия.
20+
* The node element.
2121
*/
2222
private final ResourceElement element;
2323

2424
/**
25-
* Описание создателя файлов.
25+
* The creator description.
2626
*/
2727
private final FileCreatorDescription description;
2828

@@ -34,7 +34,7 @@ public NewFileByCreatorAction(final ResourceElement element, final FileCreatorDe
3434
}
3535

3636
/**
37-
* Процесс создания файла.
37+
* Handle creating.
3838
*/
3939
private void processCreate() {
4040

src/com/ss/editor/ui/component/creator/impl/AbstractFileCreator.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import com.ss.editor.ui.event.FXEventManager;
2323
import com.ss.editor.ui.scene.EditorFXScene;
2424

25+
import org.jetbrains.annotations.NotNull;
26+
2527
import java.awt.Point;
2628
import java.nio.file.Files;
2729
import java.nio.file.Path;
@@ -124,7 +126,7 @@ private Path getInitFile() {
124126
}
125127

126128
@Override
127-
protected void createActions(final VBox root) {
129+
protected void createActions(@NotNull final VBox root) {
128130
super.createActions(root);
129131

130132
final HBox container = new HBox();
@@ -142,6 +144,9 @@ protected void createActions(final VBox root) {
142144
FXUtils.addToPane(cancelButton, container);
143145
FXUtils.addToPane(container, root);
144146

147+
FXUtils.addClassTo(okButton, CSSClasses.SPECIAL_FONT_16);
148+
FXUtils.addClassTo(cancelButton, CSSClasses.SPECIAL_FONT_16);
149+
145150
HBox.setMargin(okButton, OK_BUTTON_OFFSET);
146151
HBox.setMargin(cancelButton, CANCEL_BUTTON_OFFSET);
147152
}
@@ -198,7 +203,7 @@ protected void notifyFileCreated(final Path createdFile, boolean needSelect) {
198203
}
199204

200205
@Override
201-
protected void createContent(final VBox root) {
206+
protected void createContent(@NotNull final VBox root) {
202207
super.createContent(root);
203208

204209
final HBox container = new HBox();
@@ -262,8 +267,8 @@ protected void createSettings(final VBox root) {
262267
FXUtils.addToPane(fileNameField, fileNameContainer);
263268
FXUtils.addToPane(fileNameContainer, root);
264269

265-
FXUtils.addClassTo(fileNameLabel, CSSClasses.MAIN_FONT_13);
266-
FXUtils.addClassTo(fileNameField, CSSClasses.MAIN_FONT_13);
270+
FXUtils.addClassTo(fileNameLabel, CSSClasses.SPECIAL_FONT_13);
271+
FXUtils.addClassTo(fileNameField, CSSClasses.SPECIAL_FONT_13);
267272

268273
VBox.setMargin(fileNameContainer, FILE_NAME_CONTAINER_OFFSET);
269274
}

src/com/ss/editor/ui/component/creator/impl/EmptyFileCreator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
import com.ss.editor.ui.component.creator.FileCreatorDescription;
55
import com.ss.editor.util.EditorUtil;
66

7+
import org.jetbrains.annotations.NotNull;
8+
79
import java.io.IOException;
810
import java.nio.file.Files;
911
import java.nio.file.Path;
1012

1113
import rlib.util.StringUtils;
1214

1315
/**
14-
* Реализация создателя новых пустых файлов.
16+
* The creator for creating an empty file.
1517
*
16-
* @author Ronn
18+
* @author JavaSaBr
1719
*/
1820
public class EmptyFileCreator extends AbstractFileCreator {
1921

@@ -27,6 +29,7 @@ public class EmptyFileCreator extends AbstractFileCreator {
2729
public EmptyFileCreator() {
2830
}
2931

32+
@NotNull
3033
@Override
3134
protected String getTitleText() {
3235
return Messages.EMPTY_FILE_CREATOR_TITLE;

src/com/ss/editor/ui/component/creator/impl/EmptyModelCreator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
import com.ss.editor.Messages;
77
import com.ss.editor.ui.component.creator.FileCreatorDescription;
88

9+
import org.jetbrains.annotations.NotNull;
10+
911
import java.io.IOException;
1012
import java.io.OutputStream;
1113
import java.nio.file.Files;
1214
import java.nio.file.Path;
1315

1416
/**
15-
* Реализация создателя новых пустых моделей.
17+
* The creator for creating an empty model.
1618
*
17-
* @author Ronn
19+
* @author JavaSaBr
1820
*/
1921
public class EmptyModelCreator extends AbstractFileCreator {
2022

@@ -28,6 +30,7 @@ public class EmptyModelCreator extends AbstractFileCreator {
2830
public EmptyModelCreator() {
2931
}
3032

33+
@NotNull
3134
@Override
3235
protected String getTitleText() {
3336
return Messages.EMPTY_MODEL_CREATOR_TITLE;

src/com/ss/editor/ui/component/creator/impl/FolderCreator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import com.ss.editor.ui.component.creator.FileCreatorDescription;
55
import com.ss.editor.util.EditorUtil;
66

7+
import org.jetbrains.annotations.NotNull;
8+
79
import java.io.IOException;
810
import java.nio.file.Files;
911
import java.nio.file.Path;
@@ -27,6 +29,7 @@ public class FolderCreator extends AbstractFileCreator {
2729
public FolderCreator() {
2830
}
2931

32+
@NotNull
3033
@Override
3134
protected String getTitleText() {
3235
return Messages.FOLDER_CREATOR_TITLE;

src/com/ss/editor/ui/component/creator/impl/MaterialFileCreator.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import com.ss.editor.ui.util.AutoCompleteComboBoxListener;
1414
import com.ss.editor.util.EditorUtil;
1515

16+
import org.jetbrains.annotations.NotNull;
17+
1618
import java.io.IOException;
1719
import java.io.PrintWriter;
1820
import java.nio.file.Files;
@@ -32,9 +34,9 @@
3234
import rlib.util.array.Array;
3335

3436
/**
35-
* Реализация создателя новых материалов.
37+
* The creator for creating a new material.
3638
*
37-
* @author Ronn
39+
* @author JavaSaBr
3840
*/
3941
public class MaterialFileCreator extends AbstractFileCreator {
4042

@@ -47,18 +49,19 @@ public class MaterialFileCreator extends AbstractFileCreator {
4749
}
4850

4951
/**
50-
* Список доступных типов материалов.
52+
* The list of available definitions.
5153
*/
5254
private Array<String> definitions;
5355

5456
/**
55-
* Список с выбором типов материалов.
57+
* The combo box.
5658
*/
5759
private ComboBox<String> materialTypeComboBox;
5860

5961
public MaterialFileCreator() {
6062
}
6163

64+
@NotNull
6265
@Override
6366
protected String getTitleText() {
6467
return Messages.MATERIAL_FILE_CREATOR_TITLE;
@@ -70,7 +73,7 @@ protected String getFileExtension() {
7073
}
7174

7275
/**
73-
* @return список с выбором типов материалов.
76+
* @return the combo box.
7477
*/
7578
public ComboBox<String> getMaterialTypeComboBox() {
7679
return materialTypeComboBox;
@@ -116,6 +119,8 @@ protected void createSettings(final VBox root) {
116119
FXUtils.addToPane(materialTypeContainer, root);
117120

118121
FXUtils.addClassTo(materialTypeComboBox, CSSClasses.TRANSPARENT_COMBO_BOX);
122+
FXUtils.addClassTo(materialTypeLabel, CSSClasses.SPECIAL_FONT_13);
123+
FXUtils.addClassTo(materialTypeComboBox, CSSClasses.SPECIAL_FONT_13);
119124

120125
VBox.setMargin(materialTypeContainer, FILE_NAME_CONTAINER_OFFSET);
121126
}

src/com/ss/editor/ui/component/creator/impl/PostFilterViewFileCreator.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
package com.ss.editor.ui.component.creator.impl;
22

3+
import static com.ss.editor.Messages.POST_FILTER_VIEW_FILE_CREATOR_FILE_DESCRIPTION;
4+
import static com.ss.editor.Messages.POST_FILTER_VIEW_FILE_CREATOR_TITLE;
5+
36
import com.ss.editor.FileExtensions;
47
import com.ss.editor.ui.component.creator.FileCreatorDescription;
58
import com.ss.editor.util.EditorUtil;
69

10+
import org.jetbrains.annotations.NotNull;
11+
712
import java.io.IOException;
813
import java.io.PrintWriter;
914
import java.nio.file.Files;
1015
import java.nio.file.Path;
1116

12-
import static com.ss.editor.Messages.POST_FILTER_VIEW_FILE_CREATOR_FILE_DESCRIPTION;
13-
import static com.ss.editor.Messages.POST_FILTER_VIEW_FILE_CREATOR_TITLE;
14-
1517
/**
1618
* Реализация создателя новых файлов для PostFilterView.
1719
*
@@ -29,6 +31,7 @@ public class PostFilterViewFileCreator extends AbstractFileCreator {
2931
public PostFilterViewFileCreator() {
3032
}
3133

34+
@NotNull
3235
@Override
3336
protected String getTitleText() {
3437
return POST_FILTER_VIEW_FILE_CREATOR_TITLE;

src/com/ss/editor/ui/control/model/tree/dialog/AbstractNodeDialog.java

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,55 @@
11
package com.ss.editor.ui.control.model.tree.dialog;
22

33
import com.ss.editor.Messages;
4+
import com.ss.editor.ui.css.CSSClasses;
45
import com.ss.editor.ui.css.CSSIds;
56
import com.ss.editor.ui.dialog.EditorDialog;
67

8+
import org.jetbrains.annotations.NotNull;
9+
710
import javafx.geometry.Insets;
811
import javafx.scene.control.Button;
12+
import javafx.scene.input.KeyCode;
13+
import javafx.scene.input.KeyEvent;
914
import javafx.scene.layout.HBox;
1015
import javafx.scene.layout.VBox;
1116
import rlib.ui.util.FXUtils;
1217

1318
/**
14-
* Базовая реализация диалога для операций над узлами.
19+
* The base implementation of the dialog for working with node elements.
1520
*
16-
* @author Ronn
21+
* @author JavaSaBr
1722
*/
1823
public abstract class AbstractNodeDialog extends EditorDialog {
1924

2025
protected static final Insets OK_BUTTON_OFFSET = new Insets(0, 4, 0, 0);
2126
protected static final Insets CANCEL_BUTTON_OFFSET = new Insets(0, 15, 0, 0);
2227

2328
/**
24-
* Кнопка ок.
29+
* The ok button.
2530
*/
2631
private Button okButton;
2732

2833
public AbstractNodeDialog() {
2934
}
3035

36+
@Override
37+
protected void processKey(@NotNull final KeyEvent event) {
38+
super.processKey(event);
39+
if (event.getCode() == KeyCode.ENTER && !okButton.isDisable()) {
40+
processOk();
41+
}
42+
}
43+
3144
/**
32-
* @return кнопка ок.
45+
* @return the ok button.
3346
*/
3447
protected Button getOkButton() {
3548
return okButton;
3649
}
3750

3851
@Override
39-
protected void createActions(final VBox root) {
52+
protected void createActions(@NotNull final VBox root) {
4053
super.createActions(root);
4154

4255
final HBox container = new HBox();
@@ -54,6 +67,9 @@ protected void createActions(final VBox root) {
5467
FXUtils.addToPane(cancelButton, container);
5568
FXUtils.addToPane(container, root);
5669

70+
FXUtils.addClassTo(okButton, CSSClasses.SPECIAL_FONT_16);
71+
FXUtils.addClassTo(cancelButton, CSSClasses.SPECIAL_FONT_16);
72+
5773
HBox.setMargin(okButton, OK_BUTTON_OFFSET);
5874
HBox.setMargin(cancelButton, CANCEL_BUTTON_OFFSET);
5975
}

src/com/ss/editor/ui/control/model/tree/dialog/sky/ChooseTextureControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected void createComponents() {
126126
FXUtils.addToPane(addButton, this);
127127
FXUtils.addToPane(removeButton, this);
128128

129-
FXUtils.addClassTo(textureLabel, CSSClasses.MAIN_FONT_13);
129+
FXUtils.addClassTo(textureLabel, CSSClasses.SPECIAL_FONT_13);
130130
FXUtils.addClassTo(addButton, CSSClasses.TOOLBAR_BUTTON);
131131
FXUtils.addClassTo(removeButton, CSSClasses.TOOLBAR_BUTTON);
132132

0 commit comments

Comments
 (0)