acrolinx/acrolinx-sidebar-demo-java


Sample code demonstrating how to use the Acrolinx sidebar in Java projects

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.acrolinx:acrolinx-sidebar-demo-java:0.10.0'
	}
	dependencies {
		implementation("com.github.acrolinx:acrolinx-sidebar-demo-java:0.10.0")
	}
	<dependency>
	    <groupId>com.github.acrolinx</groupId>
	    <artifactId>acrolinx-sidebar-demo-java</artifactId>
	    <version>0.10.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.acrolinx" % "acrolinx-sidebar-demo-java" % "0.10.0"
        
        

                            
    :dependencies [[com.github.acrolinx/acrolinx-sidebar-demo-java "0.10.0"]]
        
        

Readme


Acrolinx Java Sidebar Demo

This is a showcase for integrating the Acrolinx Sidebar into different Java UI framework-based applications (JFX, Swing, and SWT).

See: Build With Acrolinx

The Acrolinx Sidebar

The Acrolinx Sidebar is designed to show up beside the window where you edit your content. You use it for checking, reviewing, and correcting your content. To get an impression what the Sidebar looks like in existing integrations, have a look at Sidebar Quick Start.

Prerequisites

Please contact Acrolinx SDK support for consulting and getting your integration certified.

This sample works with a test license on an internal Acrolinx URL. This license is only meant for demonstration and developing purposes. Once you finished your integration, you'll have to get a license for your integration from Acrolinx.

Before you start developing your own integration, you might benefit from looking into:

Getting Started

Build the Project

  1. You need Java 11 to build this project.
  2. This project uses Gradle. To build this project with the Gradle Wrapper, execute the following command:
./gradlew build

on an UNIX system, or

gradlew build

on a Windows computer.

Run the Samples

Build the project first, then run:

JavaFX

./gradlew sidebar-demo-jfx:run

Swing

./gradlew sidebar-demo-swing:run

SWT

./gradlew sidebar-demo-swt:run

Building Integrations Based on Swing or JFX

This project uses the Gradle plugin for JavaFX. Please have a look at the OpenJFX documentation.

CORS

To be able to connect to Acrolinx, you might have to enable CORS on the Java VM:

java -Dsun.net.http.allowRestrictedHeaders=true ...

Or via code:

System.setProperty("sun.net.http.allowRestrictedHeaders", "true");

Cross-Origin Resource Sharing, must be enabled on the Acrolinx Platform as well.

References