|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object buoy.event.EventSource buoy.widget.Widget buoy.widget.BScrollBar
public class BScrollBar
A BScrollBar is a Widget that allows the user to select a single value by dragging a "thumb" along a bar. The size of the thumb can be variable, so as to represent a selected region of the range. The size and position of the thumb are determined by four properties:
minimum: the lower end of the range represented by the scrollbar
value: the lower end of the "selected region" represented by the thumb
extent: the size of the "selected region" represented by the thumb
maximum: the upper end of the range represented by the scrollbar
Thus, the "value" of the scrollbar can vary between minimum and maximum-extent, inclusive.
In addition to the event types generated by all Widgets, BScrollBars generate the following event types:
Nested Class Summary | |
---|---|
static class |
BScrollBar.Orientation
This inner class represents an orientation for the scrollbar. |
Field Summary | |
---|---|
static BScrollBar.Orientation |
HORIZONTAL
|
static BScrollBar.Orientation |
VERTICAL
|
Constructor Summary | |
---|---|
BScrollBar()
Create a new BScrollBar. |
|
BScrollBar(int value,
int extent,
int minimum,
int maximum,
BScrollBar.Orientation orientation)
Create a new BScrollBar. |
Method Summary | |
---|---|
int |
getBlockIncrement()
Get the amount by which this BScrollBar will scroll when the user clicks in the body of the scrollbar. |
javax.swing.JScrollBar |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
int |
getExtent()
Get the extent of this BScrollBar's thumb. |
int |
getMaximum()
Get the maximum value of the range represented by this BScrollBar. |
int |
getMinimum()
Get the minimum value of the range represented by this BScrollBar. |
BScrollBar.Orientation |
getOrientation()
Get the orientation (HORIZONTAL or VERTICAL) of this BScrollBar. |
int |
getUnitIncrement()
Get the amount by which this BScrollBar will scroll when the user clicks on one of the arrows at its end. |
int |
getValue()
Get the current value of this BScrollBar. |
void |
setBlockIncrement(int increment)
Set the amount by which this BScrollBar will scroll when the user clicks in the body of the scrollbar. |
void |
setExtent(int value)
Set the extent of this BScrollBar's thumb. |
void |
setMaximum(int value)
Set the maximum value of the range represented by this BScrollBar. |
void |
setMinimum(int value)
Set the minimum value of the range represented by this BScrollBar. |
void |
setOrientation(BScrollBar.Orientation orientation)
Set the orientation (HORIZONTAL or VERTICAL) of this BScrollBar. |
void |
setUnitIncrement(int increment)
Set the amount by which this BScrollBar will scroll when the user clicks on one of the arrows at its end. |
void |
setValue(int value)
Set the current value of this BScrollBar. |
Methods inherited from class buoy.widget.Widget |
---|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible |
Methods inherited from class buoy.event.EventSource |
---|
addEventLink, addEventLink, removeEventLink |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BScrollBar.Orientation HORIZONTAL
public static final BScrollBar.Orientation VERTICAL
Constructor Detail |
---|
public BScrollBar()
public BScrollBar(int value, int extent, int minimum, int maximum, BScrollBar.Orientation orientation)
value
- the BScrollBar's initial valueextent
- the size of the region represented by the thumbminimum
- the minimum value for the range represented by the BScrollBarmaximum
- the maximum value for the range represented by the BScrollBarorientation
- defines how the BScrollBar should be drawn and positioned. This should be
HORIZONTAL or VERTICAL.Method Detail |
---|
public javax.swing.JScrollBar getComponent()
Widget
getComponent
in class Widget
public int getMinimum()
public void setMinimum(int value)
public int getMaximum()
public void setMaximum(int value)
public int getValue()
public void setValue(int value)
public int getExtent()
public void setExtent(int value)
public BScrollBar.Orientation getOrientation()
public void setOrientation(BScrollBar.Orientation orientation)
public int getUnitIncrement()
public void setUnitIncrement(int increment)
public int getBlockIncrement()
public void setBlockIncrement(int increment)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |