ILayeredWindow and IWindow3D objects can be used for most visualization needs. In some cases, a custom window component needs to be implemented. In this example, we will create a window with the content "Hello World", and open this window upon the activation of a menu item.
This tutorial relies on the com.interactive.intviewerapi.windows.AbstractViewerWindow class.
The window created will be visible inside the desktop area. For a window along the desktop area, follow this other tutorial.
The implementation of a window requires one INT module that is part of the INTViewer platform:
This requires the import of java.util.List.
This requires the import of javax.swing.JLabel and java.awt.FlowLayout.
You can download the DemoViewerWindow.java file from the attachments at the bottom this page.
Create a class "DemoViewerWindowAction" in "com.mycompany.myviewer.mydemoviewerwindow" with the following implementation:
A detailed walkthrough to create Action classes and reference them in a layer.xml file is available.
You can download the layer.xml file from the attachments at the bottom this page.