Commit 0c3dbd3a authored by legoc's avatar legoc
Browse files

Set current value to axes when opening the Axis Properties

parent 472985fd
......@@ -185,6 +185,14 @@ public class EditorMenuBar extends MenuBar {
private final SimpleStringProperty type;
private final SimpleDoubleProperty currentValue;
private AxisTableEntry(String axisName, String componentName, String type, double value) {
super();
this.axisName = new SimpleStringProperty(axisName);
this.componentName = new SimpleStringProperty(componentName);
this.type = new SimpleStringProperty(type);
this.currentValue = new SimpleDoubleProperty(value);
}
private AxisTableEntry(String axisName, String componentName, String type) {
super();
this.axisName = new SimpleStringProperty(axisName);
......@@ -1074,9 +1082,11 @@ public class EditorMenuBar extends MenuBar {
}
GridPane scenePane = new GridPane();
scenePane.setPadding(new Insets(5));
Scene displayScene = new Scene(scenePane);
Stage displayStage = new Stage(StageStyle.UTILITY);
displayStage.setWidth(1000);
displayStage.setWidth(750);
displayStage.setTitle(displayAxisItem.getText());
displayStage.setScene(displayScene);
displayStage.initOwner(Nomad3DEditor.getInstance().getStage());
......@@ -1098,7 +1108,7 @@ public class EditorMenuBar extends MenuBar {
typeColumn.setCellValueFactory(new PropertyValueFactory<AxisTableEntry, String>("type"));
TableColumn currentValueColumn = new TableColumn("Current Value");
currentValueColumn.setMinWidth(100);
currentValueColumn.setMinWidth(200);
currentValueColumn.setCellValueFactory(new PropertyValueFactory<AxisTableEntry, Double>("currentValue"));
currentValueColumn.setCellFactory(TextFieldTableCell.forTableColumn(new CustomDoubleStringConverter()));
......@@ -1138,7 +1148,7 @@ public class EditorMenuBar extends MenuBar {
// Add the defined axes.
List<AxisInfo> axisInfos = Nomad3DEditor.getInstance().getModel().getAxisInfos();
for (AxisInfo info : axisInfos) {
data.add(new AxisTableEntry(info.getAxisName(), info.getComponentName(), info.getType().toString()));
data.add(new AxisTableEntry(info.getAxisName(), info.getComponentName(), info.getType().toString(), info.getValue()));
}
// Add the other axes.
......
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