public class BScrollBar extends Widget
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:
Modifier and Type | Class and Description |
---|---|
static class |
BScrollBar.Orientation
This inner class represents an orientation for the scrollbar.
|
Modifier and Type | Field and Description |
---|---|
static BScrollBar.Orientation |
HORIZONTAL |
static BScrollBar.Orientation |
VERTICAL |
Constructor and Description |
---|
BScrollBar()
Create a new BScrollBar.
|
BScrollBar(int value,
int extent,
int minimum,
int maximum,
BScrollBar.Orientation orientation)
Create a new BScrollBar.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible
addEventLink, addEventLink, removeEventLink
public static final BScrollBar.Orientation HORIZONTAL
public static final BScrollBar.Orientation VERTICAL
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.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)
Written by Peter Eastman.