All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Scrollbar

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Scrollbar

public class Scrollbar
extends Component
implements Adjustable
A Scrollbar component which implements the Adjustable interface.


Variable Index

 o HORIZONTAL
The horizontal Scrollbar variable.
 o VERTICAL
The vertical Scrollbar variable.

Constructor Index

 o Scrollbar()
Constructs a new vertical Scrollbar.
 o Scrollbar(int)
Constructs a new Scrollbar with the specified orientation.
 o Scrollbar(int, int, int, int, int)
Constructs a new Scrollbar with the specified orientation, value, page size, and minumum and maximum values.

Method Index

 o addAdjustmentListener(AdjustmentListener)
Adds the specified adjustment listener to recieve adjustment events from this scrollbar.
 o addNotify()
Creates the Scrollbar's peer.
 o getBlockIncrement()
Gets the block increment for this scrollbar.
 o getLineIncrement()
Deprecated.
 o getMaximum()
Returns the maximum value of this Scrollbar.
 o getMinimum()
Returns the minimum value of this Scrollbar.
 o getOrientation()
Returns the orientation for this Scrollbar.
 o getPageIncrement()
Deprecated.
 o getUnitIncrement()
Gets the unit increment for this scrollbar.
 o getValue()
Returns the current value of this Scrollbar.
 o getVisible()
Deprecated.
 o getVisibleAmount()
Returns the visible amount of this Scrollbar.
 o paramString()
Returns the String parameters for this Scrollbar.
 o processAdjustmentEvent(AdjustmentEvent)
Processes adjustment events occurring on this scrollbar by dispatching them to any registered AdjustmentListener objects.
 o processEvent(AWTEvent)
Processes events on this scrollbar.
 o removeAdjustmentListener(AdjustmentListener)
Removes the specified adjustment listener so that it no longer receives adjustment events from this scrollbar..
 o setBlockIncrement(int)
Sets the block increment for this scrollbar.
 o setLineIncrement(int)
Deprecated.
 o setMaximum(int)
Sets the maximum value for this Scrollbar.
 o setMinimum(int)
Sets the minimum value for this Scrollbar.
 o setOrientation(int)
Sets the orientation for this Scrollbar.
 o setPageIncrement(int)
Deprecated.
 o setUnitIncrement(int)
Sets the unit increment for this scrollbar.
 o setValue(int)
Sets the value of this Scrollbar to the specified value.
 o setValues(int, int, int, int)
Sets the values for this Scrollbar.
 o setVisibleAmount(int)
Sets the visible amount of this Scrollbar, which is the range of values represented by the width of the scroll bar's bubble.

Variables

 o HORIZONTAL
Properties Public Constant 
   HORIZONTAL=int 
The horizontal Scrollbar variable.

 o VERTICAL
Properties Public Constant 
   VERTICAL=int 
The vertical Scrollbar variable.

Constructors

 o Scrollbar
    method Scrollbar() public 
Constructs a new vertical Scrollbar.

 o Scrollbar
    method Scrollbar(orientation=int) public 
Constructs a new Scrollbar with the specified orientation.

Parameters:
orientation - either Scrollbar.HORIZONTAL or Scrollbar.VERTICAL
Throws: IllegalArgumentException
When an illegal scrollbar orientation is given.
 o Scrollbar
    method Scrollbar(orientation=int, -
                     value=int, -
                     visible=int, -
                     minimum=int, -
                     maximum=int) public 
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

Methods

 o addNotify
    method addNotify()  public     
Creates the Scrollbar's peer. The peer allows you to modify the appearance of the Scrollbar without changing any of its functionality.

Overrides:
addNotify in class Component
 o getOrientation
    method getOrientation() returns int public     
Returns the orientation for this Scrollbar.

 o setOrientation
    method setOrientation(orientation=int)  public    protect 
Sets the orientation for this Scrollbar.

Parameters:
orientation - the orientation (HORIZONTAL or VERTICAL) of this scrollbar.
 o getValue
    method getValue() returns int public     
Returns the current value of this Scrollbar.

See Also:
getMinimum, getMaximum
 o setValue
    method setValue(newValue=int)  public    protect 
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 minus the visible amount, it becomes the new one of those values, respectively.
See Also:
getValue
 o getMinimum
    method getMinimum() returns int public     
Returns the minimum value of this Scrollbar.

See Also:
getMaximum, getValue
 o setMinimum
    method setMinimum(newMinimum=int)  public    protect 
Sets the minimum value for this Scrollbar.

Parameters:
minimum - the minimum value of the scrollbar
 o getMaximum
    method getMaximum() returns int public     
Returns the maximum value of this Scrollbar.

See Also:
getMinimum, getValue
 o setMaximum
    method setMaximum(newMaximum=int)  public    protect 
Sets the maximum value for this Scrollbar.

Parameters:
maximum - the maximum value of the scrollbar
 o getVisibleAmount
    method getVisibleAmount() returns int public     
Returns the visible amount of this Scrollbar.

 o getVisible
    method getVisible() returns int public     
Note: getVisible() is deprecated. As of JDK version 1.1, replaced by getVisibleAmount().

 o setVisibleAmount
    method setVisibleAmount(newAmount=int)  public    protect 
Sets the visible amount of this Scrollbar, which is the range of values represented by the width of the scroll bar's bubble.

Parameters:
visible - the amount visible per page
 o setUnitIncrement
    method setUnitIncrement(v=int)  public    protect 
Sets the unit increment for this scrollbar. This is the value that will be added (subtracted) when the user hits the unit down (up) gadgets.

 o setLineIncrement
    method setLineIncrement(v=int)  public     
Note: setLineIncrement() is deprecated. As of JDK version 1.1, replaced by setUnitIncrement(int).

 o getUnitIncrement
    method getUnitIncrement() returns int public     
Gets the unit increment for this scrollbar.

 o getLineIncrement
    method getLineIncrement() returns int public     
Note: getLineIncrement() is deprecated. As of JDK version 1.1, replaced by getUnitIncrement().

 o setBlockIncrement
    method setBlockIncrement(v=int)  public    protect 
Sets the block increment for this scrollbar. This is the value that will be added (subtracted) when the user hits the block down (up) gadgets.

 o setPageIncrement
    method setPageIncrement(v=int)  public     
Note: setPageIncrement() is deprecated. As of JDK version 1.1, replaced by setBlockIncrement().

 o getBlockIncrement
    method getBlockIncrement() returns int public     
Gets the block increment for this scrollbar.

 o getPageIncrement
    method getPageIncrement() returns int public     
Note: getPageIncrement() is deprecated. As of JDK version 1.1, replaced by getBlockIncrement().

 o setValues
    method setValues(value=int, -
                     visible=int, -
                     minimum=int, -
                     maximum=int)  public    protect 
Sets the values for this Scrollbar. This method enforces the following constraints: Values which do not meet these criteria are quietly coerced to the appropriate boundary value.

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
 o addAdjustmentListener
    method addAdjustmentListener(l=AdjustmentListener)  public     
Adds the specified adjustment listener to recieve adjustment events from this scrollbar.

Parameters:
l - the adjustment listener
 o removeAdjustmentListener
    method removeAdjustmentListener(l=AdjustmentListener)  public     
Removes the specified adjustment listener so that it no longer receives adjustment events from this scrollbar..

 o processEvent
    method processEvent(e=AWTEvent)  Inheritable     
Processes events on this scrollbar. If the event is an AdjustmentEvent, it invokes the processAdjustmentEvent method, else it invokes its superclass's processEvent.

Parameters:
e - the event
Overrides:
processEvent in class Component
 o processAdjustmentEvent
    method processAdjustmentEvent(e=AdjustmentEvent)  Inheritable     
Processes adjustment events occurring on this scrollbar by dispatching them to any registered AdjustmentListener objects. NOTE: This method will not be called unless adjustment events are enabled for this component; this happens when one of the following occurs: a) An AdjustmentListener object is registered via addAdjustmentListener() b) Adjustment events are enabled via enableEvents()

Parameters:
e - the adjustment event
See Also:
enableEvents
 o paramString
    method paramString() returns String Inheritable     
Returns the String parameters for this Scrollbar.

Overrides:
paramString in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index