Source Code Cross Referenced for J3dFlyContext.java in  » 6.0-JDK-Modules » java-3d » org » jdesktop » j3dfly » 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 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/J3dFlyContext.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.media.j3d.VirtualUniverse;
021:        import com.sun.j3d.utils.universe.SimpleUniverse;
022:        import org.jdesktop.j3dfly.utils.developmenttools.DevelopmentLocale;
023:        import org.jdesktop.j3dfly.event.EventProcessor;
024:        import org.jdesktop.j3dfly.namecontrol.NameControl;
025:        import org.jdesktop.j3dfly.plugins.PluginPreferenceControl;
026:        import org.jdesktop.j3dfly.J3dFly;
027:
028:        import java.util.ArrayList;
029:        import javax.swing.JMenuBar;
030:        import javax.swing.JPanel;
031:
032:        /**
033:         * This object incapsulates all the unique objects required to render and
034:         * manipulate a universe
035:         *
036:         * @author Paul Byrne
037:         * @version $Revision: 1.1 $
038:         */
039:        public class J3dFlyContext {
040:
041:            //protected DevelopmentLocale locale=null;
042:            protected SimpleUniverse universe = null;
043:            protected NameControl nameControl = null;
044:            protected EventProcessor eventProcessor = null;
045:            protected PluginPreferenceControl pluginPrefControl = null;
046:            protected J3dFly j3dFly = null;
047:            protected ArrayList locales = new ArrayList();
048:            protected JMenuBar mainMenuBar = null;
049:            protected JPanel toolBarPanel = null;
050:
051:            protected J3dFlyContext() {
052:            }
053:
054:            /** Creates new J3dFlyContext */
055:            public J3dFlyContext(DevelopmentLocale locale, J3dFly j3dFly) {
056:                this .j3dFly = j3dFly;
057:                this .mainMenuBar = j3dFly.getMainMenuBar();
058:                this .toolBarPanel = j3dFly.getToolBarPanel();
059:
060:                locales.add(locale);
061:
062:                // If check is a hack for the interposer.
063:                // TODO - Rearchitect 
064:                if (locale.getVirtualUniverse() instanceof  SimpleUniverse)
065:                    this .universe = (SimpleUniverse) locale
066:                            .getVirtualUniverse();
067:                else
068:                    this .universe = null;
069:            }
070:
071:            public SimpleUniverse getUniverse() {
072:                return universe;
073:            }
074:
075:            /**
076:             * Used to set the universe when the interposer is being used
077:             */
078:            void setUniverse(SimpleUniverse universe) {
079:                this .universe = universe;
080:            }
081:
082:            /**
083:             * Returns the first locale.
084:             *
085:             * @deprecated use getLocale( index )
086:             */
087:            public DevelopmentLocale getLocale() {
088:                return (DevelopmentLocale) locales.get(0);
089:            }
090:
091:            public NameControl getNameControl() {
092:                if (nameControl == null)
093:                    nameControl = new NameControl();
094:
095:                return nameControl;
096:            }
097:
098:            public EventProcessor getEventProcessor() {
099:                if (eventProcessor == null)
100:                    eventProcessor = new EventProcessor();
101:
102:                return eventProcessor;
103:            }
104:
105:            /**
106:             * Returns the Plugin Preferences for this Universe
107:             */
108:            public PluginPreferenceControl getPluginPreferenceControl() {
109:                if (pluginPrefControl == null)
110:                    pluginPrefControl = new PluginPreferenceControl();
111:
112:                return pluginPrefControl;
113:            }
114:
115:            public J3dFly getJ3dFly() {
116:                return j3dFly;
117:            }
118:
119:            public void addLocale(DevelopmentLocale locale) {
120:                locales.add(locale);
121:            }
122:
123:            public int numLocales() {
124:                if (locales == null)
125:                    return 0;
126:
127:                return locales.size();
128:            }
129:
130:            public DevelopmentLocale getLocale(int index) {
131:                return (DevelopmentLocale) locales.get(index);
132:            }
133:
134:            /**
135:             * Returns the menu bar for j3dFly
136:             *
137:             * The menu created when the main window is created but it has
138:             * no submenus be default. Each plugin will call this method and
139:             * add itself to the set of menus
140:             */
141:            public JMenuBar getMainMenuBar() {
142:                return mainMenuBar;
143:            }
144:
145:            public JPanel getToolBarPanel() {
146:                return toolBarPanel;
147:            }
148:
149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.