package moe.tristan.easyfxml.util;

import javafx.scene.Node;
import javafx.scene.layout.Pane;

import java.util.concurrent.CompletionStage;

/**
 * Utility class that provides convenience methods over {@link Pane}-based components.
 */
public final class Panes {

    private Panes() {
    }

    /**
     * Sets as the sole content of a pane another Node. This is supposed to work as having a first Pane being the wanted
     * display zone and the second Node the displayed content.
     *
     * @param container The container defining the displayable zone, as a {@link Pane}.
     * @param content   The content to display
     * @param <T>       The subtype if necessary of the container
     *
     * @return A {@link CompletionStage} to have monitoring over the state of the asynchronous operation
     */
    public static <T extends Pane> CompletionStage<T> setContent(final T container, final Node content) {
        return FxAsync.doOnFxThread(container, _container -> {
            _container.getChildren().clear();
            _container.getChildren().add(content);
        });
    }
}

@@ -500,25 +500,22 @@
  @param 
-container
+parent
  The con
@@ -877,25 +877,22 @@
 final T 
-container
+parent
 , final 
@@ -947,29 +947,26 @@
 ead(
-container, _container
+parent, parentNode
  -%3E 
@@ -975,34 +975,34 @@
             
-_container
+parentNode
 .getChildren
@@ -1029,18 +1029,18 @@
     
-_container
+parentNode
 .get

Improve variable naming.