IScellUiApi<TControl> - Spreadsheet UI entry point

IScellUiApi<TControl> - main UI API entry point.

To create the UI control, should make the following, for example:

import com.intechcore.scomponents.scell.api.IScellApiResolver;
import com.intechcore.scomponents.scell.api.ScellApiProvider;
import com.intechcore.scomponents.scell.api.ui.fx.IScellUiApi;
import com.intechcore.scomponents.scell.api.ui.fx.IScellUiApiProvider;
import com.intechcore.scomponents.scell.api.ui.fx.IScellUiFxApiProvider;
import com.intechcore.scomponents.scell.api.spreadsheet.ISpreadsheetApiProvider;

import javafx.application.Application;
import javafx.scene.image.Image;
import javafx.stage.Stage;

import java.io.IOException;
import java.io.InputStream;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;

public class App extends Application {

    private static final CompletableFuture<Optional<IScellApiResolver>> apiResolverFuture
            = ScellApiProvider.getApiResolverAsync();
    
    private Optional<IScellApiResolver> apiResolver;

    @Override
    public void start(Stage stage) {
        //...
        Pane someRootPane = new Pane();
        // ...
        this.apiResolver.ifPresent(resolver -> {
            // Resolve APIs providers
            ISpreadsheetApiProvider coreProvider = resolver.resolve(ISpreadsheetApiProvider.class);
            IScellUiApiProvider<Node> uiFxApiProvider = resolver.resolve(IScellUiFxApiProvider.class);

            CompletableFuture<IWorkbook> workbook = coreProvider.createNew(); // SCell core API entry point
            IScellUiApi<Node> uiApi = uiFxApiProvider.create(workbook);       // SCell UI API entry point

            Node scellJavaFxNode = uiApi.createControl();                    // SCell UI control
            
            someRootPane.getChildren().add(scellJavaFxNode);                 // Adding the SCell UI control
            //...
        });
        // ...
    }    
    
    @Override
    public void init() throws Exception {
        this.apiResolver = apiResolverFuture.join();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

To manage the UI control at runtime, there are several services:

Next (IUiContentManager - Changing current UI content)

See also

IUiSelectionManager - Current selection manager

IUiControlSettings - Changing UI at runtime