Class EDU.auburn.VGJ.gui.ViewportScroller
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.auburn.VGJ.gui.ViewportScroller

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----EDU.auburn.VGJ.gui.ViewportScroller

public class ViewportScroller
extends Canvas
A ViewportScroller is a window used to scroll a window through a larger area of content. The content is shown as a white rectangle, with the window being represented by a black rectangle outline within it. A SCROLL event is sent when the user drags the "window" with the mouse.

Here is the source.

Variable Index

 o DONE
 o SCROLL
Event indicating the scroller has been moved.

Constructor Index

 o ViewportScroller(int, int, double, double, double, double, double, double)

Method Index

 o handleEvent(Event)
 o mouseDown(Event, int, int)
 o mouseDrag(Event, int, int)
 o mouseUp(Event, int, int)
 o paint(Graphics)
 o paintOver()
 o preferredSize()
 o removeNotify()
 o setContentSize(double, double)
 o setOffset(double, double)
 o setPortSize(double, double)

Variables

 o SCROLL
  public static int SCROLL
Event indicating the scroller has been moved.
 o DONE
  public static int DONE

Constructors

 o ViewportScroller
  public ViewportScroller(int width,
                          int height,
                          double contentw,
                          double contenth,
                          double portw,
                          double porth,
                          double offsx,
                          double offsy)

Methods

 o paint
  public synchronized void paint(Graphics graphics)
Overrides:
paint in class Canvas
 o setPortSize
  public void setPortSize(double width,
                          double height)
 o setContentSize
  public void setContentSize(double width,
                             double height)
 o setOffset
  public void setOffset(double x,
                        double y)
 o preferredSize
  public Dimension preferredSize()
Overrides:
preferredSize in class Component
 o paintOver
  public synchronized void paintOver()
 o mouseDown
  public boolean mouseDown(Event e,
                           int x,
                           int y)
Overrides:
mouseDown in class Component
 o mouseDrag
  public boolean mouseDrag(Event e,
                           int x,
                           int y)
Overrides:
mouseDrag in class Component
 o mouseUp
  public boolean mouseUp(Event e,
                         int x,
                         int y)
Overrides:
mouseUp in class Component
 o handleEvent
  public boolean handleEvent(Event e)
Overrides:
handleEvent in class Component
 o removeNotify
  public synchronized void removeNotify()
Overrides:
removeNotify in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index