Class gjt.StickyImageButtonController
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gjt.StickyImageButtonController

java.lang.Object
   |
   +----gjt.ImageButtonController
           |
           +----gjt.StickyImageButtonController

public class StickyImageButtonController
extends ImageButtonController
An ImageButtonController 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, ImageButtonController, SpringyImageButtonController

Constructor Index

 o StickyImageButtonController(ImageButton)

Method Index

 o mouseDown(Event, int, int)
 o mouseDrag(Event, int, int)
 o mouseUp(Event, int, int)

Constructors

 o StickyImageButtonController
  public StickyImageButtonController(ImageButton ib)

Methods

 o mouseDown
  public boolean mouseDown(Event event,
                           int x,
                           int y)
Overrides:
mouseDown in class ImageButtonController
 o mouseUp
  public boolean mouseUp(Event event,
                         int x,
                         int y)
Overrides:
mouseUp in class ImageButtonController
 o mouseDrag
  public boolean mouseDrag(Event event,
                           int x,
                           int y)
Overrides:
mouseDrag in class ImageButtonController

All Packages  Class Hierarchy  This Package  Previous  Next  Index