-
Notifications
You must be signed in to change notification settings - Fork 43
ProgressBar
- ProgressBar / AbstractProgressBar, DeterminateProgressBar
- HorizontalProgressBar
- VerticalProgressBar
- IndeterminateProgressBar
There are 2 types of progress bar.
- First one includes all descendants of abstract class DeterminateProgressBar and allows read progress bar state.
- Second one is IndeterminateProgressBar. This does not allow to read progress bar state.
Horizontal progress bar is determined progress bar.
Look up a horizontal progress bar with index 0
HorizontalProgressBar horizontalBar = new HorizontalProgressBar(0);
Get minimum value of horizontal progress bar
int minimum = horizontalBar.getMinimum();
Get maximum value of horizontal progress bar
int maximum = horizontalBar.getMaximum();
Get current value of horizontal progress bar
int currentValue = horizontalBar.getSelection();
Vertical progress bar is determined progress bar.
Look up a vertical progress bar with index 0
VerticalProgressBar verticalBar = new VerticalProgressBar(0);
Get minimum value of vertical progress bar
int minimum = verticalBar.getMinimum();
Get maximum value of vertical progress bar
int maximum = verticalBar.getMaximum();
Get current value of vertical progress bar
int currentValue = verticalBar.getSelection();
Look up a indeterminate progress bar with index 0
IndeterminateProgressBar indeterminateBar = new IndeterminateProgressBar(0);
On some platforms is possible to check state of progress bar. Not every platform has to support this feature. There are 3 states: SWT.NORMAL, SWT.ERROR, SWT.PAUSED. To check the state of progress bar use the following code:
int state = bar.getState();