IScellUiApi<TControl> - Spreadsheet UI entry point

IScellUiApi<TControl> - main UI API entry point.

To create the UI control, do the following, for example:

import com.intechcore.scomponents.scell.api.init.ScellApiEntryPoint;
import com.intechcore.scomponents.scell.api.spreadsheet.IScellCoreApiFactory;
import com.intechcore.scomponents.scell.api.fx.IScellUiApi;
import com.intechcore.scomponents.scell.api.fx.IScellUiApiBuilder;
import com.intechcore.scomponents.scell.api.fx.IScellUiFxApiBuilder;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

import java.util.concurrent.CompletableFuture;

public class TestAppUi extends Application {
    @Override
    public void start(Stage primaryStage) {
        BorderPane root = new BorderPane(new Label("Initializing ..."));

        ScellApiEntryPoint.getApiResolverAsync().thenApplyAsync(resolver -> {

            IScellCoreApiFactory apiFactory = resolver.resolve(IScellCoreApiFactory.class);

            IScellUiApiBuilder<Node> uiBuilder = resolver.resolve(IScellUiFxApiBuilder.class);

            IScellUiApi<Node> uiApi = uiBuilder.create(CompletableFuture.supplyAsync(apiFactory::createNew));
            return uiApi.getControl();
        }, Platform::runLater).whenCompleteAsync((node, throwable) -> {
            if (throwable != null) {
                node = new Label("Failed to init: " + throwable.getCause().getMessage());
            }
            root.setCenter(node);
        }, Platform::runLater);

        primaryStage.setScene(new Scene(root, 800, 600));
        primaryStage.show();
    }
}

There are several services to manage the UI control at runtime:

Next (IUiContentManager - Changing current UI content)

See also

IUiSelectionManager - Current selection manager

IUiControlSettings - Changing UI at runtime