fi.hut.tml.xsmiles.mlfc.smil.viewer
Interface MediaHandler

All Known Subinterfaces:
BrushHandler, LinkHandler, TextFormattingMediaHandler
All Known Implementing Classes:
AwtBrushHandler, AWTForeignMediaHandler, AwtLinkHandler, AwtMediaHandler, HaviBrushHandler, HaviLinkHandler, HaviMediaHandler, SMILMLFCBrushHandler, SMILMLFCForeignHandler, SMILMLFCLinkHandler, SMILMLFCMediaHandler, SwingBrushHandler, SwingLinkHandler, SwingMediaHandler

public interface MediaHandler

Interface to media.


Method Summary
 void addListener(MediaListener mediaListener)
          Adds a listener for this media.
 void close()
           
 void freeze()
           
 java.lang.Object getComponent()
          get the possible component (only used when run in x-smiles
 int getHeight()
           
 int getLeft()
           
 int getOriginalHeight()
          Get the real height of the media.
 int getOriginalWidth()
          Get the real width of the media.
 int getTop()
           
 int getWidth()
           
 boolean isStatic()
          Checks if this media is static or continuous.
 void pause()
           
 void play()
           
 void prefetch()
           
 void setAlt(java.lang.String alt)
          Sets the alt text for the media.
 void setAudioVolume(int percentage)
          Set the volume of audio (if available).
 void setBounds(int left, int top, int width, int height)
           
 void setDrawingArea(DrawingArea d)
          Set the drawing area - media will be rendered in this drawing area.
 void setMediaTime(int millisecs)
          Set the media start time.
 void setMIMEType(java.lang.String mimeType)
          Force this media to use this media type
 void setRootLayoutSize(int width, int height)
          Set the drawing area size.
 void setURL(java.lang.String url)
          Sets the URL of the media.
 void setViewer(Viewer v)
          Set the viewer - required for prefetch, URL creation etc.
 void stop()
           
 

Method Detail

isStatic

public boolean isStatic()
Checks if this media is static or continuous.

Returns:
true if media is static.

addListener

public void addListener(MediaListener mediaListener)
Adds a listener for this media. The listener is notified when the media has been prefetched or ends.


setAlt

public void setAlt(java.lang.String alt)
Sets the alt text for the media.


setURL

public void setURL(java.lang.String url)
Sets the URL of the media.


setViewer

public void setViewer(Viewer v)
Set the viewer - required for prefetch, URL creation etc.


setMIMEType

public void setMIMEType(java.lang.String mimeType)
Force this media to use this media type


prefetch

public void prefetch()

play

public void play()

pause

public void pause()

stop

public void stop()

freeze

public void freeze()

close

public void close()

setMediaTime

public void setMediaTime(int millisecs)
Set the media start time.

Parameters:
millisecs - Time in milliseconds

setAudioVolume

public void setAudioVolume(int percentage)
Set the volume of audio (if available).

Parameters:
percentage - 0-100-oo , 100 giving normal sound level.

setDrawingArea

public void setDrawingArea(DrawingArea d)
Set the drawing area - media will be rendered in this drawing area.


getComponent

public java.lang.Object getComponent()
get the possible component (only used when run in x-smiles


setRootLayoutSize

public void setRootLayoutSize(int width,
                              int height)
Set the drawing area size.


getTop

public int getTop()

getLeft

public int getLeft()

getWidth

public int getWidth()

getHeight

public int getHeight()

setBounds

public void setBounds(int left,
                      int top,
                      int width,
                      int height)

getOriginalWidth

public int getOriginalWidth()
Get the real width of the media.


getOriginalHeight

public int getOriginalHeight()
Get the real height of the media.



X-Smiles 1.2