Commit 38eceeb5 authored by Ivan Dages's avatar Ivan Dages
Browse files

little fixes

parent 50a7bad0
......@@ -245,6 +245,7 @@ public class EditorMenuBar extends MenuBar {
}
});
Button okButton = new Button("OK");
okButton.setDefaultButton(true);
okButton.setOnAction(okEvent -> {
selectedAxis.setMethod(Axis.Method.ADDED);
Nomad3DEditor.getInstance().getAxisBuilder().stop(selectedComponent);
......@@ -254,6 +255,7 @@ public class EditorMenuBar extends MenuBar {
addStage.close();
});
Button cancelButton = new Button("Cancel");
cancelButton.setCancelButton(true);
cancelButton.setOnAction(cancelEvent -> {
Nomad3DEditor.getInstance().getAxisBuilder().stop(modified);
selectedComponent.setAxis(axisInit);
......@@ -294,7 +296,7 @@ public class EditorMenuBar extends MenuBar {
Scene calibrateScene = new Scene(scenePane);
Stage calibrateStage = new Stage(StageStyle.UTILITY);
calibrateStage.setTitle(addAxisItem.getText());
calibrateStage.setTitle(calibrateAxisItem.getText());
calibrateStage.setScene(calibrateScene);
calibrateStage.initOwner(Nomad3DEditor.getInstance().getStage());
......@@ -366,6 +368,7 @@ public class EditorMenuBar extends MenuBar {
GridPane.setMargin(buttonsPane, new Insets(10));
Button okButton = new Button("OK");
okButton.setDefaultButton(true);
okButton.setOnAction(okEvent -> {
calibrateStage.close();
valueThread.interrupt();
......@@ -382,6 +385,7 @@ public class EditorMenuBar extends MenuBar {
selectedAxis.move(valueInit - selectedAxis.getValue());
});
Button cancelButton = new Button("Cancel");
cancelButton.setCancelButton(true);
cancelButton.setOnAction(cancelEvent -> {
resetButton.getOnAction().handle(null);
okButton.getOnAction().handle(null);
......@@ -494,7 +498,6 @@ public class EditorMenuBar extends MenuBar {
return o1.getName().compareTo(o2.getName());
}
));
controllersList.requestFocus();
String unFocusedSearch = "Search...";
TextField searchField = new TextField(unFocusedSearch);
......@@ -565,6 +568,7 @@ public class EditorMenuBar extends MenuBar {
scenePane.addRow(2, selectButton, cancelButton);
GridPane.setMargin(scenePane, new Insets(10));
controllersList.requestFocus();
linkStage.show();
});
......@@ -620,6 +624,7 @@ public class EditorMenuBar extends MenuBar {
GridPane.setMargin(buttonsPane, new Insets(10));
Button modifyButton = new Button("Modify");
modifyButton.setDefaultButton(true);
buttonsPane.addColumn(0, modifyButton);
modifyButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
......@@ -639,6 +644,7 @@ public class EditorMenuBar extends MenuBar {
}
});
Button cancelButton = new Button("Cancel");
cancelButton.setCancelButton(true);
cancelButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
......@@ -728,6 +734,7 @@ public class EditorMenuBar extends MenuBar {
GridPane.setMargin(buttonsPane, new Insets(10));
Button modifyButton = new Button("Save");
modifyButton.setDefaultButton(true);
buttonsPane.addColumn(0, modifyButton);
modifyButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
......@@ -738,6 +745,7 @@ public class EditorMenuBar extends MenuBar {
}
});
Button cancelButton = new Button("Cancel");
cancelButton.setCancelButton(true);
cancelButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment