📄 configureduniverse.html
字号:
boolean setVisible)</PRE><DL><DD>Reads the configuration specified by the given URL to create a Locale, one or more ViewingPlatforms with the specified number of transforms, and at least one Viewer object with optional visibility. AWT components used by the Viewers will remain invisible unless the <code>setVisible</code> flag is true. The configuration file may also create InputDevice, Sensor, and ViewPlatformBehavior instances.<P><DL><DT><B>Parameters:</B><DD><CODE>userConfig</CODE> - the URL to the user's configuration file; passing in null creates a default Viewer with the specified visibility and a ViewingPlatform with the specified number of transforms<DD><CODE>transformCount</CODE> - the number of transforms in the MultiTransformGroup object to be created<DD><CODE>setVisible</CODE> - if true, calls <code>setVisible(true)</code> on all created window components; otherwise, they remain invisible<DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d"><CODE>Locale</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe"><CODE>Viewer</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewingPlatform.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewingPlatform</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/MultiTransformGroup.html" title="class in com.sun.j3d.utils.universe"><CODE>MultiTransformGroup</CODE></A></DL></DL><HR><A NAME="ConfiguredUniverse(java.net.URL, com.sun.j3d.utils.universe.LocaleFactory)"><!-- --></A><H3>ConfiguredUniverse</H3><PRE>public <B>ConfiguredUniverse</B>(java.net.URL userConfig, <A HREF="../../../../../com/sun/j3d/utils/universe/LocaleFactory.html" title="interface in com.sun.j3d.utils.universe">LocaleFactory</A> localeFactory)</PRE><DL><DD>Reads the configuration specified by the given URL to create a Locale using the given LocaleFactory, one or more ViewingPlatforms, and at least one Viewer object. The configuration file may also create InputDevice, Sensor, and ViewPlatformBehavior instances.<P><DL><DT><B>Parameters:</B><DD><CODE>userConfig</CODE> - the URL to the user's configuration file; passing in null creates a default Viewer and ViewingPlatform with the specified number of transforms<DD><CODE>localeFactory</CODE> - the factory object used to create the Locale<DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d"><CODE>Locale</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe"><CODE>Viewer</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewingPlatform.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewingPlatform</CODE></A></DL></DL><HR><A NAME="ConfiguredUniverse(java.net.URL, com.sun.j3d.utils.universe.LocaleFactory, boolean)"><!-- --></A><H3>ConfiguredUniverse</H3><PRE>public <B>ConfiguredUniverse</B>(java.net.URL userConfig, <A HREF="../../../../../com/sun/j3d/utils/universe/LocaleFactory.html" title="interface in com.sun.j3d.utils.universe">LocaleFactory</A> localeFactory, boolean setVisible)</PRE><DL><DD>Reads the configuration specified by the given URL to create a Locale using the given LocaleFactory, one or more ViewingPlatforms, and at least one Viewer object with optional visibility. The configuration file may also create InputDevice, Sensor, and ViewPlatformBehavior instances. Window components used by the Viewers will remain invisible unless the <code>setVisible</code> flag is true.<P><DL><DT><B>Parameters:</B><DD><CODE>userConfig</CODE> - the URL to the user's configuration file; passing in null creates a default Viewer with the specified visibility and a default ViewingPlatform<DD><CODE>localeFactory</CODE> - the factory object used to create the Locale<DD><CODE>setVisible</CODE> - if true, calls <code>setVisible(true)</code> on all created window components; otherwise, they remain invisible<DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d"><CODE>Locale</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe"><CODE>Viewer</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewingPlatform.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewingPlatform</CODE></A></DL></DL><HR><A NAME="ConfiguredUniverse(java.net.URL, com.sun.j3d.utils.universe.LocaleFactory, javax.media.j3d.HiResCoord, int, boolean)"><!-- --></A><H3>ConfiguredUniverse</H3><PRE>public <B>ConfiguredUniverse</B>(java.net.URL userConfig, <A HREF="../../../../../com/sun/j3d/utils/universe/LocaleFactory.html" title="interface in com.sun.j3d.utils.universe">LocaleFactory</A> localeFactory, <A HREF="../../../../../javax/media/j3d/HiResCoord.html" title="class in javax.media.j3d">HiResCoord</A> origin, int transformCount, boolean setVisible)</PRE><DL><DD>Reads the configuration specified by the given URL to create a Locale using the specified LocaleFactory with the given origin, one or more ViewingPlatforms with the specified number of transforms, and at least one Viewer object with optional visibility. Window components used by the Viewers will remain invisible unless the <code>setVisible</code> flag is true. The configuration file may also create InputDevice, Sensor, and ViewPlatformBehavior instances.<P><DL><DT><B>Parameters:</B><DD><CODE>userConfig</CODE> - the URL to the user's configuration file; passing in null creates a default Viewer with the specified visibility and a ViewingPlatform with the specified number of transforms<DD><CODE>localeFactory</CODE> - the factory object used to create the Locale<DD><CODE>origin</CODE> - the origin used to set the origin of the Locale object; if this object is null, then 0.0 is used<DD><CODE>transformCount</CODE> - the number of transforms in the MultiTransformGroup object to be created<DD><CODE>setVisible</CODE> - if true, calls <code>setVisible(true)</code> on all created window components; otherwise, they remain invisible<DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d"><CODE>Locale</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe"><CODE>Viewer</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewingPlatform.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewingPlatform</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/MultiTransformGroup.html" title="class in com.sun.j3d.utils.universe"><CODE>MultiTransformGroup</CODE></A></DL></DL><HR><A NAME="ConfiguredUniverse(com.sun.j3d.utils.universe.ConfigContainer)"><!-- --></A><H3>ConfiguredUniverse</H3><PRE>public <B>ConfiguredUniverse</B>(<A HREF="../../../../../com/sun/j3d/utils/universe/ConfigContainer.html" title="class in com.sun.j3d.utils.universe">ConfigContainer</A> userConfig)</PRE><DL><DD>Retrieves view-side scenegraph components from the given container to create a universe with one Locale, one or more ViewingPlatforms, and at least one Viewer object. Equivalent to <code>ConfiguredUniverse(ConfigContainer, null, null)</code>.<P><DL><DT><B>Parameters:</B><DD><CODE>userConfig</CODE> - container holding viewing configuration components; must not be null<DT><B>Since:</B></DT> <DD>Java 3D 1.3.1</DD><DT><B>See Also:</B><DD><A HREF="../../../../../com/sun/j3d/utils/universe/ConfiguredUniverse.html#ConfiguredUniverse(com.sun.j3d.utils.universe.ConfigContainer, com.sun.j3d.utils.universe.LocaleFactory, javax.media.j3d.HiResCoord)"><CODE>ConfiguredUniverse(ConfigContainer, LocaleFactory, HiResCoord)</CODE></A>, <A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d"><CODE>Locale</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe"><CODE>Viewer</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewingPlatform.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewingPlatform</CODE></A></DL></DL><HR><A NAME="ConfiguredUniverse(com.sun.j3d.utils.universe.ConfigContainer, com.sun.j3d.utils.universe.LocaleFactory, javax.media.j3d.HiResCoord)"><!-- --></A><H3>ConfiguredUniverse</H3><PRE>public <B>ConfiguredUniverse</B>(<A HREF="../../../../../com/sun/j3d/utils/universe/ConfigContainer.html" title="class in com.sun.j3d.utils.universe">ConfigContainer</A> userConfig, <A HREF="../../../../../com/sun/j3d/utils/universe/LocaleFactory.html" title="interface in com.sun.j3d.utils.universe">LocaleFactory</A> localeFactory, <A HREF="../../../../../javax/media/j3d/HiResCoord.html" title="class in javax.media.j3d">HiResCoord</A> origin)</PRE><DL><DD>Retrieves view-side scenegraph components from the given container to create a universe with one Locale created from the specified LocaleFactory and origin, one or more ViewingPlatforms, and at least one Viewer object. The container may also provide InputDevice, Sensor, and ViewPlatformBehavior instances which will be incorporated into the universe if they are referenced by any of the Viewer or ViewingPlatform instances.<p> This constructor and <code>ConfiguredUniverse(ConfigContainer)</code> both accept ConfigContainer references directly and are the preferred interfaces for constructing universes from configuration files. They differ from the constructors that accept URL objects in the following ways:<p> <ul> <li>A Viewer will be attached to a default ViewingPlatform only if no ViewingPlatforms are provided in the ConfigContainer. If one or more ViewingPlatforms are provided by the ConfigContainer, then Viewers must be attached to them explicitly in the configuration.<p> </li> <li>ViewPlatformBehaviors will be attached to their specified ViewingPlatforms before ConfiguredUniverse can set a reference to itself in the ViewingPlatform. This means that a behavior can't get a reference to the universe at the time its <code>setViewingPlatform</code> method is called; it must wait until its <code>initialize</code> method is called.<p> </li> <li>All Java properties used by Java 3D may be set in the beginning of the configuration file as long as there is no reference to a VirtualUniverse prior to creating the ConfigContainer. Note however, that some Java 3D utilities and objects such as Transform3D can cause static references to VirtualUniverse and trigger the evaluation of Java properties before they are set by ConfigContainer.<p> </li> </ul><P><DL><DT><B>Parameters:</B><DD><CODE>userConfig</CODE> - container holding viewing configuration components; must not be null<DD><CODE>localeFactory</CODE> - the factory object used to create the Locale, or null<DD><CODE>origin</CODE> - the origin used to set the origin of the Locale object; if this object is null, then 0.0 is used<DT><B>Since:</B></DT> <DD>Java 3D 1.3.1</DD><DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d"><CODE>Locale</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe"><CODE>Viewer</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewingPlatform.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewingPlatform</CODE></A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getViewer(int)"><!-- --></A><H3>getViewer</H3><PRE>public <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe">Viewer</A> <B>getViewer</B>(int index)</PRE><DL><DD>Returns the Viewer object specified by the given index.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of which Viewer object to return.<DT><B>Returns:</B><DD>The Viewer object specified by the given index.</DL></DD></DL><HR><A NAME="getViewers()"><!-- --></A><H3>getViewers</H3><PRE>public <A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html" title="class in com.sun.j3d.utils.universe">Viewer</A>[] <B>getViewers</B>()</PRE><DL><DD>Returns all of the Viewer objects associated with this scene graph.<P><DD><DL><DT><B>Returns:</B><DD>The Viewer objects associated with this scene graph.</DL></DD></DL><HR><A NAME="setVisible(boolean)"><!-- --></A><H3>setVisible</H3><PRE>public void <B>setVisible</B>(boolean visible)</PRE><DL><DD>Call <code>setVisible()</code> on all AWT components created by this
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -