Skip to content

Commit b7c8ba0

Browse files
committed
Minor renaming.
1 parent e97ec11 commit b7c8ba0

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

aima-gui/src/main/java/aima/gui/fx/views/MapEnvironmentViewCtrl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public class MapEnvironmentViewCtrl extends SimpleEnvironmentViewCtrl {
3131
protected String goal;
3232
protected List<String> track;
3333

34-
public MapEnvironmentViewCtrl(StackPane parent) {
35-
super(parent);
34+
public MapEnvironmentViewCtrl(StackPane viewRoot) {
35+
super(viewRoot);
3636
envStateView = new Pane();
3737
splitPane.getItems().add(0, envStateView);
3838
splitPane.setDividerPosition(0, 0.7);

aima-gui/src/main/java/aima/gui/fx/views/NQueensViewCtrl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public class NQueensViewCtrl {
2828
* Adds a grid pane to the provided pane and creates a controller class
2929
* instance which is responsible for queen symbol positioning on the grid.
3030
*/
31-
public NQueensViewCtrl(StackPane pane) {
32-
pane.getChildren().add(gridPane);
33-
pane.setAlignment(Pos.BOTTOM_CENTER);
34-
gridPane.maxWidthProperty().bind(Bindings.min(pane.widthProperty(), pane.heightProperty()).subtract(20));
35-
gridPane.maxHeightProperty().bind(Bindings.min(pane.widthProperty(), pane.heightProperty()).subtract(10));
31+
public NQueensViewCtrl(StackPane viewRoot) {
32+
viewRoot.getChildren().add(gridPane);
33+
viewRoot.setAlignment(Pos.BOTTOM_CENTER);
34+
gridPane.maxWidthProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(20));
35+
gridPane.maxHeightProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(10));
3636
}
3737

3838
/** Updates the view. */

aima-gui/src/main/java/aima/gui/fx/views/SimpleEnvironmentViewCtrl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public class SimpleEnvironmentViewCtrl implements EnvironmentView {
2828
* an environment view which prints messages about environment changes on
2929
* the text area.
3030
*/
31-
public SimpleEnvironmentViewCtrl(StackPane parent) {
31+
public SimpleEnvironmentViewCtrl(StackPane viewRoot) {
3232
splitPane = new SplitPane();
3333
textArea = new TextArea();
3434
textArea.setMinWidth(0.0);
3535
splitPane.getItems().add(textArea);
36-
parent.getChildren().add(splitPane);
36+
viewRoot.getChildren().add(splitPane);
3737
}
3838

3939
public void initialize(Environment env) {

aima-gui/src/main/java/aima/gui/fx/views/VacuumEnvironmentViewCtrl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public class VacuumEnvironmentViewCtrl extends SimpleEnvironmentViewCtrl {
3232
protected List<String> locations;
3333
private Agent agentInAction;
3434

35-
public VacuumEnvironmentViewCtrl(StackPane parent) {
36-
super(parent);
35+
public VacuumEnvironmentViewCtrl(StackPane viewRoot) {
36+
super(viewRoot);
3737
envStateView = new GridPane();
3838
envStateView.setHgap(20);
3939
RowConstraints rowCons = new RowConstraints();

0 commit comments

Comments
 (0)