All Packages Class Hierarchy This Package Previous Next Index
Class com.carpathia.audioweb.SBufferedAW
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----com.carpathia.audioweb.SBufferedAW
- public class SBufferedAW
- extends Applet
The central class of the AudioWeb system. All public methods are accessible to
browser client scripts. The audio clips, specified by the file list set through
the "audioClipsList" applet parameter, are sequentially buffered.
-
SBufferedAW()
-
-
getAppletInfo()
- Returns information about this applet.
-
init()
- Initializes the applet. Called by the applet container.
-
isClipLoaded(String)
- Returns true when the clip is loaded and ready to play.
-
loopClip(String)
- Starts playing the corresponding audio clip in a loop.
-
loopVisual(String)
- It behaves similar with "playVisual" method.
-
paint(Graphics)
- Paints the applet.
-
playClip(String)
- Starts to play the corresponding audio resource.
-
playVisual(String)
- Starts to play a clip in visual mode.
-
stop()
- Called by the browser or applet viewer to inform this applet
that it should stop its execution.
-
stopClip(String)
- Stops playing the corresponding audio clip.
-
stopVisual()
- Stops the clip played in visual mode.
-
update(Graphics)
-
SBufferedAW
public SBufferedAW()
getAppletInfo
public String getAppletInfo()
- Returns information about this applet.
- Returns:
- a string of information about this applet
- Overrides:
- getAppletInfo in class Applet
init
public void init()
- Initializes the applet. Called by the applet container
- Overrides:
- init in class Applet
- See Also:
- start, stop, destroy
isClipLoaded
public boolean isClipLoaded(String clip)
- Returns true when the clip is loaded and ready to play.
This function should be called before calling playClip or loopClip.
If the clip is not loaded and any of the previous functions is called
no sound will be produced.
- Parameters:
- clip - java.lang.String
- Returns:
- boolean
loopClip
public synchronized void loopClip(String clip)
- Starts playing the corresponding audio clip in a loop. Visual effects are not used.
- Parameters:
- clip - a String parameter specifing the resource file name
(it does not include the file extension).
loopVisual
public synchronized void loopVisual(String clip)
- It behaves similar with "playVisual" method. The difference is that the clip is played in a loop.
- Parameters:
- clip - java.lang.String
paint
public void paint(Graphics g)
- Paints the applet.
- Parameters:
- g - the specified Graphics window
- Overrides:
- paint in class Container
- See Also:
- update
playClip
public synchronized void playClip(String clip)
- Starts to play the corresponding audio resource. Visual effects are not used.
- Parameters:
- clip - a String parameter specifing the resource file name
(it does not include the file extension).
playVisual
public synchronized void playVisual(String clip)
- Starts to play a clip in visual mode. Only one clip at a time can be played in visual mode.
If another clip is playing visually when this function is called then it will be stopped.
If the clip is not already loaded then the loading message is displayed and the clip is stared
after loading.
- Parameters:
- clip - java.lang.String
stop
public void stop()
- Called by the browser or applet viewer to inform this applet
that it should stop its execution. It is called when the Web
page that contains this applet has been replaced by another
page, and also just before the applet is to be destroyed.
- Overrides:
- stop in class Applet
stopClip
public synchronized void stopClip(String clip)
- Stops playing the corresponding audio clip.
- Parameters:
- clip - a String parameter specifing the resource file name
(it does not include the file extension).
stopVisual
public synchronized void stopVisual()
- Stops the clip played in visual mode.
- Parameters:
- clip - a String parameter specifing the resource file name
(it does not include the file extension).
update
public void update(Graphics g)
- Parameters:
- g - java.awt.Graphics
- Overrides:
- update in class Container
All Packages Class Hierarchy This Package Previous Next Index