| java.lang.Object sun.awt.X11.XScrollbar
All known Subclasses: sun.awt.X11.XVerticalScrollbar, sun.awt.X11.XHorizontalScrollbar,
XScrollbar | abstract class XScrollbar (Code) | | A simple vertical scroll bar.
|
Method Summary | |
abstract boolean | beforeThumb(int x, int y) | void | calculateArrowWidth() | protected Rectangle | calculateThumbRect() Method to calculate the scroll thumb's size and position. | protected Polygon | createArrowShape(boolean vertical, boolean up) | int | getArrowAreaWidth() | int | getArrowWidth() | int | getBlockIncrement() Gets the block increment for this scrollbar. | int | getMaximum() Returns the maximum value of this Scrollbar. | int | getMinimum() Returns the minimum value of this Scrollbar. | abstract protected Rectangle | getThumbArea() | int | getUnitIncrement() Gets the unit increment for this scrollbar. | int | getValue() Returns the current value of this Scrollbar. | int | getVisibleAmount() Returns the visible amount of this Scrollbar. | public void | handleMouseEvent(int id, int modifiers, int x, int y) | boolean | isInArrow(int x, int y) | boolean | isInThumb(int x, int y) Is x,y in the scroll thumb?
If we ever cache the thumb rect, we may need to clone the result of
calculateThumbRect(). | public boolean | needsRepaint() | void | notifyValue(int v) | void | notifyValue(int v, boolean isAdjusting) | void | paint(Graphics g, Color colors, boolean paintAll) | void | paintArrows(Graphics2D g, Color background, Color darkShadow, Color lightShadow) | abstract protected void | rebuildArrows() | void | scroll() Scroll one unit. | synchronized void | setBlockIncrement(int blockSize) Sets the block increment for this scrollbar. | synchronized void | setMaximum(int newMaximum) Sets the maximum value for this Scrollbar. | synchronized void | setMinimum(int newMinimum) Sets the minimum value for this Scrollbar. | public void | setMode(int mode) The set method for mode property. | public void | setSize(int width, int height) | synchronized void | setUnitIncrement(int unitSize) Sets the unit increment for this scrollbar. | synchronized void | setValue(int newValue) Sets the value of this Scrollbar to the specified value.
Parameters: value - the new value of the Scrollbar. | synchronized void | setValues(int value, int visible, int minimum, int maximum) Sets the values for this Scrollbar.
This method enforces the same constraints as in java.awt.Scrollbar:
- 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.
| synchronized void | setValues(int value, int visible, int minimum, int maximum, int unitSize, int blockSize) Sets param of this Scrollbar to the specified values. | synchronized void | setVisibleAmount(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. | void | startScrolling() Tell the scroller to start scrolling. | void | startScrollingInstance() Tell the instance scroller to start scrolling. | void | stopScrollingInstance() Tell the instance scroller to stop scrolling. | public String | toString() |
ALIGNMENT_VERTICALALIGNMENT_HORIZONTAL | final public static int ALIGNMENT_VERTICALALIGNMENT_HORIZONTAL(Code) | | |
barWidthbarLength | int barWidthbarLength(Code) | | |
widthheight | int widthheight(Code) | | |
beforeThumb | abstract boolean beforeThumb(int x, int y)(Code) | | |
calculateArrowWidth | void calculateArrowWidth()(Code) | | |
calculateThumbRect | protected Rectangle calculateThumbRect()(Code) | | Method to calculate the scroll thumb's size and position. This is
based on CalcSliderRect in ScrollBar.c of Motif source.
If we ever cache the thumb rect, we'll need to use a clone in
isInThumb().
|
createArrowShape | protected Polygon createArrowShape(boolean vertical, boolean up)(Code) | | Creates oriented directed arrow
|
getArrowAreaWidth | int getArrowAreaWidth()(Code) | | Width of the area reserved for arrow
|
getArrowWidth | int getArrowWidth()(Code) | | Width of the arrow image
|
getBlockIncrement | int getBlockIncrement()(Code) | | Gets the block increment for this scrollbar.
|
getThumbArea | abstract protected Rectangle getThumbArea()(Code) | | Gets the area of the scroll track
|
getUnitIncrement | int getUnitIncrement()(Code) | | Gets the unit increment for this scrollbar.
|
getVisibleAmount | int getVisibleAmount()(Code) | | Returns the visible amount of this Scrollbar.
|
handleMouseEvent | public void handleMouseEvent(int id, int modifiers, int x, int y)(Code) | | See Also: java.awt.event.MouseEvent See Also: MouseEvent.MOUSE_CLICKED See Also: MouseEvent.MOUSE_PRESSED See Also: MouseEvent.MOUSE_RELEASED See Also: MouseEvent.MOUSE_MOVED See Also: MouseEvent.MOUSE_ENTERED See Also: MouseEvent.MOUSE_EXITED See Also: MouseEvent.MOUSE_DRAGGED |
isInArrow | boolean isInArrow(int x, int y)(Code) | | |
isInThumb | boolean isInThumb(int x, int y)(Code) | | Is x,y in the scroll thumb?
If we ever cache the thumb rect, we may need to clone the result of
calculateThumbRect().
|
needsRepaint | public boolean needsRepaint()(Code) | | |
notifyValue | void notifyValue(int v)(Code) | | |
notifyValue | void notifyValue(int v, boolean isAdjusting)(Code) | | |
paint | void paint(Graphics g, Color colors, boolean paintAll)(Code) | | paint the scrollbar
Parameters: g - the graphics context to paint into Parameters: colors - the colors to use when painting the scrollbar Parameters: width - the width of the scrollbar Parameters: height - the height of the scrollbar Parameters: paintAll - paint the whole scrollbar if true, just the thumb is false |
rebuildArrows | abstract protected void rebuildArrows()(Code) | | |
scroll | void scroll()(Code) | | Scroll one unit.
See Also: notifyValue |
setBlockIncrement | synchronized void setBlockIncrement(int blockSize)(Code) | | 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.
Parameters: blockSize - is the block size for increment or decrement of the value |
setMaximum | synchronized void setMaximum(int newMaximum)(Code) | | Sets the maximum value for this Scrollbar.
Parameters: maximum - the maximum value of the scrollbar |
setMinimum | synchronized void setMinimum(int newMinimum)(Code) | | Sets the minimum value for this Scrollbar.
Parameters: minimum - the minimum value of the scrollbar |
setMode | public void setMode(int mode)(Code) | | The set method for mode property.
See 6243382 for more information
|
setSize | public void setSize(int width, int height)(Code) | | |
setUnitIncrement | synchronized void setUnitIncrement(int unitSize)(Code) | | 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.
Parameters: unitSize - is the unit size for increment or decrement of the value |
setValue | synchronized void setValue(int newValue)(Code) | | Sets the value of this Scrollbar to the specified value.
Parameters: value - the new value of the Scrollbar. If this value isbelow the current minimum or above the current maximum minus the visible amount, it becomes the new one of those values, respectively. See Also: XScrollbar.getValue |
setValues | synchronized void setValues(int value, int visible, int minimum, int maximum)(Code) | | Sets the values for this Scrollbar.
This method enforces the same constraints as in java.awt.Scrollbar:
- 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. Parameters: visible - is the amount visible per page Parameters: minimum - is the minimum value of the scrollbar Parameters: maximum - is the maximum value of the scrollbar |
setValues | synchronized void setValues(int value, int visible, int minimum, int maximum, int unitSize, int blockSize)(Code) | | Sets param of this Scrollbar to the specified values.
Parameters: value - is the position in the current window. Parameters: visible - is the amount visible per page Parameters: minimum - is the minimum value of the scrollbar Parameters: maximum - is the maximum value of the scrollbar Parameters: unitSize - is the unit size for increment or decrement of the value Parameters: page - is the block size for increment or decrement of the value See Also: XScrollbar.setValues |
setVisibleAmount | synchronized void setVisibleAmount(int newAmount)(Code) | | 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 |
startScrolling | void startScrolling()(Code) | | Tell the scroller to start scrolling.
|
startScrollingInstance | void startScrollingInstance()(Code) | | Tell the instance scroller to start scrolling.
See 6243382 for more information
|
stopScrollingInstance | void stopScrollingInstance()(Code) | | Tell the instance scroller to stop scrolling.
See 6243382 for more information
|
|
|