|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.widgets.Widget | +--org.eclipse.swt.widgets.ScrollBar
Safe:
Field Summary | |
(package private) int |
increment
|
(package private) int |
pageIncrement
|
(package private) Scrollable |
parent
|
Fields inherited from class org.eclipse.swt.widgets.Widget |
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values |
Constructor Summary | |
(package private) |
ScrollBar(Scrollable parent,
int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
Method Summary | |
void |
addSelectionListener(SelectionListener listener)
Enabled: Adds the listener to the collection of listeners who will be notified when the receiver's value changes, by sending it one of the messages defined in the SelectionListener
interface. |
(package private) static int |
checkStyle(int style)
|
(package private) void |
createWidget()
|
void |
dispose()
Enabled: |
(package private) Rectangle |
getBounds()
|
Display |
getDisplay()
Suppressed: |
boolean |
getEnabled()
Enabled: Returns true if the receiver is enabled, and
false otherwise. |
int |
getIncrement()
Enabled: Returns the amount that the receiver's value will be modified by when the up/down (or right/left) arrows are pressed. |
int |
getMaximum()
Enabled: Returns the maximum value which the receiver will allow. |
int |
getMinimum()
Enabled: Returns the minimum value which the receiver will allow. |
int |
getPageIncrement()
Enabled: Returns the amount that the receiver's value will be modified by when the page increment/decrement areas are selected. |
Scrollable |
getParent()
Suppressed: Returns the receiver's parent, which must be scrollable. |
int |
getSelection()
Enabled: Returns the single selection that is the receiver's value. |
Point |
getSize()
Enabled: Returns a point describing the receiver's size. |
int |
getThumb()
Enabled: Answers the size of the receiver's thumb relative to the difference between its maximum and minimum values. |
boolean |
getVisible()
Enabled: Returns true if the receiver is visible, and
false otherwise. |
(package private) int |
hwndScrollBar()
|
boolean |
isEnabled()
Enabled: Returns true if the receiver is enabled and all
of the receiver's ancestors are enabled, and false
otherwise. |
boolean |
isVisible()
Enabled: Returns true if the receiver is visible and all
of the receiver's ancestors are visible and false
otherwise. |
(package private) void |
releaseChild()
|
(package private) void |
releaseWidget()
|
void |
removeSelectionListener(SelectionListener listener)
Enabled: Removes the listener from the collection of listeners who will be notified when the receiver's value changes. |
(package private) int |
scrollBarType()
|
void |
setEnabled(boolean enabled)
Enabled: Enables the receiver if the argument is true ,
and disables it otherwise. |
void |
setIncrement(int value)
Enabled: Sets the amount that the receiver's value will be modified by when the up/down (or right/left) arrows are pressed to the argument, which must be at least one. |
void |
setMaximum(int value)
Enabled: Sets the maximum value which the receiver will allow to be the argument which must be greater than or equal to zero. |
void |
setMinimum(int value)
Enabled: Sets the minimum value which the receiver will allow to be the argument which must be greater than or equal to zero. |
void |
setPageIncrement(int value)
Enabled: Sets the amount that the receiver's value will be modified by when the page increment/decrement areas are selected to the argument, which must be at least one. |
void |
setSelection(int selection)
Enabled: Sets the single selection that is the receiver's value to the argument which must be greater than or equal to zero. |
void |
setThumb(int value)
Enabled: Sets the size of the receiver's thumb relative to the difference between its maximum and minimum values to the argument which must be at least one. |
void |
setValues(int selection,
int minimum,
int maximum,
int thumb,
int increment,
int pageIncrement)
Enabled: Sets the receiver's selection, minimum value, maximum value, thumb, increment and page increment all at once. |
void |
setVisible(boolean visible)
Enabled: Marks the receiver as visible if the argument is true ,
and marks it invisible otherwise. |
(package private) org.eclipse.swt.internal.win32.LRESULT |
wmScrollChild(int wParam,
int lParam)
|
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkBits, checkOrientation, checkParent, checkSubclass, checkWidget, destroyWidget, error, filters, getData, getData, getName, getNameText, getStyle, hooks, isDisposed, isListening, isValidSubclass, isValidThread, mbcsToWcs, mbcsToWcs, notifyListeners, postEvent, postEvent, releaseHandle, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, toString, wcsToMbcs, wcsToMbcs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Scrollable parent
int increment
int pageIncrement
Constructor Detail |
ScrollBar(Scrollable parent, int style)
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a composite control which will be the parent of the new instance (cannot be null)style
- the style of control to constructSWT.HORIZONTAL
,
SWT.VERTICAL
,
Widget.checkSubclass()
,
Widget.getStyle()
Method Detail |
public void addSelectionListener(SelectionListener listener)
SelectionListener
interface.
When widgetSelected
is called, the event object detail field contains one of the following values:
0
- for the end of a drag.
SWT.DRAG
.
SWT.HOME
.
SWT.END
.
SWT.ARROW_DOWN
.
SWT.ARROW_UP
.
SWT.PAGE_DOWN
.
SWT.PAGE_UP
.
widgetDefaultSelected
is not called.
listener
- the listener which should be notifiedSelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
static int checkStyle(int style)
void createWidget()
public void dispose()
dispose
in class Widget
Widget.addDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.removeDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.checkWidget()
Rectangle getBounds()
public Display getDisplay()
getDisplay
in class Widget
public boolean getEnabled()
true
if the receiver is enabled, and
false
otherwise. A disabled control is typically
not selectable from the user interface and draws with an
inactive or "grayed" look.
isEnabled()
public int getIncrement()
public int getMaximum()
public int getMinimum()
public int getPageIncrement()
public Scrollable getParent()
public int getSelection()
public Point getSize()
public int getThumb()
ScrollBar
public boolean getVisible()
true
if the receiver is visible, and
false
otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.
int hwndScrollBar()
public boolean isEnabled()
true
if the receiver is enabled and all
of the receiver's ancestors are enabled, and false
otherwise. A disabled control is typically not selectable from the
user interface and draws with an inactive or "grayed" look.
getEnabled()
public boolean isVisible()
true
if the receiver is visible and all
of the receiver's ancestors are visible and false
otherwise.
getVisible()
void releaseChild()
releaseChild
in class Widget
void releaseWidget()
releaseWidget
in class Widget
public void removeSelectionListener(SelectionListener listener)
listener
- the listener which should no longer be notifiedSelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
int scrollBarType()
public void setEnabled(boolean enabled)
true
,
and disables it otherwise. A disabled control is typically
not selectable from the user interface and draws with an
inactive or "grayed" look.
enabled
- the new enabled statepublic void setIncrement(int value)
value
- the new increment (must be greater than zero)public void setMaximum(int value)
value
- the new maximum (must be zero or greater)public void setMinimum(int value)
value
- the new minimum (must be zero or greater)public void setPageIncrement(int value)
public void setSelection(int selection)
public void setThumb(int value)
value
- the new thumb value (must be at least one)ScrollBar
public void setValues(int selection, int minimum, int maximum, int thumb, int increment, int pageIncrement)
Note: This is equivalent to setting the values individually using the appropriate methods, but may be implemented in a more efficient fashion on some platforms.
selection
- the new selection valueminimum
- the new minimum valuemaximum
- the new maximum valuethumb
- the new thumb valueincrement
- the new increment valuepageIncrement
- the new pageIncrement valuepublic void setVisible(boolean visible)
true
,
and marks it invisible otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.
visible
- the new visibility stateorg.eclipse.swt.internal.win32.LRESULT wmScrollChild(int wParam, int lParam)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |