Top Description Fields Constructors Methods
org.eclipse.swt.custom

public Class AnimatedProgress

extends Canvas
Class Inheritance
Annotations
@Deprecated
Imports
org.eclipse.swt.*, org.eclipse.swt.events.*, org.eclipse.swt.graphics.*, org.eclipse.swt.widgets.*

Deprecated

As of Eclipse 2.1, use ProgressBar with the style SWT.INDETERMINATE

Styles:
VERTICAL, HORIZONTAL, BORDER

A control for showing progress feedback for a long running operation.
See Also
Sample code and further information

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv static final int
pack-priv static final int
pack-priv int
pack-priv boolean
pack-priv boolean
pack-priv static final int
pack-priv int

Constructor Summary

AccessConstructor and Description
public
AnimatedProgress(Composite
a widget which will be the parent of the new instance (cannot be null)
parent
,
int
the style of widget to construct
style
)

Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

Method Summary

Modifier and TypeMethod and Description
private static int
public synchronized void
clear()

Stop the animation if it is not already stopped and reset the presentation to a blank appearance.

public Point
computeSize(int
the width hint (can be SWT.DEFAULT)
wHint
,
int
the height hint (can be SWT.DEFAULT)
hHint
,
boolean
true if the control's contents have changed, and false otherwise
changed
)

Overrides org.eclipse.swt.widgets.Control.computeSize.

Returns the preferred size (in points) of the receiver.
private void
drawBevelRect(GC gc, int x, int y, int w, int h, Color topleft, Color bottomright)

pack-priv void
pack-priv void
public synchronized void
start()

Start the animation.

public synchronized void
stop()

Stop the animation.

Inherited from org.eclipse.swt.widgets.Canvas:
drawBackgroundgetCaretgetIMEscrollsetCaretsetFontsetIME

Field Detail

activeback to summary
pack-priv boolean active
DEFAULT_HEIGHTback to summary
pack-priv static final int DEFAULT_HEIGHT

Hides org.eclipse.swt.widgets.Widget.DEFAULT_HEIGHT.

DEFAULT_WIDTHback to summary
pack-priv static final int DEFAULT_WIDTH

Hides org.eclipse.swt.widgets.Widget.DEFAULT_WIDTH.

orientationback to summary
pack-priv int orientation
showBorderback to summary
pack-priv boolean showBorder
showStripesback to summary
pack-priv boolean showStripes
SLEEPback to summary
pack-priv static final int SLEEP
valueback to summary
pack-priv int value

Constructor Detail

AnimatedProgressback to summary
public AnimatedProgress(Composite parent, int style)

Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

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.

Parameters
parent:Composite

a widget which will be the parent of the new instance (cannot be null)

style:int

the style of widget to construct

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the parent is null
SWTException:
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
See Also
SWT#VERTICAL, SWT#HORIZONTAL, SWT#BORDER, getStyle()

Method Detail

checkStyleback to summary
private static int checkStyle(int style)

Hides org.eclipse.swt.widgets.Composite.checkStyle.

clearback to summary
public synchronized void clear()

Stop the animation if it is not already stopped and reset the presentation to a blank appearance.

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
computeSizeback to summary
public Point computeSize(int wHint, int hHint, boolean changed)

Overrides org.eclipse.swt.widgets.Control.computeSize.

Doc from org.eclipse.swt.widgets.Control.computeSize.

Returns the preferred size (in points) of the receiver.

The preferred size of a control is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the control need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant SWT.DEFAULT is passed for the hint.

If the changed flag is true, it indicates that the receiver's contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will be false, so layout manager caches can be retained.

Parameters
wHint:int

the width hint (can be SWT.DEFAULT)

hHint:int

the height hint (can be SWT.DEFAULT)

changed:boolean

true if the control's contents have changed, and false otherwise

Returns:Point

the preferred size of the control.

Annotations
@Override
drawBevelRectback to summary
private void drawBevelRect(GC gc, int x, int y, int w, int h, Color topleft, Color bottomright)
paintback to summary
pack-priv void paint(PaintEvent event)
paintStripesback to summary
pack-priv void paintStripes(GC gc)
startback to summary
public synchronized void start()

Start the animation.

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
stopback to summary
public synchronized void stop()

Stop the animation. Freeze the presentation at its current appearance.