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.
-
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.
-
addAdjustmentListener(AdjustmentListener)
-
-
getMaximum()
- Returns the maximum value of this Scrollbar.
-
getMinimum()
- Returns the minimum value of this Scrollbar.
-
getMinimumSize()
- Gets the minimum size of this component.
-
getOrientation()
- Returns the orientation of this Scrollbar.
-
getValue()
- Returns the current value of this Scrollbar.
-
getVisible()
- Returns the visible amount of this Scrollbar.
-
paint(Graphics)
-
Paints the component.
-
processMouseEvent(MouseEvent)
-
Processes mouse events occurring on this component by
dispatching them to any registered MouseListener objects.
-
removeAdjustmentListener(AdjustmentListener)
-
-
setBlockIncrement(int)
- Sets the block increment for this scrollbar.
-
setMaximum(int)
- Sets the maximum value for this Scrollbar.
-
setMinimum(int)
- Sets the minimum value for this Scrollbar.
-
setUnitIncrement(int)
- Sets the unit increment 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.
-
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.
-
update(Graphics)
-
Updates the component.
HORIZONTAL
public static final int HORIZONTAL
- The horizontal Scrollbar variable.
VERTICAL
public static final 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
- When 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
addAdjustmentListener
public void addAdjustmentListener(AdjustmentListener al)
getValue
public int getValue()
- Returns the current value of this Scrollbar.
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.
getOrientation
public int getOrientation()
- Returns the orientation of this Scrollbar.
getMinimum
public int getMinimum()
- Returns the minimum value of this Scrollbar.
setMinimum
public void setMinimum(int newMinimum)
- Sets the minimum value for this Scrollbar.
- Parameters:
- minimum - the minimum value of the scrollbar
getMaximum
public int getMaximum()
- Returns the maximum value of this Scrollbar.
setMaximum
public void setMaximum(int newMaximum)
- Sets the maximum value for this Scrollbar.
- Parameters:
- maximum - the maximum value of the scrollbar
getVisible
public int getVisible()
- Returns the visible amount of this Scrollbar.
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
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.
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.
setValues
public void setValues(int value,
int visible,
int minimum,
int maximum)
- Sets the values for this Scrollbar.
This method enforces the following constraints:
- The maximum must be greater than the minimum
- The value must be greater than or equal to the minumum
and less than or equal to the maximum minus the
visible amount
- The visible amount must be greater than 1 and less than or equal
to the difference between the maximum and minimum values.
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
update
public void update(Graphics g)
- Updates the component.
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Paints the component.
- Overrides:
- paint in class Component
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
removeAdjustmentListener
public void removeAdjustmentListener(AdjustmentListener al)
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