mouseadapter.html

来自「API資料大全」· HTML 代码 · 共 321 行 · 第 1/2 页

HTML
321
字号
<!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 Thu Apr 27 23:33:29 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  MouseAdapter</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/MouseAdapter.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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../java/awt/event/KeyEvent.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../java/awt/event/MouseEvent.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="MouseAdapter.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;FIELD&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;FIELD&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">java.awt.event</FONT><BR>Class  MouseAdapter</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<B>java.awt.event.MouseAdapter</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/util/EventListener.html">EventListener</A>, <A HREF="../../../java/awt/event/MouseListener.html">MouseListener</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/swing/plaf/basic/BasicComboPopup.InvocationMouseHandler.html">BasicComboPopup.InvocationMouseHandler</A>, <A HREF="../../../javax/swing/plaf/basic/BasicComboPopup.ListMouseHandler.html">BasicComboPopup.ListMouseHandler</A>, <A HREF="../../../javax/swing/plaf/basic/BasicFileChooserUI.DoubleClickListener.html">BasicFileChooserUI.DoubleClickListener</A>, <A HREF="../../../javax/swing/plaf/basic/BasicScrollBarUI.ArrowButtonListener.html">BasicScrollBarUI.ArrowButtonListener</A>, <A HREF="../../../javax/swing/plaf/basic/BasicScrollBarUI.TrackListener.html">BasicScrollBarUI.TrackListener</A>, <A HREF="../../../javax/swing/plaf/basic/BasicSplitPaneDivider.MouseHandler.html">BasicSplitPaneDivider.MouseHandler</A>, <A HREF="../../../javax/swing/plaf/basic/BasicTabbedPaneUI.MouseHandler.html">BasicTabbedPaneUI.MouseHandler</A>, <A HREF="../../../javax/swing/plaf/basic/BasicTreeUI.MouseHandler.html">BasicTreeUI.MouseHandler</A>, <A HREF="../../../javax/swing/text/html/FormView.MouseEventListener.html">FormView.MouseEventListener</A>, <A HREF="../../../javax/swing/text/html/HTMLEditorKit.LinkController.html">HTMLEditorKit.LinkController</A>, <A HREF="../../../javax/swing/plaf/metal/MetalFileChooserUI.SingleClickListener.html">MetalFileChooserUI.SingleClickListener</A>, <A HREF="../../../javax/swing/ToolTipManager.html">ToolTipManager</A></DD></DL><HR><DL><DT>public abstract class <B>MouseAdapter</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../../java/awt/event/MouseListener.html">MouseListener</A></DL><P>An abstract adapter class for receiving mouse events. The methods in this class are empty. This class exists as convenience for creating listener objects. <P> Mouse events let you track when a mouse is pressed, released, clicked,  when it enters a component, and when it exits. (To track mouse moves and mouse drags, use the MouseMotionAdapter.) <P> Extend this class to create a <code>MouseEvent</code> listener  and override the methods for the events of interest. (If you implement the  <code>MouseListener</code> interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.) <P> Create a listener object using the extended class and then register it with  a component using the component's <code>addMouseListener</code>  method. When a mouse button is pressed, released, or clicked (pressed and released), or when the mouse cursor enters or exits the component, the relevant method in the listener object is invoked and the <code>MouseEvent</code> is passed to it.<P><DL><DT><B>Since: </B><DD>1.1</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/event/MouseEvent.html"><CODE>MouseEvent</CODE></A>, <A HREF="../../../java/awt/event/MouseListener.html"><CODE>MouseListener</CODE></A>, <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>, <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== 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="../../../java/awt/event/MouseAdapter.html#MouseAdapter()">MouseAdapter</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="../../../java/awt/event/MouseAdapter.html#mouseClicked(java.awt.event.MouseEvent)">mouseClicked</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when the mouse has been clicked on a component.</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="../../../java/awt/event/MouseAdapter.html#mouseEntered(java.awt.event.MouseEvent)">mouseEntered</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when the mouse enters a component.</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="../../../java/awt/event/MouseAdapter.html#mouseExited(java.awt.event.MouseEvent)">mouseExited</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when the mouse exits a component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">

⌨️ 快捷键说明

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