|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
ContentHandler is an interface to a class that handles certain kind of content distinguished by the content type. E.g. application/xml would be handled by a content handler specialized in XML documents
| Method Summary | |
void |
addMediaListener(MediaListener listener)
Adds a MediaListener for this media. |
void |
close()
This will freeze all memory and references to this media. |
XSmilesConnection |
get(java.net.URL dest,
short type)
Retrieve a resource via an URL using authenticated HTTP get and store it as a resource under this contenthandler |
java.io.InputStream |
getContentStream()
get a stream to the content if possible This should read the contents from a cache if possible. |
int |
getOriginalDuration()
Get the duration of media. |
int |
getOriginalHeight()
Get the real height of the media. |
int |
getOriginalWidth()
Get the real width of the media. |
boolean |
getPrimary()
get the primary property for this content |
ResourceReferencer |
getResourceReferencer()
get the list of referenced resources |
java.lang.String |
getTitle()
get the possible title (can be null) |
XMLDocument |
getXMLDocument()
for XML type of media, this returns the XML content holder object XMLDocument, otherwise null |
boolean |
isStatic()
Checks if this media is static or continuous. |
void |
pause()
Pauses the media. |
void |
play()
Plays the media. |
void |
prefetch()
Prefetches media. |
void |
setBounds(int x,
int y,
int width,
int height)
Set the coordinates for the media. |
void |
setBrowserWindow(BrowserWindow browser)
sets the browser window instance. |
void |
setConnection(XSmilesConnection conn)
the connection object, that should be manually closed ASAP |
void |
setContainer(java.awt.Container container)
Sets the container the media will be rendered in. |
void |
setInputStream(java.io.InputStream stream)
sets the input stream where the media is fetched from. |
void |
setMediaTime(int millisecs)
This moves the time position in media. |
void |
setMLFCListener(MLFCListener listener)
All traffic to the browser, such as ComponentFactory, etc goes through this listener. |
void |
setPrimary(boolean primary)
set this content as primary or secondary. |
void |
setSoundVolume(int percentage)
Set the sound volume for media. |
void |
setUrl(java.net.URL url)
sets the XLink (url) for this media if only the link is set, then the input stream should be automatically opened by the media |
void |
setURL(XLink url)
sets the XLink (url) for this media if only the link is set, then the input stream should be automatically opened by the media |
void |
setZoom(double zoom)
notify that the zoom level has changed. |
void |
showControls(boolean visible)
Requests the media player to display a control panel for media. |
void |
stop()
Stops the media. |
| Method Detail |
public void setBrowserWindow(BrowserWindow browser)
public void setMLFCListener(MLFCListener listener)
setMLFCListener in interface Medialistener - The MLFCListener supplied by the browserMLFCListenerpublic void setConnection(XSmilesConnection conn)
conn - public void addMediaListener(MediaListener listener)
addMediaListener in interface Mediapublic void setPrimary(boolean primary)
primary - boolean value denoting whether this content is primary or notpublic boolean getPrimary()
public void setInputStream(java.io.InputStream stream)
public void setURL(XLink url)
public void setUrl(java.net.URL url)
setUrl in interface Mediaurl - URL for media
public void setBounds(int x,
int y,
int width,
int height)
setBounds in interface Mediapublic void setSoundVolume(int percentage)
setSoundVolume in interface Mediapercentage - Sound volume, 0-100- (0 is quiet, 100 is original loudness, 200 twice as loud;
dB change in signal level = 20 log10(percentage / 100) )
public void prefetch()
throws java.lang.Exception
prefetch in interface Mediajava.lang.Exception
public void play()
throws java.lang.Exception
If the media is not yet prefetched, it will first be prefetched.
play in interface Mediajava.lang.Exceptionpublic void pause()
pause in interface Mediapublic void stop()
stop in interface Mediapublic void close()
close in interface Mediapublic void setMediaTime(int millisecs)
setMediaTime in interface Mediamillisecs - Time in millisecspublic java.io.InputStream getContentStream()
public void showControls(boolean visible)
showControls in interface Mediavisible - true=Display controls, false=don't display controls.public XMLDocument getXMLDocument()
public boolean isStatic()
isStatic in interface Mediapublic int getOriginalDuration()
getOriginalDuration in interface Mediapublic int getOriginalWidth()
getOriginalWidth in interface Mediapublic int getOriginalHeight()
getOriginalHeight in interface Mediapublic void setContainer(java.awt.Container container)
setContainer in interface Mediacontainer - This container will contain the media.public void setZoom(double zoom)
public XSmilesConnection get(java.net.URL dest,
short type)
throws java.lang.Exception
java.lang.Exceptionpublic ResourceReferencer getResourceReferencer()
public java.lang.String getTitle()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||