01: /*
02: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/doctools/DocViewer.java,v 1.1 2005/04/20 21:04:24 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.doctools;
19:
20: import org.jdesktop.j3dfly.J3dFlyContext;
21: import java.awt.BorderLayout;
22: import org.jdesktop.j3dfly.event.FileLoadEvent;
23:
24: public class DocViewer extends javax.swing.JDialog {
25:
26: private DocPanel docPanel;
27:
28: /** Creates new form DocViewer */
29: public DocViewer(java.awt.Frame parent, boolean modal,
30: J3dFlyContext context) {
31: super (parent, modal);
32: initComponents();
33:
34: docPanel = new DocPanel(context);
35: this .getContentPane().add(docPanel, BorderLayout.CENTER);
36:
37: if (parent != null)
38: this .setLocation(parent.getX() + parent.getWidth(), 0);
39:
40: pack();
41: }
42:
43: /** This method is called from within the constructor to
44: * initialize the form.
45: * WARNING: Do NOT modify this code. The content of this method is
46: * always regenerated by the FormEditor.
47: */
48: private void initComponents() {//GEN-BEGIN:initComponents
49: addWindowListener(new java.awt.event.WindowAdapter() {
50: public void windowClosing(java.awt.event.WindowEvent evt) {
51: closeDialog(evt);
52: }
53: });
54: }//GEN-END:initComponents
55:
56: /** Closes the dialog */
57: private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
58: setVisible(false);
59: dispose();
60: }//GEN-LAST:event_closeDialog
61:
62: // Variables declaration - do not modify//GEN-BEGIN:variables
63: // End of variables declaration//GEN-END:variables
64:
65: }
|