Extract viewer from ViewerApp
Source file: SimpleViewer
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.
- If you are working with SWT window system instead of AWT, you'll need to cast the return value from
getViewingComponentto 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.