01: /*
02: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/pdfdoctools/DocViewer.java,v 1.1 2005/04/20 21:04:37 paulby Exp $
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is Java 3D(tm) Fly Through.
11: * The Initial Developer of the Original Code is Paul Byrne.
12: * Portions created by Paul Byrne are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Paul Byrne.
16: *
17: **/
18: package org.jdesktop.j3dfly.pdfdoctools;
19:
20: import java.awt.BorderLayout;
21: import org.jdesktop.j3dfly.J3dFlyContext;
22:
23: public class DocViewer extends javax.swing.JDialog {
24:
25: private DocPanel docPanel;
26:
27: /** Creates new form DocViewer */
28: public DocViewer(java.awt.Frame parent, boolean modal,
29: J3dFlyContext context) {
30: super (parent, modal);
31: initComponents();
32:
33: docPanel = new DocPanel(context);
34: this .getContentPane().add(docPanel, BorderLayout.CENTER);
35:
36: pack();
37: }
38:
39: /** This method is called from within the constructor to
40: * initialize the form.
41: * WARNING: Do NOT modify this code. The content of this method is
42: * always regenerated by the FormEditor.
43: */
44: private void initComponents() {//GEN-BEGIN:initComponents
45: addWindowListener(new java.awt.event.WindowAdapter() {
46: public void windowClosing(java.awt.event.WindowEvent evt) {
47: closeDialog(evt);
48: }
49: });
50: }//GEN-END:initComponents
51:
52: /** Closes the dialog */
53: private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
54: setVisible(false);
55: dispose();
56: }//GEN-LAST:event_closeDialog
57:
58: // Variables declaration - do not modify//GEN-BEGIN:variables
59: // End of variables declaration//GEN-END:variables
60:
61: }
|