001: /*
002: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/ControlPanel.java,v 1.1 2005/04/20 21:04:20 paulby Exp $
003: *
004: * Sun Public License Notice
005: *
006: * The contents of this file are subject to the Sun Public License Version
007: * 1.0 (the "License"). You may not use this file except in compliance with
008: * the License. A copy of the License is available at http://www.sun.com/
009: *
010: * The Original Code is Java 3D(tm) Fly Through.
011: * The Initial Developer of the Original Code is Paul Byrne.
012: * Portions created by Paul Byrne are Copyright (C) 2002.
013: * All Rights Reserved.
014: *
015: * Contributor(s): Paul Byrne.
016: *
017: **/
018: package org.jdesktop.j3dfly;
019:
020: import javax.swing.JComboBox;
021: import javax.swing.JPanel;
022: import java.util.Iterator;
023:
024: import org.jdesktop.j3dfly.plugins.J3dFlyPlugin;
025:
026: /**
027: *
028: * @author paulby
029: * @version $Revision: 1.1 $
030: */
031: public class ControlPanel extends javax.swing.JPanel {
032:
033: /** Creates new form ControlPanel */
034: public ControlPanel(J3dFlyController controller) {
035: initComponents();
036:
037: /*
038: Iterator it = controller.getPlugins();
039: while( it.hasNext() ) {
040: J3dFlyPlugin plugin = (J3dFlyPlugin)it.next();
041: JPanel p = plugin.getControlPanel();
042: if (p!=null)
043: pluginTabs.addTab( plugin.getPluginTitle(), p );
044: }
045: **/
046: }
047:
048: /** This method is called from within the constructor to
049: * initialize the form.
050: * WARNING: Do NOT modify this code. The content of this method is
051: * always regenerated by the FormEditor.
052: */
053: private void initComponents() {//GEN-BEGIN:initComponents
054: java.awt.GridBagConstraints gridBagConstraints;
055:
056: pluginTabs = new javax.swing.JTabbedPane();
057: jPanel2 = new javax.swing.JPanel();
058: jButton1 = new javax.swing.JButton();
059: jButton2 = new javax.swing.JButton();
060: jButton3 = new javax.swing.JButton();
061: jButton4 = new javax.swing.JButton();
062: jPanel3 = new javax.swing.JPanel();
063: jLabel1 = new javax.swing.JLabel();
064: jScrollPane1 = new javax.swing.JScrollPane();
065: jTextField1 = new javax.swing.JTextField();
066: jButton5 = new javax.swing.JButton();
067: jButton6 = new javax.swing.JButton();
068: jButton7 = new javax.swing.JButton();
069:
070: setLayout(new java.awt.BorderLayout());
071:
072: jPanel2.setLayout(new java.awt.GridBagLayout());
073:
074: jPanel2.setBorder(new javax.swing.border.TitledBorder(
075: new javax.swing.border.EtchedBorder(), "Geometry"));
076: jButton1.setText("Load...");
077: jButton1.setToolTipText("Load a new Scene");
078: gridBagConstraints = new java.awt.GridBagConstraints();
079: gridBagConstraints.gridx = 0;
080: gridBagConstraints.gridy = 1;
081: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
082: jPanel2.add(jButton1, gridBagConstraints);
083:
084: jButton2.setText("Stats...");
085: jButton2.setToolTipText("Geometry and performance statistics");
086: gridBagConstraints = new java.awt.GridBagConstraints();
087: gridBagConstraints.gridx = 0;
088: gridBagConstraints.gridy = 2;
089: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
090: jPanel2.add(jButton2, gridBagConstraints);
091:
092: jButton3.setText("Compile");
093: gridBagConstraints = new java.awt.GridBagConstraints();
094: gridBagConstraints.gridx = 0;
095: gridBagConstraints.gridy = 3;
096: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
097: jPanel2.add(jButton3, gridBagConstraints);
098:
099: jButton4.setText("Save...");
100: jButton4
101: .setToolTipText("Output the scene graph to a file using the SceneGraphIO utility.");
102: gridBagConstraints = new java.awt.GridBagConstraints();
103: gridBagConstraints.gridx = 1;
104: gridBagConstraints.gridy = 2;
105: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
106: jPanel2.add(jButton4, gridBagConstraints);
107:
108: jPanel3.setLayout(new java.awt.BorderLayout());
109:
110: jLabel1.setText("File :");
111: jPanel3.add(jLabel1, java.awt.BorderLayout.WEST);
112:
113: jTextField1.setPreferredSize(new java.awt.Dimension(98, 21));
114: jScrollPane1.setViewportView(jTextField1);
115:
116: jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER);
117:
118: gridBagConstraints = new java.awt.GridBagConstraints();
119: gridBagConstraints.gridwidth = 2;
120: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
121: jPanel2.add(jPanel3, gridBagConstraints);
122:
123: jButton5.setText("Clear");
124: jButton5.setToolTipText("Clear existing geometry");
125: gridBagConstraints = new java.awt.GridBagConstraints();
126: gridBagConstraints.gridx = 1;
127: gridBagConstraints.gridy = 1;
128: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
129: jPanel2.add(jButton5, gridBagConstraints);
130:
131: jButton6.setText("Configure Loaders...");
132: jButton6
133: .setToolTipText("Configure which loaders are used for each file format");
134: gridBagConstraints = new java.awt.GridBagConstraints();
135: gridBagConstraints.gridx = 0;
136: gridBagConstraints.gridy = 4;
137: gridBagConstraints.gridwidth = 2;
138: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
139: jPanel2.add(jButton6, gridBagConstraints);
140:
141: jButton7.setText("Stripify");
142: jButton7.setToolTipText("Stripify TriangleArrays");
143: gridBagConstraints = new java.awt.GridBagConstraints();
144: gridBagConstraints.gridx = 1;
145: gridBagConstraints.gridy = 3;
146: jPanel2.add(jButton7, gridBagConstraints);
147:
148: pluginTabs.addTab("geometryPanel", null, jPanel2, "");
149:
150: add(pluginTabs, java.awt.BorderLayout.CENTER);
151:
152: }//GEN-END:initComponents
153:
154: // Variables declaration - do not modify//GEN-BEGIN:variables
155: private javax.swing.JButton jButton7;
156: private javax.swing.JButton jButton6;
157: private javax.swing.JButton jButton5;
158: private javax.swing.JPanel jPanel3;
159: private javax.swing.JButton jButton4;
160: private javax.swing.JPanel jPanel2;
161: private javax.swing.JButton jButton3;
162: private javax.swing.JButton jButton2;
163: private javax.swing.JButton jButton1;
164: private javax.swing.JScrollPane jScrollPane1;
165: private javax.swing.JTabbedPane pluginTabs;
166: private javax.swing.JTextField jTextField1;
167: private javax.swing.JLabel jLabel1;
168: // End of variables declaration//GEN-END:variables
169:
170: }
|