How to Add SUniText Component into Project

Updated: Jun 18

This article describes step by step instruction how to add SUniText as a library in the context of an external project:

1. First of all, it needs to collect the project delivery packages and unzip archives somewhere in your file system. It contains two modules - sunitext and sunitext-ui and they are named as the version number of the snapshot and the revision number and date:



2. Then you need to create a new project or use an existing one (in my case this is a new JavaFX project) and navigate to the Project Structure (F4), if you use IntelliJ IDEA. Then Modules → Dependencies and click the plus button to import JAR files from previously collected archives. In the drop-down list select JARs or directories and select the directory above with the archives described above. NOTE: for sunitext the location of the jar's files should be root_folder/sunitext-toolkit and for sunitext-ui - root_folder/sunitext-ui_modules/lib.

3. After that you will see two libraries in External libraries section.

4. This topic describe adding three buttons - Run SUniText application, Save and Open file)

5. To create an instance of ISUniTextEditor, you need to make a simple invocation of the SUniTextEditorImpl constructor, and then call init() method. Or you can use a custom implementation if you want.

public void init() {
 editorController = new SUniTextEditorImpl();

6. Then, by clicking the start button (built-in), an instance of the DemoWindow object is created, which takes editorController as a constructor parameter and calls the startEditor() method. If you set true, it means that control window should be running as well.

void builtIn() {
 DemoWindow window = new DemoWindow(editorController);
* if you need to change the classloader you can use setClassLoaderType(ClassLoaderType classLoaderType) method. (There is support for JAVA_DEFAULT and OSGI)

7. Similarly, we control the opening and saving, using methods of editorController 

editorController.openFile(File file);


editorController.saveFileAs(File file);

You can call other functions of the class in the same way SUniTextEditorImpl which will be reflected in the behavior of the application window.

Recent Posts

See All

Scell Technical Description

Scell spreadsheet is a set of Java 8 code libraries. The libraries are distributed as an embedded jar archives and allowed under proprietary license: /*************************************************

Intechcore GmbH

Raiffeisenallee 16, 82041 Oberhaching by Munich-Area, Germany

Mo-Fr: 8:00-18:00
Sa, Su: Closed