charvax.swing
Class JScrollBar
- Adjustable
An implementation of a scrollbar. The user positions the knob in the
scrollbar to determine the contents of the viewing area.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
JScrollBar() - Creates a vertical scrollbar with default values.
|
JScrollBar(int orientation_) - Creates a scrollbar with the specified orientation
and with default values.
|
JScrollBar(int orientation_, int value_, int extent_, int min_, int max_) - Creates a scrollbar with the specified orientation, value,
extent, min and max.
|
addFocusListener , addKeyListener , contains , contains , debug , draw , getAlignmentX , getAlignmentY , getAncestorWindow , getBackground , getBounds , getCursesColor , getForeground , getHeight , getLocation , getLocationOnScreen , getName , getParent , getSize , getWidth , hasFocus , hide , invalidate , isDisplayed , isEnabled , isFocusTraversable , isTotallyObscured , isValid , isVisible , minimumSize , processEvent , processFocusEvent , processKeyEvent , processMouseEvent , repaint , requestFocus , requestSync , setBackground , setBounds , setBounds , setBounds , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
_adjustmentListeners
protected Vector _adjustmentListeners
A list of AdjustmentListeners registered for this component.
JScrollBar
public JScrollBar()
Creates a vertical scrollbar with default values.
JScrollBar
public JScrollBar(int orientation_)
Creates a scrollbar with the specified orientation
and with default values.
JScrollBar
public JScrollBar(int orientation_,
int value_,
int extent_,
int min_,
int max_)
Creates a scrollbar with the specified orientation, value,
extent, min and max.
draw
public void draw()
Draws the border of the component (if there is one).
- draw in interface JComponent
getBlockIncrement
public int getBlockIncrement()
Gets the block increment (the amount by which the value will
change when the arrow keys are pressed).
- getBlockIncrement in interface Adjustable
getMaximum
public int getMaximum()
Gets the maximum value of the adjustable object.
- getMaximum in interface Adjustable
getMinimum
public int getMinimum()
Gets the minimum value of the adjustable object.
- getMinimum in interface Adjustable
getOrientation
public int getOrientation()
Gets the scrollbar's orientation (VERTICAL or HORIZONTAL)
- getOrientation in interface Adjustable
getValue
public int getValue()
Gets the value of the adjustable object.
- getValue in interface Adjustable
getVisibleAmount
public int getVisibleAmount()
Gets the length of the proportional indicator.
- getVisibleAmount in interface Adjustable
processKeyEvent
public void processKeyEvent(KeyEvent ke_)
Invoke all the KeyListener callbacks that may have been registered
for this component. The KeyListener objects may modify the
keycodes, and can also set the "consumed" flag.
- processKeyEvent in interface Component
requestFocus
public void requestFocus()
This method should be invoked by all subclasses of Component
which override this method; because this method generates the
FOCUS_GAINED event when the component gains the keyboard focus.
- requestFocus in interface Component
setBlockIncrement
public void setBlockIncrement(int val_)
Sets the block increment of the scrollbar.
- setBlockIncrement in interface Adjustable
setMaximum
public void setMaximum(int max_)
Set the scrollbar's maximum value.
- setMaximum in interface Adjustable
setMinimum
public void setMinimum(int min_)
Set the scrollbar's minimum value.
- setMinimum in interface Adjustable
setSize
public void setSize(Dimension size_)
Set the size of the component on the screen. If the scrollbar is
vertical, ignore the specified width, and if it is horizontal, ignore
the specified height.
setValue
public void setValue(int value_)
Set the scrollbar's value.
- setValue in interface Adjustable
setVisibleAmount
public void setVisibleAmount(int extent_)
Set the scrollbar's extent (a.k.a "visible amount").
- setVisibleAmount in interface Adjustable