📄 qtmousetargetcontroller.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 QTMouseTargetController</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/QTMouseTargetController.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/QTMouseEvent.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="QTMouseTargetController.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_quicktime.app.event.QTMouseController">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: FIELD | <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 QTMouseTargetController</H2><PRE>java.lang.Object | +--<A HREF="../../../quicktime/app/event/QTMouseController.html">quicktime.app.event.QTMouseController</A> | +--<B>quicktime.app.event.QTMouseTargetController</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../quicktime/app/spaces/Collection.html">Collection</A>, <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><HR><DL><DT>public class <B>QTMouseTargetController</B><DT>extends <A HREF="../../../quicktime/app/event/QTMouseController.html">QTMouseController</A><DT>implements <A HREF="../../../quicktime/app/spaces/Collection.html">Collection</A></DL><P>A QTMouseTargetController deals with mouse events in a space where the mouse event occurs over (or selects) a member of that space. Members are selected based on being the frontmost member of the space (or of the members explicitly added to the controller). <P> This controller is also a collection. It acts in two modes. If its wholespace variable is set to true then any of the members of the space can be selected. It wholespace is false then only those members of the space that are also members of the controller can be selected. Generally controllers represent a collection of members that will require the same kinds of mouse behaviours. <P> This class specialises the handling of the events of its superclass in that for the event to be dispatched to its listeners the controller must have a selected target. In these cases the target attribute of the mouse event is set and the mouse event is broadcast to the appropriate listeners. For instance, if the user clicks in an "empty" area of the space the mouse clicked event won't be broadcast. However, if the user clicks on a member of the space and either wholespace is true or the selected member is a member of the controller, then and only then will the event be broadcast. The exception to this rule is that MouseEnter and MouseExit events will be broadcast regardless. MouseDrag events are considered to be targeted to a target that was selected by a mouse press event and are broadcast until the user releases the mouse. MouseMove events will only be broadcast when they occur whilst over a selected target. <P> In addition to these events a listener can be registered with this controller which is interested in receiving notification of mouse move or drag events that enter and exit members of the space. <P> If members are added to the controller the controller will query the space it is attached to to see if those members are appropriate members for that space. This can only be done after the controller is attached to a space. If members are added to the controller before it is added to a space, this appropriateness test is performed. If a member is found to inappropriate it is removed without notification. The member must also be a member of the space.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_quicktime.app.event.QTMouseController"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class quicktime.app.event.<A HREF="../../../quicktime/app/event/QTMouseController.html">QTMouseController</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/event/QTMouseController.html#space">space</A></CODE></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/QTMouseTargetController.html#QTMouseTargetController()">QTMouseTargetController</A></B>()</CODE><BR> Creates a QTMouseTargetController with a default setting of wholespace equals true.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseTargetController.html#QTMouseTargetController(boolean)">QTMouseTargetController</A></B>(boolean wholespace)</CODE><BR> Creates a QTMouseTargetController.</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/QTMouseTargetController.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/QTMouseTargetController.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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/event/QTMouseTargetController.html#addMember(java.lang.Object)">addMember</A></B>(java.lang.Object member)</CODE><BR> If wholespace is set to false, then only objects that are explicitly added to the controller will be controlled by it.</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/QTMouseTargetController.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/QTMouseTargetController.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/QTMouseTargetController.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/QTMouseTargetController.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/QTMouseTargetController.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/QTMouseTargetController.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/QTMouseTargetController.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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -