Extract viewer from ViewerApp

From JReality Wiki
Jump to: navigation, search

Source file: SimpleViewer

JavaDoc: JRViewer


Run as Java webstart


For many purposes, the JRViewer class will satisfy your viewing needs. However, there may be situations where you wish to pack an instance of Viewer in your own application. This example shows how you can go about doing this by extracting a Viewer from an instance of JRViewer.


Notes:

  • If you are working with SWT window system instead of AWT, you'll need to cast the return value from getViewingComponent to the corresponding class.
  • The Viewer coming from the JRViewer constructor used in this example has some default tools, lights, and other features installed. If you don't want these, see how to create a viewer from scratch.


Previous: Developer Tutorial Developer Tutorial: Contents Next: Create a standalone viewer