qtbutton.html

来自「这个是java的quicktime for java 的详细使用文档」· HTML 代码 · 共 755 行 · 第 1/3 页

HTML
755
字号
<!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:51 PDT 2002 --><TITLE>: Class  QTButton</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/QTButton.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../quicktime/app/ui/PressReleaseButton.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../quicktime/app/ui/ReleaseButton.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>  &nbsp;&nbsp;<A HREF="QTButton.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.app.ui</FONT><BR>Class  QTButton</H2><PRE>java.lang.Object  |  +--<A HREF="../../../quicktime/app/anim/TwoDSprite.html">quicktime.app.anim.TwoDSprite</A>        |        +--<A HREF="../../../quicktime/app/ui/UIElement.html">quicktime.app.ui.UIElement</A>              |              +--<B>quicktime.app.ui.QTButton</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../quicktime/app/image/Compositable.html">Compositable</A>, <A HREF="../../../quicktime/app/image/DynamicImage.html">DynamicImage</A>, <A HREF="../../../quicktime/app/image/ImageSettable.html">ImageSettable</A>, <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>, <A HREF="../../../quicktime/app/display/Layerable.html">Layerable</A>, <A HREF="../../../quicktime/app/actions/NotifyListener.html">NotifyListener</A>, <A HREF="../../../quicktime/app/image/Transformable.html">Transformable</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../quicktime/app/ui/PressActionButton.html">PressActionButton</A>, <A HREF="../../../quicktime/app/ui/ReleaseButton.html">ReleaseButton</A></DD></DL><HR><DL><DT>public abstract class <B>QTButton</B><DT>extends <A HREF="../../../quicktime/app/ui/UIElement.html">UIElement</A></DL><P>This abstarct class provides the basic functionality for a QTButton which takes care of the event handling of the button. It also updates the button images and sets the current image of the button as the mouse enters and leaves the button. Other classes can extend this class to provide their own button behaviour. The QTButton will fire action events as defined by these subclasses. The label of the TwoDSprite will be passed on to the action listeners.<P><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 &nbsp;<A HREF="../../../quicktime/app/event/QTActionListener.html">QTActionListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#actionListener">actionListener</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The QTActionListeners that will be fired when the QTButton is activated.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#pressedImage">pressedImage</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The image presented by the QTButton when it is in a pressed state.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#releasedImage">releasedImage</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The image presented by the QTButton when it is in a released state.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#rolloverImage">rolloverImage</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If specified then the image presented by the QTButton when it is in a released state and the mouse is over the button.</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_quicktime.app.ui.UIElement"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class quicktime.app.ui.<A HREF="../../../quicktime/app/ui/UIElement.html">UIElement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/ui/UIElement.html#currentImage">currentImage</A>, <A HREF="../../../quicktime/app/ui/UIElement.html#deactiveImage">deactiveImage</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_quicktime.app.anim.TwoDSprite"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class quicktime.app.anim.<A HREF="../../../quicktime/app/anim/TwoDSprite.html">TwoDSprite</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/anim/TwoDSprite.html#label">label</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_quicktime.app.display.Layerable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface quicktime.app.display.<A HREF="../../../quicktime/app/display/Layerable.html">Layerable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/app/display/Layerable.html#kBackMostLayer">kBackMostLayer</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== 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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#QTButton(quicktime.app.image.ImageSpec, quicktime.app.image.ImageSpec, quicktime.app.image.ImageSpec, quicktime.app.image.ImageSpec)">QTButton</A></B>(<A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;releasedImage,         <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;pressedImage,         <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;deactiveImage,         <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;rolloverImage)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the images of the UIElement as specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#QTButton(quicktime.app.image.ImageSpec, quicktime.app.image.ImageSpec, quicktime.app.image.ImageSpec, quicktime.app.image.ImageSpec, quicktime.std.image.Matrix, int, quicktime.std.image.GraphicsMode)">QTButton</A></B>(<A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;releasedImage,         <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;pressedImage,         <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;deactiveImage,         <A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A>&nbsp;rolloverImage,         <A HREF="../../../quicktime/std/image/Matrix.html">Matrix</A>&nbsp;matrix,         int&nbsp;layer,         <A HREF="../../../quicktime/std/image/GraphicsMode.html">GraphicsMode</A>&nbsp;mode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the images and display characteristics of the UIElement as specified.</TD></TR></TABLE>&nbsp;<!-- ========== 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#addActionListener(quicktime.app.event.QTActionListener)">addActionListener</A></B>(<A HREF="../../../quicktime/app/event/QTActionListener.html">QTActionListener</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add an QTActionListeners to this button.</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="../../../quicktime/app/ui/QTButton.html#addMouseTargetListener(quicktime.app.event.MouseTargetListener)">addMouseTargetListener</A></B>(<A HREF="../../../quicktime/app/event/MouseTargetListener.html">MouseTargetListener</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a MouseTargetListener for this QTButton.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#entered(quicktime.app.event.QTMouseEvent)">entered</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called by the ButtonActivator when the mouse enters the button</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#exited(quicktime.app.event.QTMouseEvent)">exited</A></B>(<A HREF="../../../quicktime/app/event/QTMouseEvent.html">QTMouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called by the ButtonActivator when the mouse exits the button</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#fireAction()">fireAction</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is invoked by the event handling code so that any QTActionListeners actionPerformed methods are invoked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../quicktime/app/image/ImageSpec.html">ImageSpec</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/app/ui/QTButton.html#getDeactiveImage()">getDeactiveImage</A></B>()</CODE><BR>

⌨️ 快捷键说明

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