All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gjt.StickyImageButtonListener

java.lang.Object
   |
   +----java.awt.event.MouseAdapter
           |
           +----gjt.ImageButtonListener
                   |
                   +----gjt.StickyImageButtonListener

public class StickyImageButtonListener
extends ImageButtonListener
An ImageButtonListener that causes its associated ImageButton to "stick" when activated. If the ImageButton is raised it depresses[1] upon a mouse down and stays down upon a subsequent mouse up event. The same "sticky" behaviour occurs when a depressed ImageButton encounters a mouse down followed by a subsequent mouse up.

Note that false is returned from mouse event handlers; therefore mouse events will be propagated to the ImageButton's container. While this is not always desirable, it was deemed a better default than swallowing the event here. Subclasses may, of course, modify this behavior.

[1] No psychiatric consultation is necessary.

See Also:
ImageButton, ImageButtonListener, SpringyImageButtonListener

Constructor Index

 o StickyImageButtonListener()

Method Index

 o activate(ImageButton)
 o arm(ImageButton)
 o disarm(ImageButton)
 o mouseClicked(MouseEvent)
 o mouseDragged(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)

Constructors

 o StickyImageButtonListener
 public StickyImageButtonListener()

Methods

 o activate
 public void activate(ImageButton ib)
Overrides:
activate in class ImageButtonListener
 o arm
 public void arm(ImageButton ib)
Overrides:
arm in class ImageButtonListener
 o disarm
 public void disarm(ImageButton ib)
Overrides:
disarm in class ImageButtonListener
 o mousePressed
 public void mousePressed(MouseEvent event)
Overrides:
mousePressed in class MouseAdapter
 o mouseClicked
 public void mouseClicked(MouseEvent event)
Overrides:
mouseClicked in class MouseAdapter
 o mouseReleased
 public void mouseReleased(MouseEvent event)
Overrides:
mouseReleased in class MouseAdapter
 o mouseDragged
 public void mouseDragged(MouseEvent event)
Overrides:
mouseDragged in class ImageButtonListener

All Packages  Class Hierarchy  This Package  Previous  Next  Index