Altova StyleVision 2023 Enterprise Edition

StyleVision ActiveX components can be accessed from Java code. Java integration is provided by the libraries listed below. These libraries are available in the folder <ApplicationFolder>\Examples\JavaAPI of your StyleVision installation, after you have installed both StyleVision and the StyleVision Integration Package (see also Prerequisites).

 

AltovaAutomation.dll: a JNI wrapper for Altova automation servers (in case of the 32-bit installation of StyleVision)

AltovaAutomation_x64.dll: a JNI wrapper for Altova automation servers (in case of the 64-bit installation of StyleVision)

AltovaAutomation.jar: Java classes to access Altova automation servers

StyleVisionActiveX.jar: Java classes that wrap the StyleVision ActiveX interface

StyleVisionActiveX_JavaDoc.zip: a Javadoc file containing help documentation for the Java interface

 

Note:In order to use the Java ActiveX integration, the .dll and .jar files must be included in the Java class search path.

 

Example Java project

An example Java project is supplied with your product installation. You can test the Java project and modify and use it as you like. For more details, see Example Java Project.

 

Rules for mapping the ActiveX Control names to Java

For the documentation of ActiveX controls, see Object Reference. Note that the object naming conventions are slightly different in Java compared to other languages. Namely, the rules for mapping between the ActiveX controls and the Java wrapper are as follows:

 

Classes and class names
For every component of the StyleVision ActiveX interface a Java class exists with the name of the component.

 

Method names
Method names on the Java interface are the same as used on the COM interfaces but start with a small letter to conform to Java naming conventions. To access COM properties, Java methods that prefix the property name with get and set can be used. If a property does not support write-access, no setter method is available. Example: For the IntegrationLevel property of the StyleVisionControl, the Java methods getIntegrationLevel and setIntegrationLevel are available. 

 

Enumerations
For every enumeration defined in the ActiveX interface, a Java enumeration is defined with the same name and values.

 

Events and event handlers
For every interface in the automation interface that supports events, a Java interface with the same name plus 'Event' is available. To simplify the overloading of single events, a Java class with default implementations for all events is provided. The name of this Java class is the name of the event interface plus 'DefaultHandler'. For example:

StyleVisionControl: Java class to access the application

StyleVisionControlEvents: Events interface for the StyleVisionControl

StyleVisionControlEventsDefaultHandler: Default handler for StyleVisionControlEvents

 

Exceptions to mapping rules

There are some exceptions to the rules listed above. These are listed below:

 

Interface

Java name

StyleVisionControlDocument, method New

newDocument

AuthenticView, method Goto

gotoElement

AuthenticRange, method Goto

gotoElement

AuthenticRange, method Clone

cloneRange

 

This section

This section shows how some basic StyleVision ActiveX functionality can be accessed from Java code. It is organized into the following sub-sections:

 

Example Java Project

Creating the ActiveX Controls

Loading Data in the Controls

Basic Event Handling

Menus

UI Update Event Handling

Creating a StyleVision Node Tree

© 2017-2023 Altova GmbH