Example usage for Java javax.swing JScrollBar fields, constructors, methods, implement or subclass
The text is from its open source code.
JScrollBar(int orientation) Creates a scrollbar with the specified orientation and the following initial values: minimum = 0 maximum = 100 value = 0 extent = 10 | |
JScrollBar(int orientation, int value, int extent, int min, int max) Creates a scrollbar with the specified orientation, value, extent, minimum, and maximum. | |
JScrollBar() Creates a vertical scrollbar with the following initial values: minimum = 0 maximum = 100 value = 0 extent = 10 |
void | addAdjustmentListener(AdjustmentListener l) Adds an AdjustmentListener. |
void | addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. |
void | addMouseWheelListener(MouseWheelListener l) Adds the specified mouse wheel listener to receive mouse wheel events from this component. |
int | getBlockIncrement(int direction) Returns the amount to change the scrollbar's value by, given a block (usually "page") up/down request. |
int | getMaximum() The maximum value of the scrollbar is maximum - extent. |
int | getMinimum() Returns the minimum value supported by the scrollbar (usually zero). |
BoundedRangeModel | getModel() Returns data model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent. |
MouseListener[] | getMouseListeners() Returns an array of all the mouse listeners registered on this component. |
Dimension | getPreferredSize() If the preferredSize has been set to a non-null value just returns it. |
Dimension | getSize() Returns the size of this component in the form of a Dimension object. |
int | getUnitIncrement(int direction) Returns the amount to change the scrollbar's value by, given a unit up/down request. |
int | getValue() Returns the scrollbar's value. |
boolean | getValueIsAdjusting() True if the scrollbar knob is being dragged. |
int | getVisibleAmount() Returns the scrollbar's extent, aka its "visibleAmount". |
boolean | isEnabled() Determines whether this component is enabled. |
boolean | isVisible() Determines whether this component should be visible when its parent is visible. |
void | removeAdjustmentListener(AdjustmentListener l) Removes an AdjustmentEvent listener. |
void | repaint() Repaints this component. |
void | setBlockIncrement(int blockIncrement) Sets the blockIncrement property. |
void | setEnabled(boolean x) Enables the component so that the knob position can be changed. |
void | setMaximum(int maximum) Sets the model's maximum property. |
void | setMinimum(int minimum) Sets the model's minimum property. |
void | setModel(BoundedRangeModel newModel) Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent. |
void | setPreferredSize(Dimension preferredSize) Sets the preferred size of this component. |
void | setUnitIncrement(int unitIncrement) Sets the unitIncrement property. |
void | setValue(int value) Sets the scrollbar's value. |
void | setVisibleAmount(int extent) Set the model's extent property. |