This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt.event
class MouseAdapter

java.lang.Object extended by java.awt.event.MouseAdapter
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener
Direct Known Subclasses:
BasicComboPopup.InvocationMouseHandler, BasicComboPopup.ListMouseHandler, BasicFileChooserUI.DoubleClickListener, BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.TrackListener, BasicSplitPaneDivider.MouseHandler, BasicTabbedPaneUI.MouseHandler, BasicTreeUI.MouseHandler, FormView.MouseEventListener, HTMLEditorKit.LinkController, MetalFileChooserUI.SingleClickListener, MouseInputAdapter, ToolTipManager

public abstract class MouseAdapter
extends Object
implements MouseListener, MouseWheelListener, MouseMotionListener

An abstract adapter class for receiving mouse events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse events let you track when a mouse is pressed, released, clicked, moved, dragged, when it enters a component, when it exits and when a mouse wheel is moved.

Extend this class to create a {@code MouseEvent} (including drag and motion events) or/and {@code MouseWheelEvent} listener and override the methods for the events of interest. (If you implement the {@code MouseListener}, {@code MouseMotionListener} 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.)

Create a listener object using the extended class and then register it with a component using the component's {@code addMouseListener} {@code addMouseMotionListener}, {@code addMouseWheelListener} methods. The relevant method in the listener object is invoked and the {@code MouseEvent} or {@code MouseWheelEvent} is passed to it in following cases:


Constructor Summary

          
 
Method Summary
 void

          
 void

          
 void

          
 void

          
 void

          
 void

          
 void

          
 void

          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseAdapter

public MouseAdapter()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
{@inheritDoc}

Parameters:
e

mouseDragged

public void mouseDragged(MouseEvent e)
{@inheritDoc}

Parameters:
e

mouseEntered

public void mouseEntered(MouseEvent e)
{@inheritDoc}

Parameters:
e

mouseExited

public void mouseExited(MouseEvent e)
{@inheritDoc}

Parameters:
e

mouseMoved

public void mouseMoved(MouseEvent e)
{@inheritDoc}

Parameters:
e

mousePressed

public void mousePressed(MouseEvent e)
{@inheritDoc}

Parameters:
e

mouseReleased

public void mouseReleased(MouseEvent e)
{@inheritDoc}

Parameters:
e

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
{@inheritDoc}

Parameters:
e


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.