Class java.awt.Scrollbar
All Packages This Package Previous Next
Class java.awt.Scrollbar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Scrollbar
-
public class
Scrollbar
-
extends Component
A Scrollbar component.
-
Version:
-
1.16 10/05/95
-
Author:
-
Sami Shaio
-
HORIZONTAL
-
The horizontal Scrollbar variable.
-
VERTICAL
-
The vertical Scrollbar variable.
-
Scrollbar()
-
Constructs a new vertical Scrollbar.
-
Scrollbar(int)
-
Constructs a new Scrollbar with the specified orientation.
-
Scrollbar(int, int, int, int, int)
-
Constructs a new Scrollbar with the specified orientation,
value, page size, and minumum and maximum values.
-
addNotify()
-
Create the Scrollbar's peer.
-
getMaximum()
-
Returns the maximum value of this Scrollbar.
-
getMinimum()
-
Returns the minimum value of this Scrollbar.
-
getOrientation()
-
Returns the orientation for this Scrollbar.
-
getValue()
-
Returns the current value of this Scrollbar.
-
getVisible()
-
Returns the visible amount of the Scrollbar.
-
paramString()
-
Returns the String parameters for this Scrollbar.
-
setValue(int)
-
Sets the value of this Scrollbar to the specified value.
-
setValues(int, int, int, int)
-
Sets the values for this Scrollbar.
HORIZONTAL
public final static int HORIZONTAL
-
The horizontal Scrollbar variable.
VERTICAL
public final static int VERTICAL
-
The vertical Scrollbar variable.
Scrollbar
public Scrollbar()
-
Constructs a new vertical Scrollbar.
Scrollbar
public Scrollbar(int orientation)
-
Constructs a new Scrollbar with the specified orientation.
-
Parameters:
-
orientation
-
either Scrollbar.HORIZONTAL or Scrollbar.VERTICAL
-
Throws: IllegalArgumentException
-
If an illegal scrollbar orientation is given.
Scrollbar
public Scrollbar(int orientation,
int value,
int visible,
int minimum,
int maximum)
-
Constructs a new Scrollbar with the specified orientation,
value, page size, and minumum and maximum values.
-
Parameters:
-
orientation
-
either Scrollbar.HORIZONTAL or Scrollbar.VERTICAL
-
value
-
the scrollbar's value
-
visible
-
the size of the visible portion of the
scrollable area. The scrollbar will use this value when paging up
or down by a page.
-
minimum
-
the minimum value of the scrollbar
-
maximum
-
the maximum value of the scrollbar
addNotify
public synchronized void addNotify()
-
Create the Scrollbar's peer. The peer allows us to modify the appearance of the
Scrollbar without changing any of its functionality.
-
Overrides:
-
addNotify in class Component
getOrientation
public int getOrientation()
-
Returns the orientation for this Scrollbar.
getValue
public int getValue()
-
Returns the current value of this Scrollbar.
-
See Also:
-
minimum,
maximum
setValue
public void setValue(int value)
-
Sets the value of this Scrollbar to the specified value.
-
Parameters:
-
value
-
the new value of the Scrollbar. If this value is
below the current minimum or above the current maximum, it becomes the
new one of those values, respectively.
-
See Also:
-
getValue
getMinimum
public int getMinimum()
-
Returns the minimum value of this Scrollbar.
-
See Also:
-
maximum,
value
getMaximum
public int getMaximum()
-
Returns the maximum value of this Scrollbar.
-
See Also:
-
minimum,
value
getVisible
public int getVisible()
-
Returns the visible amount of the Scrollbar.
setValues
public void setValues(int value,
int visible,
int minimum,
int maximum)
-
Sets the values for this Scrollbar.
-
Parameters:
-
value
-
is the position in the current window.
-
visible
-
is the amount visible per page
-
minimum
-
is the minimum value of the scrollbar
-
maximum
-
is the maximum value of the scrollbar
paramString
protected String paramString()
-
Returns the String parameters for this Scrollbar.
-
Overrides:
-
paramString in class Component
All Packages This Package Previous Next