File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed
aima-gui/src/main/java/aima/gui/fx/views Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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. */
Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments