Source Code Cross Referenced for StereoControlPlugin.java in  » 6.0-JDK-Modules » java-3d » org » jdesktop » j3dfly » plugins » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » org.jdesktop.j3dfly.plugins 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/plugins/StereoControlPlugin.java,v 1.1 2005/04/20 21:04:44 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.plugins;
019:
020:        import org.jdesktop.j3dfly.J3dFlyContext;
021:
022:        /**
023:         * Controls for 3D Stereo
024:         *
025:         * @author  Paul Byrne
026:         * @version $Revision: 1.1 $
027:         */
028:        public class StereoControlPlugin extends J3dFlyPlugin {
029:
030:            private java.lang.ref.SoftReference panelReference = null;
031:
032:            /** Creates new form PluginTemplate */
033:            public StereoControlPlugin() {
034:                super ();
035:            }
036:
037:            /** This method is called from within the constructor to
038:             * initialize the form.
039:             * WARNING: Do NOT modify this code. The content of this method is
040:             * always regenerated by the Form Editor.
041:             */
042:            private void initComponents() {//GEN-BEGIN:initComponents
043:                menuBar = new javax.swing.JMenuBar();
044:                pluginMenu = new javax.swing.JMenu();
045:                stereoMI = new javax.swing.JMenuItem();
046:
047:                pluginMenu.setText("Menu");
048:                stereoMI.setText("Stereo Controls...");
049:                stereoMI.addActionListener(new java.awt.event.ActionListener() {
050:                    public void actionPerformed(java.awt.event.ActionEvent evt) {
051:                        stereoMIActionPerformed(evt);
052:                    }
053:                });
054:
055:                pluginMenu.add(stereoMI);
056:                menuBar.add(pluginMenu);
057:
058:            }//GEN-END:initComponents
059:
060:            private void stereoMIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stereoMIActionPerformed
061:                // Add your handling code here:
062:                showControls();
063:            }//GEN-LAST:event_stereoMIActionPerformed
064:
065:            /**
066:             * Get the title of the plugin
067:             */
068:            public String getPluginTitle() {
069:                // Change this to return the name of the plugin
070:                return "Stereo Controls";
071:            }
072:
073:            /**
074:             * Returns the control panel for this plugin, or null if there
075:             * is no control panel
076:             */
077:            public javax.swing.JPanel getControlPanel() {
078:                if (panelReference == null || panelReference.get() == null)
079:                    panelReference = new java.lang.ref.SoftReference(
080:                            new StereoControlPanel(j3dflyContext));
081:
082:                return (javax.swing.JPanel) panelReference.get();
083:            }
084:
085:            /** 
086:             * Install the plugin and add it's menu item to the menu
087:             */
088:            public void installPlugin(PluginPreference pluginPref,
089:                    J3dFlyContext j3dflyContext) {
090:                super .installPlugin(pluginPref, j3dflyContext);
091:                initComponents();
092:
093:                menuBar.removeAll();
094:                menuBar = null;
095:                pluginMenu.removeAll();
096:                pluginMenu = null;
097:                menu = stereoMI;
098:
099:                if (pluginPref.isInstallInMenu())
100:                    getMenu("Plugins").add(menu);
101:                if (!j3dflyContext.getUniverse().getViewer().getCanvas3Ds()[0]
102:                        .getStereoAvailable())
103:                    menu.setEnabled(false);
104:            }
105:
106:            /**
107:             * Uninstall this plugin
108:             */
109:            public void uninstallPlugin() {
110:                super .uninstallPlugin();
111:                if (pluginPref.isInstallInMenu())
112:                    getMenu("Plugins").remove(menu);
113:                menu = null;
114:            }
115:
116:            /**
117:             * Returns the class of the plugin preference.
118:             *
119:             * Plugins that require more preference information should provide a
120:             * subclass of PluginPrefernece that contains all the extra preference
121:             * data. This class must be Serializable.
122:             */
123:            public Class getPluginPreferenceClass() {
124:                return StereoControlPluginPreference.class;
125:            }
126:
127:            public static class StereoControlPluginPreference extends
128:                    PluginPreference {
129:                public StereoControlPluginPreference() {
130:                    super ();
131:                }
132:
133:                public StereoControlPluginPreference(boolean enabled,
134:                        boolean installed) {
135:                    super (enabled, installed);
136:                }
137:
138:                public J3dFlyPlugin instantiatePlugin() {
139:                    return new StereoControlPlugin();
140:                }
141:
142:                /**
143:                 * Return a description of this plugin
144:                 */
145:                public String getDescription() {
146:                    return "Controls for adjusting stereo features";
147:                }
148:
149:                /**
150:                 * Return the name of the Plugin for this prefernece.
151:                 * This is the name that will appear in the list of plugins
152:                 */
153:                public String getName() {
154:                    return "Stereo Controls";
155:                }
156:
157:            }
158:
159:            // Variables declaration - do not modify//GEN-BEGIN:variables
160:            private javax.swing.JMenuBar menuBar;
161:            private javax.swing.JMenu pluginMenu;
162:            private javax.swing.JMenuItem stereoMI;
163:            // End of variables declaration//GEN-END:variables
164:
165:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.