com.sun.kjava
Class VerticalScrollBar

java.lang.Object
  |
  +--com.sun.kjava.VerticalScrollBar

public class VerticalScrollBar
extends java.lang.Object

A vertical scroll bar user interface object.


Field Summary
static int SCROLL_BAR_WIDTH
           
 
Constructor Summary
VerticalScrollBar(ScrollOwner so)
          Create a new VerticalScrollBar and associate it with an owner.
VerticalScrollBar(ScrollOwner so, int x, int y, int h, int min, int max, int initVal)
          Create a new VerticalScrollBar and associate it with an owner.
 
Method Summary
 boolean contains(int x, int y)
          Does the scroll bar contain the point in question?
 void handleKeyDown(int keyCode)
          The user pressed a key.
 void handlePenDown(int x, int y)
          The pen went down somewhere.
 void handlePenMove(int x, int y)
          Deal with the fact that the pen moved.
protected  void init(int x, int y, int h, int min, int max, int initVal)
          Initialize the scroll bar.
 void paint()
          Paint the VerticalScrollBar.
 void setBounds(int x, int y, int h, int min, int max, int initVal)
          Set the scroll bar's bounds.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCROLL_BAR_WIDTH

public static int SCROLL_BAR_WIDTH
Constructor Detail

VerticalScrollBar

public VerticalScrollBar(ScrollOwner so)
Create a new VerticalScrollBar and associate it with an owner.
Parameters:
so - the ScrollOwner that owns this scroll bar.

VerticalScrollBar

public VerticalScrollBar(ScrollOwner so,
                         int x,
                         int y,
                         int h,
                         int min,
                         int max,
                         int initVal)
Create a new VerticalScrollBar and associate it with an owner.
Parameters:
so - the ScrollOwner that owns this scroll bar.
x - the X coordinate of the scroll bar
y - the Y coordinate of the scroll bar
h - the height of the scroll bar
min - the minimum value allowed
max - the maximum value allowed
initVal - the initial value
Method Detail

setBounds

public void setBounds(int x,
                      int y,
                      int h,
                      int min,
                      int max,
                      int initVal)
Set the scroll bar's bounds.
Parameters:
x - the X coordinate of the scroll bar
y - the Y coordinate of the scroll bar
h - the height of the scroll bar
min - the minimum value allowed
max - the maximum value allowed
initVal - the initial value

init

protected void init(int x,
                    int y,
                    int h,
                    int min,
                    int max,
                    int initVal)
Initialize the scroll bar.
Parameters:
x - the X coordinate of the scroll bar
y - the Y coordinate of the scroll bar
h - the height of the scroll bar
min - the minimum value allowed
max - the maximum value allowed
initVal - the initial value

contains

public boolean contains(int x,
                        int y)
Does the scroll bar contain the point in question?
Parameters:
x - the X coordinate to test
y - the Y coordinate to test
Returns:
true if the point is within the scroll bar's bounds

handlePenMove

public void handlePenMove(int x,
                          int y)
Deal with the fact that the pen moved.
Parameters:
x - the X coordinate of the pen's position
y - the Y coordinate of the pen's position

handleKeyDown

public void handleKeyDown(int keyCode)
The user pressed a key. Deal with it.
Parameters:
keyCode - the code of the key the user pressed

handlePenDown

public void handlePenDown(int x,
                          int y)
The pen went down somewhere. Deal with it.
Parameters:
x - the X coordinate of the pen's position
y - the Y coordinate of the pen's position

paint

public void paint()
Paint the VerticalScrollBar.