⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sensoreventagent.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a binding of the specified sensor to the given array of <code>SensorButtonListener</code> implementations.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#addSensorReadListener(javax.media.j3d.Sensor, com.sun.j3d.utils.behaviors.sensor.SensorReadListener)">addSensorReadListener</A></B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                      <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorReadListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorReadListener</A>&nbsp;readListener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a binding of the specified sensor to the given <code>SensorReadListener</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#dispatchEvents()">dispatchEvents</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads all sensor button state and dispatches events to registered button and read listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#getSensorButtonListeners(javax.media.j3d.Sensor, int)">getSensorButtonListeners</A></B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                         int&nbsp;button)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>SensorButtonListener</code> implementations bound to the given sensor and button.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorReadListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorReadListener</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#getSensorReadListeners(javax.media.j3d.Sensor)">getSensorReadListeners</A></B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>SensorReadListeners</code> bound to the specified sensor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#getSensors()">getSensors</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of references to all sensors that have been bound to listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#removeSensorBinding(javax.media.j3d.Sensor)">removeSensorBinding</A></B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove all sensor listeners bound to the given sensor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#removeSensorButtonListener(com.sun.j3d.utils.behaviors.sensor.SensorButtonListener)">removeSensorButtonListener</A></B>(<A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the given <code>SensorButtonListener</code> from all sensors.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#removeSensorButtonListener(javax.media.j3d.Sensor, com.sun.j3d.utils.behaviors.sensor.SensorButtonListener)">removeSensorButtonListener</A></B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                           <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the given <code>SensorButtonListener</code> binding from the specified sensor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#removeSensorReadListener(com.sun.j3d.utils.behaviors.sensor.SensorReadListener)">removeSensorReadListener</A></B>(<A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorReadListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorReadListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the given <code>SensorReadListener</code> from all sensors.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#removeSensorReadListener(javax.media.j3d.Sensor, com.sun.j3d.utils.behaviors.sensor.SensorReadListener)">removeSensorReadListener</A></B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                         <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorReadListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorReadListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the given <code>SensorReadListener</code> binding from the specified sensor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="SensorEventAgent(java.lang.Object)"><!-- --></A><H3>SensorEventAgent</H3><PRE>public <B>SensorEventAgent</B>(java.lang.Object&nbsp;source)</PRE><DL><DD>Create a <code>SensorEventAgent</code> to generate and dispatch sensor events to registered listeners.<P><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - reference to the originating object for inclusion in  generated <code>SensorEvents</code>; intended to refer to the  instantiating Behavior but may be any reference, or null</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="addSensorButtonListener(javax.media.j3d.Sensor, int, com.sun.j3d.utils.behaviors.sensor.SensorButtonListener)"><!-- --></A><H3>addSensorButtonListener</H3><PRE>public void <B>addSensorButtonListener</B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                                    int&nbsp;button,                                    <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>&nbsp;buttonListener)</PRE><DL><DD>Creates a binding of the specified sensor button to the given <code>SensorButtonListener</code> implementation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>sensor</CODE> - the sensor with the button to be bound<DD><CODE>button</CODE> - the index of the button to be bound on the specified  sensor; may range from 0 to  <code>(sensor.getSensorButtonCount() - 1)</code><DD><CODE>buttonListener</CODE> - the <code>SensorButtonListener</code>  implementation that will be invoked for the sensor's button</DL></DD></DL><HR><A NAME="addSensorButtonListener(javax.media.j3d.Sensor, com.sun.j3d.utils.behaviors.sensor.SensorButtonListener)"><!-- --></A><H3>addSensorButtonListener</H3><PRE>public void <B>addSensorButtonListener</B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                                    <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>&nbsp;buttonListener)</PRE><DL><DD>Creates a binding from all the buttons on the specified sensor to the given <code>SensorButtonListener</code> implementation.  If multiple sensor buttons are held down at the same time, the press and release callbacks are called for each button in the order that they occur.  This allows actions to be bound to combinations of button presses, but is also convenient for listeners that don't care which button was pressed.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>sensor</CODE> - the sensor to be bound<DD><CODE>buttonListener</CODE> - the <code>SensorButtonListener</code>  implementation that will be called for all button events</DL></DD></DL><HR><A NAME="addSensorButtonListeners(javax.media.j3d.Sensor, com.sun.j3d.utils.behaviors.sensor.SensorButtonListener[])"><!-- --></A><H3>addSensorButtonListeners</H3><PRE>public void <B>addSensorButtonListeners</B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                                     <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>[]&nbsp;buttonListeners)</PRE><DL><DD>Creates a binding of the specified sensor to the given array of <code>SensorButtonListener</code> implementations.  The array index of the listener indicates the index of the sensor button to which it will be bound. <p> This method enforces a <i>mutually exclusive</i> callback policy among the listeners specified in the array.  If multiple sensor buttons are held down at the same time, callbacks are invoked only for the button that was depressed first.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>sensor</CODE> - the sensor to be bound<DD><CODE>buttonListeners</CODE> - array of implementations of  <code>SensorButtonListener</code>; array entries may be null or  duplicates but the array length must equal the sensor's button  count</DL></DD></DL><HR><A NAME="getSensorButtonListeners(javax.media.j3d.Sensor, int)"><!-- --></A><H3>getSensorButtonListeners</H3><PRE>public <A HREF="../../../../../../com/sun/j3d/utils/behaviors/sensor/SensorButtonListener.html" title="interface in com.sun.j3d.utils.behaviors.sensor">SensorButtonListener</A>[] <B>getSensorButtonListeners</B>(<A HREF="../../../../../../javax/media/j3d/Sensor.html" title="class in javax.media.j3d">Sensor</A>&nbsp;sensor,                                                       int&nbsp;button)</PRE><DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -