📄 qtmousecontroller.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Mon Jul 15 11:49:48 PDT 2002 --><TITLE>: Class QTMouseController</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/QTMouseController.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../quicktime/app/event/QTEventCaster.html"><B>PREV CLASS</B></A> <A HREF="../../../quicktime/app/event/QTMouseEvent.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="QTMouseController.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.app.event</FONT><BR>Class QTMouseController</H2><PRE>java.lang.Object | +--<B>quicktime.app.event.QTMouseController</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../quicktime/app/spaces/Controller.html">Controller</A>, <A HREF="../../../quicktime/app/spaces/Listener.html">Listener</A>, <A HREF="../../../quicktime/app/spaces/ListenerController.html">ListenerController</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../quicktime/app/event/QTMouseTargetController.html">QTMouseTargetController</A></DD></DL><HR><DL><DT>public class <B>QTMouseController</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../quicktime/app/spaces/ListenerController.html">ListenerController</A></DL><P>A QTMouseController is attached to a Space. When the space is added to its container (for instance a QTCanvas in the case of QTDisplaySpaces) it will create an event dispatcher that will translate these container events to the QTMouseEvents that this controller distributes to its registered listeners. <P> <UL> <LI>MouseClick, MousePress and MouseRelease events will contain a click count. <LI>MouseEntered and MouseExited events will be generated when the mouse is moved out of the source space that the controller is attached to. <LI>MouseMoved events are generated whenever the mouse is moved within the source space. <LI>MouseDragged events are generated when the user presses the mouse within the source space and moves the mouse with the button(s) still pressed. MouseDrag events are generated even if the mouse is no longer in the space, until the user releases the mouse buttons. </UL><P> Once created and attached to a space the program registers listeners with the controller based on the type of mouse events a particular task requires. The type of the registered listeners will determine the type of mouse events that the controller will handle.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../quicktime/app/event/QTMouseTargetController.html"><CODE>for mouse events that target a member of the source space.</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../quicktime/app/spaces/Space.html">Space</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#space">space</A></B></CODE><BR> The space which the controller is attached too.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#QTMouseController()">QTMouseController</A></B>()</CODE><BR> Creates a mouse controller.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#addedTo(java.lang.Object)">addedTo</A></B>(java.lang.Object interest)</CODE><BR> This method is called by the specified object when the instance of the class that implements this interface is added to the object that is the source of the interest.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#addedToSpace(quicktime.app.spaces.Space)">addedToSpace</A></B>(<A HREF="../../../quicktime/app/spaces/Space.html">Space</A> s)</CODE><BR> This method is called by the space when a Controller is being addedTo the Space s.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#addHandler()">addHandler</A></B>()</CODE><BR> This method is called when a controller is added to its space and the controller needs to create its event handler</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#addQTMouseListener(quicktime.app.event.QTMouseListener)">addQTMouseListener</A></B>(<A HREF="../../../quicktime/app/event/QTMouseListener.html">QTMouseListener</A> l)</CODE><BR> Add a QTMouseListener for this controller.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMouseClicked(quicktime.app.event.QTMouseEvent)">doMouseClicked</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMouseDragged(quicktime.app.event.QTMouseEvent)">doMouseDragged</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMouseEntered(quicktime.app.event.QTMouseEvent)">doMouseEntered</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMouseExited(quicktime.app.event.QTMouseEvent)">doMouseExited</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMouseMoved(quicktime.app.event.QTMouseEvent, boolean)">doMouseMoved</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e, boolean isWithinItsSpace)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMousePressed(quicktime.app.event.QTMouseEvent)">doMousePressed</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#doMouseReleased(quicktime.app.event.QTMouseEvent)">doMouseReleased</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> This method dispatches the event to the appropriate listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/app/spaces/Space.html">Space</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#getSpace()">getSpace</A></B>()</CODE><BR> This method returns the Space which the MouseController has been attached to.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#mouseClicked(quicktime.app.event.QTMouseEvent)">mouseClicked</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> If the QTMouseController has a MouseButtonListener(s) it will dispatch click events that occur within its Space's area to those listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#mouseDragged(quicktime.app.event.QTMouseEvent)">mouseDragged</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> If the QTMouseController has a MouseMoveListener(s) it will dispatch drag events that occur within its Space's area to those listeners.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseController.html#mouseEntered(quicktime.app.event.QTMouseEvent)">mouseEntered</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A> e)</CODE><BR> If the QTMouseController has a MouseEnterExitListener(s) it will dispatch a mouseEntered event when the mouse moves or is dragged into the space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -