Source Code Cross Referenced for Loader.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » loaders » 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 » com.sun.j3d.loaders 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $RCSfile: Loader.java,v $
003:         *
004:         * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * Redistribution and use in source and binary forms, with or without
007:         * modification, are permitted provided that the following conditions
008:         * are met:
009:         *
010:         * - Redistribution of source code must retain the above copyright
011:         *   notice, this list of conditions and the following disclaimer.
012:         *
013:         * - Redistribution in binary form must reproduce the above copyright
014:         *   notice, this list of conditions and the following disclaimer in
015:         *   the documentation and/or other materials provided with the
016:         *   distribution.
017:         *
018:         * Neither the name of Sun Microsystems, Inc. or the names of
019:         * contributors may be used to endorse or promote products derived
020:         * from this software without specific prior written permission.
021:         *
022:         * This software is provided "AS IS," without a warranty of any
023:         * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
024:         * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
025:         * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
026:         * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL
027:         * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
028:         * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
029:         * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
030:         * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
031:         * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
032:         * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
033:         * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
034:         * POSSIBILITY OF SUCH DAMAGES.
035:         *
036:         * You acknowledge that this software is not designed, licensed or
037:         * intended for use in the design, construction, operation or
038:         * maintenance of any nuclear facility.
039:         *
040:         * $Revision: 1.4 $
041:         * $Date: 2007/02/09 17:20:06 $
042:         * $State: Exp $
043:         */
044:
045:        package com.sun.j3d.loaders;
046:
047:        import java.net.URL;
048:        import java.io.Reader;
049:        import java.io.FileNotFoundException;
050:
051:        /**
052:         * The Loader interface is used to specify the location
053:         * and elements of a file format to load. 
054:         * The interface is used to give loaders of various
055:         * file formats a common public interface.  Ideally
056:         * the Scene interface will be implemented to give
057:         * the user a consistent interface to extract the
058:         * data.
059:         *
060:         * @see com.sun.j3d.loaders.Scene
061:         */
062:        public interface Loader {
063:
064:            // These are the values to be used in constructing the
065:            // load flags for the loader.  Users should OR the selected
066:            // values together to construct an aggregate flag integer
067:            // (see the setFlags() method).  Users wishing to load all
068:            // data in a file should use the LOAD_ALL specifier.
069:
070:            /** This flag enables the loading of light objects into the scene.*/
071:            public static final int LOAD_LIGHT_NODES = 1;
072:
073:            /** This flag enables the loading of fog objects into the scene.*/
074:            public static final int LOAD_FOG_NODES = 2;
075:
076:            /** This flag enables the loading of background objects into the scene.*/
077:            public static final int LOAD_BACKGROUND_NODES = 4;
078:
079:            /** This flag enables the loading of behaviors into the scene.*/
080:            public static final int LOAD_BEHAVIOR_NODES = 8;
081:
082:            /** This flag enables the loading of view (camera) objects into
083:             * the scene.*/
084:            public static final int LOAD_VIEW_GROUPS = 16;
085:
086:            /** This flag enables the loading of sound objects into the scene.*/
087:            public static final int LOAD_SOUND_NODES = 32;
088:
089:            /** This flag enables the loading of all objects into the scene.*/
090:            public static final int LOAD_ALL = 0xffffffff;
091:
092:            // Loading methods
093:
094:            /**
095:             * This method loads the named file and returns the Scene
096:             * containing the scene.  Any data files referenced by this
097:             * file should be located in the same place as the named file;
098:             * otherwise users should specify an alternate base path with
099:             * the setBasePath(String) method.
100:             */
101:            public Scene load(String fileName) throws FileNotFoundException,
102:                    IncorrectFormatException, ParsingErrorException;
103:
104:            /**
105:             * This method loads the named file and returns the Scene
106:             * containing the scene.  Any data files referenced by the Reader
107:             * should be located in the same place as the named file; otherwise,
108:             * users should specify an alternate base path with the setBaseUrl(URL)
109:             * method.
110:             */
111:            public Scene load(URL url) throws FileNotFoundException,
112:                    IncorrectFormatException, ParsingErrorException;
113:
114:            /**
115:             * This method loads the Reader and returns the Scene
116:             * containing the scene.  Any data files referenced by the Reader should
117:             * be located in the user's current working directory.
118:             */
119:            public Scene load(Reader reader) throws FileNotFoundException,
120:                    IncorrectFormatException, ParsingErrorException;
121:
122:            // Variable get/set methods
123:
124:            /**
125:             * This method sets the base URL name for data files associated with
126:             * the file passed into the load(URL) method.
127:             * The basePath should be null by default, which is an indicator
128:             * to the loader that it should look for any associated files starting
129:             * from the same directory as the file passed into the load(URL) method.
130:             */
131:            public void setBaseUrl(URL url);
132:
133:            /**
134:             * This method sets the base path name for data files associated with
135:             * the file passed into the load(String) method.
136:             * The basePath should be null by default, which is an indicator
137:             * to the loader that it should look for any associated files starting
138:             * from the same directory as the file passed into the load(String)
139:             * method.
140:             */
141:            public void setBasePath(String pathName);
142:
143:            /**
144:             * Returns the current base URL setting.  By default this is null,
145:             * implying the loader should look for associated files starting
146:             * from the same directory as the file passed into the load(URL) method.
147:             */
148:            public URL getBaseUrl();
149:
150:            /**
151:             * Returns the current base path setting.  By default this is null,
152:             * implying the loader should look for associated files starting
153:             * from the same directory as the file passed into the load(String)
154:             * method.
155:             */
156:            public String getBasePath();
157:
158:            /**
159:             * This method sets the load flags for the file.  The flags should
160:             * equal 0 by default (which tells the loader to only load geometry).
161:             * To enable the loading of any particular scene elements, pass
162:             * in a logical OR of the LOAD values specified above.
163:             */
164:            public void setFlags(int flags);
165:
166:            /**
167:             * Returns the current loading flags setting.
168:             */
169:            public int getFlags();
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.