Control | +--Animationpublic class Animation
Provides the animation common control. This control plays an .avi animation file in its window. The methods play and stop control the playback of the video, and the FileName property (getFileName and setFileName) allow you to load in new files.
Constructors
Name | Description |
---|---|
Animation() | Topic under construction. |
Methods
Name | Description |
---|---|
addOnStart(EventHandler value) | Adds an event handler for the OnStart event notification. |
addOnStop(EventHandler value) | Adds an event handler for the OnStop event notification. |
getAutoPlay() | Indicates whether the Animation control is configured to start playing as soon as a video clip is opened. |
getCentered() | Indicates whether the animation will be in the top-left of the animation control's area or whether it will be centered as necessary. |
getCreateParams() | Retrieves the parameters when the window was created. |
getFileName() | Retrieves the file name of the animation to be played. |
getTransparent() | Indicates whether Windows will draw the animation using a transparent background, or the background color specified in the animation clip. |
getUseTimer() | Indicates whether a Win32 timer instead of a separate thread is used to manage playback of the animation. |
onStart(Event e) | Fires the OnStart event. |
onStop(Event e) | Fires the OnStop event. |
play() | Plays the animation clip from beginning to end. |
play(int repeat, int start, int end) | Plays the animation clip the specified number of times with the specified start and end frames. |
recreateHandle() | Override this method to guarantee the file name is restored correctly after re-creation. |
removeOnStart(EventHandler value) | Removes the specified event handler for the OnStart event. |
removeOnStop(EventHandler value) | Removes the specified event handler for the OnStop event. |
setAutoPlay(boolean value) | Indicates whether the animation control should start playing the animation as soon as a video clip is opened. |
setCentered(boolean value) | Indicates whether the animation will be in the top-left of the animation control's area or centered as necessary. |
setFileName(String value) | Sets the file name of the animation to be played. |
setTransparent(boolean value) | Indicates whether Windows draws the animation using a transparent background rather than using the background color specified in the animation clip. |
setUseTimer(boolean value) | Indicates whether a Win32 timer should be used instead of a separate thread to manage the playback of the animation. |
stop() | Stops playing the animation. |
wndProc(Message m) | The control's window procedure (WndProc). |
Topic under construction.
Adds an event handler for the OnStart event notification. This notification is sent out whenever an animation starts playing. Duplicate calls to addOnStart are not filtered out.
Adds an event handler for the OnStop event notification. This notification is sent out whenever an animation stops playing. Duplicate calls to addOnStop are not filtered out.
Returns true if the control is configured to start playing as soon as a clip is opened; otherwise, returns false. If getAutoPlay returns false, the Animation control does not start playing the animation clip until the play method is called.
Indicates whether the Animation control is configured to start playing as soon as a video clip is opened.
Returns true if the animation will be centered as necessary; otherwise, returns false.
Indicates whether the animation will be in the top-left of the animation control's area or whether it will be centered as necessary.
Returns an object with the information needed to create a window for this component.
Retrieves the parameters when the window was created. This method is called when creating a window. Derived classes can override this method to add extra functionality, However you should first call super.getCreateParams() to make sure the control continues to work correctly.
Returns the file name of the animation to be played.
Retrieves the file name of the animation to be played.
Returns true if the color specified in the Animation clip will not be used; otherwise, returns false.
Indicates whether Windows will draw the animation using a transparent background, or the background color specified in the animation clip.
Returns true if a timer will be used; otherwise, returns false.
Indicates whether a Win32 timer instead of a separate thread is used to manage playback of the animation.
Fires the OnStart event. Derived classes should just override this method instead of adding a listener for the event. When overriding this method, be sure to call super.onStart(e) to ensure that the original event is still raised.
Fires the OnStop event. Derived classes should just override this method instead of adding a listener for the event. When overriding this method, be sure to call super.onStart(e) to ensure that the original event is still raised.
Plays the animation clip from beginning to end.
Plays the animation clip the specified number of times with the specified start and end frames.
Override this method to guarantee the file name is restored correctly after re-creation.
Removes the specified event handler for the OnStart event. If there are duplicate entries, all are removed.
Removes the specified event handler for the OnStop event. If there are duplicate entries, all are removed.
Indicates whether the animation control should start playing the animation as soon as a video clip is opened.
Indicates whether the animation will be in the top-left of the animation control's area or centered as necessary.
Sets the file name of the animation to be played.
Indicates whether Windows draws the animation using a transparent background rather than using the background color specified in the animation clip.
Indicates whether a Win32 timer should be used instead of a separate thread to manage the playback of the animation.
Stops playing the animation.
The control's window procedure (WndProc). Derived classes can override this method to monitor messages but should be sure to call super.wndProc(m) to ensure correct functionality.