Class Scroller

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----Scroller

public class Scroller
extends Panel
Scroller is a small component that can be easily incorporated into most Java programs. The Scroller class must be passed an array of objects that implement the ScrollReadable interface. The first object in the array must be the canvas the Scroller will "wrap around" giving it the scrolling functionality. The other objects in the array will receive from the Scroller a horizontal and vertical percentage (a number between 0 and 1) of how far the scroollbar was scrolled.


Constructor Index

 o Scroller(ScrollReadable[])
Creates a Scroller object.

Method Index

 o handleEvent(Event)
Calculate the percentage the scrollbars are scrolled and pass this value to all object in the ScrollReadableArray.

Constructors

 o Scroller
  public Scroller(ScrollReadable ScrollReadableArray[])
Creates a Scroller object.

Methods

 o handleEvent
  public boolean handleEvent(Event e)
Calculate the percentage the scrollbars are scrolled and pass this value to all object in the ScrollReadableArray. The percentage is a float between 0 and 1, so 50% is .5f.

Overrides:
handleEvent in class Component
1