Altova XMLSpy 2025 Professional Edition

Im unten gezeigten Code sehen Sie wie ActiveX Controls erstellt werden. Die Konstruktoren erstellen die Java Wrapper-Objekte. Durch Hinzufügen dieser aus Canvas stammenden Objekte zu einem Bereich oder Rahmen wird die Erstellung des in Wrapper verpackten ActiveX-Objekts ausgelöst.

 

 

01 /**

02  * XMLSpy manager control - always needed

03  */

04   public static XMLSpyControl         xmlSpyControl = null;

05

06 /**

07  * XMLSpy document editing control

08  */

09   public static XMLSpyControlDocument     xmlSpyDocument = null;

10

11 /**

12  * Tool windows - XMLSpy place-holder controls

13  */

14   private static XMLSpyControlPlaceHolder   xmlSpyProjectToolWindow = null;

15   private static XMLSpyControlPlaceHolder   xmlSpyXpathToolWindow = null;

16   private static XMLSpyControlPlaceHolder   xmlSpyEHAttributeToolWindow = null;

17

18 // Create the XMLSpy ActiveX control; the parameter determines that we want

19 // to place document controls and place-holder controls individually.

20 // It gives us full control over the menu, as well.

21     xmlSpyControl = new XMLSpyControl(
      ICActiveXIntegrationLevel.ICActiveXIntegrationOnDocumentLevel.getValue() );

22     xmlSpyDocument = new XMLSpyControlDocument();

23     xmlSpyDocument.setPreferredSize( new Dimension ( 640, 480 ) );

24

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

26     xmlSpyProjectToolWindow = new XMLSpyControlPlaceHolder(

27     XMLSpyControlPlaceholderWindow.XMLSpyControlProjectWindowToolWnd.getValue() );

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

29     xmlSpyXpathToolWindow = new XMLSpyControlPlaceHolder(
      XMLSpyControlPlaceholderWindow.XMLSpyControlXPathDialogToolWnd.getValue() );

30     xmlSpyEHAttributeToolWindow = new XMLSpyControlPlaceHolder(
      XMLSpyControlPlaceholderWindow.XMLSpyControlEntryHelperTopToolWnd.getValue() );

31

32     frame.add( xmlSpyControl, BorderLayout.NORTH );

33     frame.add( xmlSpyDocument, BorderLayout.CENTER );

34     southPanel.add( xmlSpyProjectToolWindow );

35     southPanel.add( xmlSpyXpathToolWindow );

36     southPanel.add( xmlSpyEHAttributeToolWindow );

).

© 2018-2024 Altova GmbH