01: /*
02: * $Header: /cvs/j3dfly/J3dEditor/src/org/jdesktop/j3dedit/scenegrapheditor/NavigationControls.java,v 1.1 2005/04/20 22:20:47 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 the Java 3D(tm) Scene Graph Editor.
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.j3dedit.scenegrapheditor;
19:
20: import javax.media.j3d.BranchGroup;
21: import javax.media.j3d.TransformGroup;
22: import javax.media.j3d.Canvas3D;
23:
24: /**
25: * @author Paul Byrne
26: * @version 1.5, 01/18/02
27: */
28: public class NavigationControls extends javax.swing.JFrame {
29:
30: /** Creates new form NavigationControls */
31: public NavigationControls(Canvas3D canvas, BranchGroup toolRoot,
32: TransformGroup tg) {
33: initComponents();
34: pack();
35: navigationControlPanel.setTransformGroup(toolRoot, tg);
36: navigationControlPanel.setCanvas3D(canvas);
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: navigationControlPanel = new org.jdesktop.j3dedit.scenegrapheditor.NavigationControlPanel();
46: panel1 = new java.awt.Panel();
47: closeB = new java.awt.Button();
48: setTitle("Navigation Controls");
49: addWindowListener(new java.awt.event.WindowAdapter() {
50: public void windowClosing(java.awt.event.WindowEvent evt) {
51: exitForm(evt);
52: }
53: });
54:
55: getContentPane().add(navigationControlPanel,
56: java.awt.BorderLayout.CENTER);
57:
58: closeB.setLabel("Close");
59: closeB.addActionListener(new java.awt.event.ActionListener() {
60: public void actionPerformed(java.awt.event.ActionEvent evt) {
61: closeBActionPerformed(evt);
62: }
63: });
64: panel1.add(closeB);
65:
66: getContentPane().add(panel1, java.awt.BorderLayout.SOUTH);
67:
68: }//GEN-END:initComponents
69:
70: private void closeBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeBActionPerformed
71: // Add your handling code here:
72: hide();
73: }//GEN-LAST:event_closeBActionPerformed
74:
75: /** Exit the Application */
76: private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
77: System.exit(0);
78: }//GEN-LAST:event_exitForm
79:
80: // Variables declaration - do not modify//GEN-BEGIN:variables
81: private org.jdesktop.j3dedit.scenegrapheditor.NavigationControlPanel navigationControlPanel;
82: private java.awt.Panel panel1;
83: private java.awt.Button closeB;
84: // End of variables declaration//GEN-END:variables
85:
86: }
|