All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.Scrollbar

java.lang.Object
   |
   +----com.bulletproof.gui.Component
           |
           +----com.bulletproof.gui.Scrollbar

public class Scrollbar
extends Component
A class that produces a Scrollbar component.


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)
 o getMaximum()
Returns the maximum value of this Scrollbar.
 o getMinimum()
Returns the minimum value of this Scrollbar.
 o getMinimumSize()
Gets the minimum size of this component.
 o getOrientation()
Returns the orientation of this Scrollbar.
 o getValue()
Returns the current value of this Scrollbar.
 o getVisible()
Returns the visible amount of this Scrollbar.
 o paint(Graphics)
Paints the component.
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o removeAdjustmentListener(AdjustmentListener)
 o setBlockIncrement(int)
Sets the block increment for this scrollbar.
 o setMaximum(int)
Sets the maximum value for this Scrollbar.
 o setMinimum(int)
Sets the minimum value for this Scrollbar.
 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 setVisible(int)
Sets the visible amount of this Scrollbar, which is the range of values represented by the width of the scroll bar's bubble.
 o update(Graphics)
Updates the component.

Variables

 o HORIZONTAL
 public static final int HORIZONTAL
The horizontal Scrollbar variable.

 o VERTICAL
 public static final int VERTICAL
The vertical Scrollbar variable.

Constructors

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

 o Scrollbar
 public Scrollbar(int orientation)
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
 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

Methods

 o addAdjustmentListener
 public void addAdjustmentListener(AdjustmentListener al)
 o getValue
 public int getValue()
Returns the current value of this Scrollbar.

 o setValue
 public void setValue(int newValue)
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.
 o getOrientation
 public int getOrientation()
Returns the orientation of this Scrollbar.

 o getMinimum
 public int getMinimum()
Returns the minimum value of this Scrollbar.

 o setMinimum
 public void setMinimum(int newMinimum)
Sets the minimum value for this Scrollbar.

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

 o setMaximum
 public void setMaximum(int newMaximum)
Sets the maximum value for this Scrollbar.

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

 o setVisible
 public void setVisible(int newAmount)
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
 public void setUnitIncrement(int v)
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 setBlockIncrement
 public void setBlockIncrement(int v)
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 setValues
 public void setValues(int value,
                       int visible,
                       int minimum,
                       int maximum)
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 update
 public void update(Graphics g)
Updates the component.

Overrides:
update in class Component
 o paint
 public void paint(Graphics g)
Paints the component.

Overrides:
paint in class Component
 o processMouseEvent
 public void processMouseEvent(MouseEvent me)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Overrides:
processMouseEvent in class Component
 o removeAdjustmentListener
 public void removeAdjustmentListener(AdjustmentListener al)
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the minimum size of this component.

Overrides:
getMinimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index