Altova StyleVision 2024 Enterprise Edition

The code listing below show how ActiveX controls can be created. The constructors will create the Java wrapper objects. Adding these Canvas-derived objects to a panel or to a frame will trigger the creation of the wrapped ActiveX object.

 

 

01   /**

02    * StyleVision manager control - always needed

03    */

04   public static StyleVisionControl         styleVisionControl = null;

05

06   /**

07    * StyleVisionDocument editing control

08    */

09   public static StyleVisionControlDocument     styleVisionDocument = null;

10

11   /**

12    * Tool windows - StyleVision place-holder controls

13    */

14   private static StyleVisionControlPlaceHolder   styleVisionProjectToolWindow = null;

15   private static StyleVisionControlPlaceHolder   styleVisionDesignToolWindow = null;

16   private static StyleVisionControlPlaceHolder   styleVisionSchemaTreeToolWindow = null;

17

18   // Create the StyleVision ActiveX controls. First should be StyleVisionControl
    // determining that we want to place document controls and place-holder

19   // controls individually. It gives us full control over the menu, as well.

20      styleVisionControl = new StyleVisionControl(
       ICActiveXIntegrationLevel.ICActiveXIntegrationOnDocumentLevel.getValue() );

21

22      styleVisionDocument = new StyleVisionControlDocument();

23      frame.add( styleVisionDocument, BorderLayout.CENTER );

24      

25

26   // Create a project window and open the sample project in it

27      styleVisionProjectToolWindow = new StyleVisionPlaceHolder(
       StyleVisionControlPlaceholderWindow.StyleVisionControlProjectWindowToolWnd.getValue() );

28      styleVisionProjectToolWindow.setPreferredSize( new Dimension( 200, 200 ) );

 

© 2017-2023 Altova GmbH