public class ProgressBar extends Control
Note: Only one of the styles HORIZONTAL and VERTICAL may be specified.
IMPORTANT: This class is not intended to be subclassed.
Constructor and Description |
---|
ProgressBar(Composite parent,
int style)
Constructs a new instance of this class given its parent
and a style value describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaximum()
Returns the maximum value which the receiver will allow.
|
int |
getMinimum()
Returns the minimum value which the receiver will allow.
|
int |
getSelection()
Returns the single 'selection' that is the receiver's position.
|
int |
getState()
Returns the state of the receiver.
|
void |
setMaximum(int value)
Sets the maximum value that the receiver will allow.
|
void |
setMinimum(int value)
Sets the minimum value that the receiver will allow.
|
void |
setSelection(int value)
Sets the single 'selection' that is the receiver's
position to the argument which must be greater than or equal
to zero.
|
void |
setState(int state)
Sets the state of the receiver.
|
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFocus, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public ProgressBar(Composite 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 constructIllegalArgumentException
- SWTException
- SWT.SMOOTH
,
SWT.HORIZONTAL
,
SWT.VERTICAL
,
SWT.INDETERMINATE
,
Widget.checkSubclass()
,
Widget.getStyle()
public int getMaximum()
SWTException
- public int getMinimum()
SWTException
- public int getSelection()
SWTException
- public int getState()
SWTException
- public void setMaximum(int value)
value
- the new maximum, which must be greater than the current minimumSWTException
- public void setMinimum(int value)
value
- the new minimum, which must be nonnegative and less than the current maximumSWTException
- public void setSelection(int value)
value
- the new selection (must be zero or greater)SWTException
- public void setState(int state)
Note: This operation is a hint and is not supported on platforms that do not have this concept.
state
- the new stateSWTException
- Copyright © 2017. All Rights Reserved.