fi.hut.tml.xsmiles.mlfc
Interface MLFCListener

All Known Implementing Classes:
BrowserMLFCListener

public interface MLFCListener

All traffic from the MLFC goes though this class. _NO_ direct references to the Browser class from the MLFCs. A MLFC can be used independently through this interface, without having to use the whole browser.

Author:
Juha

Method Summary
 void closeView()
          When MLFC stops, it closes a View from Wesahmi system.
 XSmilesContentHandler createContentHandler(java.lang.String contentType, XLink link, java.awt.Container cArea, boolean primary)
          Uses the specified contentType, ie.
 XSmilesContentHandler createContentHandler(XLink link, java.awt.Container cArea, boolean primary)
          same as displayDocumentInContainer, but will not call prefetch and play, so it is up to the user to call these functions
 XSmilesContentHandler displayDocumentInContainer(XLink l, java.awt.Container c)
          Render embedded document in container provided.
 ComponentFactory getComponentFactory()
           
 java.awt.Container getContentArea()
           
 java.lang.String getGUIProperty(java.lang.String prop)
           
 boolean getIsTabbedGUI()
           
 double getJavaVersion()
           
 MLFCControls getMLFCControls()
           
 java.lang.String getProperty(java.lang.String prop)
          ?@param prop XPath to property
 BrowserSubscriber getSubscriber()
           
 double getZoom()
          get the current zoom level
 boolean isNamespaceSupported(java.lang.String namespace)
          Checks if there is a MLFC available for the given namespace URI.
 void navigate(int command)
          Navigate back, forward, reload, change view, stop etc.
 void openInNewTab(XLink l, java.lang.String id)
          opens link in new tab with a certain id
 void openLocation(java.lang.String s)
           
 void openLocation(java.net.URL l)
           
 void openLocationTop(java.lang.String url)
          Open url in new browserwindow
 void openLocationTop(XLink url, java.lang.String id)
          Open url in new browserwindow
 void openURLFromExternalProgram(BrowserSubscriber browserSubscriber, java.lang.String url, java.lang.String id)
          Opens link from external program with id.
 void openURLFromExternalProgram(java.lang.String url)
          Opens link from external program.
 void openURLFromExternalProgram(java.lang.String url, java.lang.String id)
          Opens link from external program with id.
 void reloadCurrentPage()
           
 void setBrowserState(int i)
          Deprecated. Use the CoreMLFC framework instead
 void setStatusText(java.lang.String status)
           
 void setSubscriber(BrowserSubscriber s)
           
 void setTitle(java.lang.String title)
           
 void showErrorDialog(java.lang.String title, java.lang.String message)
          Show an error.
 void showLinkPopup(java.net.URL url, XMLDocument doc, java.awt.event.MouseEvent e)
          open a link popup
 void showSource(XMLDocument doc, int mode, java.lang.String heading)
          The modes are from XSmilesView class
 

Method Detail

openLocation

public void openLocation(java.net.URL l)
Parameters:
l - Open document l, in browser.

openLocation

public void openLocation(java.lang.String s)
Parameters:
s - Open document with the URL string s

openLocationTop

public void openLocationTop(java.lang.String url)
Open url in new browserwindow

Parameters:
url -

openLocationTop

public void openLocationTop(XLink url,
                            java.lang.String id)
Open url in new browserwindow

Parameters:
url -
id - id of the window to open url in

getIsTabbedGUI

public boolean getIsTabbedGUI()
Returns:
true if GUI can open new 's

openInNewTab

public void openInNewTab(XLink l,
                         java.lang.String id)
opens link in new tab with a certain id


openURLFromExternalProgram

public void openURLFromExternalProgram(java.lang.String url)
Opens link from external program. The target is defined in configuration.


openURLFromExternalProgram

public void openURLFromExternalProgram(java.lang.String url,
                                       java.lang.String id)
Opens link from external program with id. The target is defined in configuration.


openURLFromExternalProgram

public void openURLFromExternalProgram(BrowserSubscriber browserSubscriber,
                                       java.lang.String url,
                                       java.lang.String id)
Opens link from external program with id. The target is defined in configuration.


reloadCurrentPage

public void reloadCurrentPage()

closeView

public void closeView()
When MLFC stops, it closes a View from Wesahmi system.


displayDocumentInContainer

public XSmilesContentHandler displayDocumentInContainer(XLink l,
                                                        java.awt.Container c)
Render embedded document in container provided. This can be used to embed XML documents in each other.

Parameters:
l - Link to a XML document, which is to be rendered in container.
c - The Container, where document is to be rendered.

createContentHandler

public XSmilesContentHandler createContentHandler(XLink link,
                                                  java.awt.Container cArea,
                                                  boolean primary)
                                           throws java.lang.Exception
same as displayDocumentInContainer, but will not call prefetch and play, so it is up to the user to call these functions

Throws:
java.lang.Exception

createContentHandler

public XSmilesContentHandler createContentHandler(java.lang.String contentType,
                                                  XLink link,
                                                  java.awt.Container cArea,
                                                  boolean primary)
                                           throws java.lang.Exception
Uses the specified contentType, ie. doesn't try to read it from the HTTP-connection

Parameters:
contentType -
link -
cArea -
primary -
Returns:
Throws:
java.lang.Exception

getProperty

public java.lang.String getProperty(java.lang.String prop)
?@param prop XPath to property

Returns:
Value of property
See Also:
for different properties. An example could be of a property could be "gui/screensize".

getGUIProperty

public java.lang.String getGUIProperty(java.lang.String prop)
Parameters:
prop - A GUI property requested.
Returns:
the value
See Also:
XMLConfigurator

setStatusText

public void setStatusText(java.lang.String status)
Parameters:
status - The status of the MLFC in string form

setBrowserState

public void setBrowserState(int i)
Deprecated. Use the CoreMLFC framework instead

If stand-alone. Then this is ir-relevant.

See Also:
enumeration for valid states.

setTitle

public void setTitle(java.lang.String title)
Parameters:
title - Set the title of the presentation to

getComponentFactory

public ComponentFactory getComponentFactory()
Returns:
The componentFactory, which deals out generic fi.hut.tml.xsmiles.gui.components.* based components. All function as specified in these interfaces.

getMLFCControls

public MLFCControls getMLFCControls()

getJavaVersion

public double getJavaVersion()
Returns:
Java version. Because some Javas, such as kaffe have problems with giving the correct Java version.

isNamespaceSupported

public boolean isNamespaceSupported(java.lang.String namespace)
Checks if there is a MLFC available for the given namespace URI.

Parameters:
namespace - URI for the namespace.
Returns:
true if namespace has an MLFC.

getContentArea

public java.awt.Container getContentArea()
Returns:
the content area of the browser

showErrorDialog

public void showErrorDialog(java.lang.String title,
                            java.lang.String message)
Show an error. This will stop the MLFC, and show a error page.


showSource

public void showSource(XMLDocument doc,
                       int mode,
                       java.lang.String heading)
The modes are from XSmilesView class


showLinkPopup

public void showLinkPopup(java.net.URL url,
                          XMLDocument doc,
                          java.awt.event.MouseEvent e)
open a link popup


navigate

public void navigate(int command)
Navigate back, forward, reload, change view, stop etc.

Parameters:
command - See NavigationState for static variables associated with commands
See Also:
NavigationState

getZoom

public double getZoom()
get the current zoom level


setSubscriber

public void setSubscriber(BrowserSubscriber s)

getSubscriber

public BrowserSubscriber getSubscriber()


X-Smiles 1.2