fi.hut.tml.xsmiles.gui
Interface GUI

All Known Implementing Classes:
XSmilesUI, XSmilesUIAWT

public interface GUI

This is an interface for all user interfaces that are used with the Browser. testing..... kolmas....

Version:
0
Author:
Niklas von Knorrin, Juha, MH

Method Summary
 void addGUIEventListener(GUIEventListener e)
           
 void browserReady()
          Informs the gui that browser is resting
 void browserWorking()
          Informs the gui that browser is working
 void destroy()
          Destroy The GUI (delete frame, etc)
 void displayKeypad(java.awt.Component target, java.lang.String mode)
           
 void fireLatestEvents()
           
 ComponentFactory getComponentFactory()
           
 ContentHandlerFactory getContentHandlerFactory()
           
 MLFCControls getMLFCControls()
           
 java.awt.Window getWindow()
           
 void hideKeypad()
           
 boolean isTabbed()
          Can gui accommodate several content areas within one frame
 void moveActiveLinkDown()
          Move the highlight of the selected link down
 void moveActiveLinkUp()
          Move the highlight of the selected link up
 void openInNewTab(XLink link, java.lang.String id)
          Open up a link in a new tab
 void openInNewWindow(XLink link, java.lang.String id)
          Open up a link in a new tab
 void reDrawGUI()
           
 void registerFocusPointProvider(FocusPointsProvider fpp, BrowserWindow bw)
           
 void removeGUIEventListener(GUIEventListener e)
           
 void setEnabledBack(boolean value)
           
 void setEnabledForward(boolean value)
           
 void setEnabledHome(boolean value)
           
 void setEnabledReload(boolean value)
           
 void setEnabledStop(boolean value)
           
 void setLocation(java.lang.String s)
           
 void setSkinsIfNeeded(java.lang.String n)
           
 void setStatusText(java.lang.String statusText)
           
 void setTitle(java.lang.String title)
           
 boolean shouldReloadAtStartup()
           
 void showErrorDialog(boolean isModal, java.lang.String heading, java.lang.String description)
          GUI shows a popup error dialog.
 void showMessageDialog(boolean isModal, java.lang.String heading, java.lang.String description, long timeToLiveMillis)
          GUI shows a popup error dialog.
 void showSource(XMLDocument doc, int mode, java.lang.String heading)
          The modes are from XSmilesView class
 void start()
          After browser is ready, then start is called.
 void unRegisterFocusPointProvider(FocusPointsProvider fpp, BrowserWindow bw)
           
 

Method Detail

getComponentFactory

public ComponentFactory getComponentFactory()
Returns:
A ComponentFactory which is capable of returning all components needed by MLFCs, or any other non-GUI package classes.
See Also:
ComponentFactory

getMLFCControls

public MLFCControls getMLFCControls()

getContentHandlerFactory

public ContentHandlerFactory getContentHandlerFactory()
Returns:
ContentHandler creates players for certain mime types
See Also:
ContentHandlerFactory

start

public void start()
After browser is ready, then start is called. Not neccesary to implement


destroy

public void destroy()
Destroy The GUI (delete frame, etc)


getWindow

public java.awt.Window getWindow()
Returns:
the Frame of current GUI

isTabbed

public boolean isTabbed()
Can gui accommodate several content areas within one frame


openInNewTab

public void openInNewTab(XLink link,
                         java.lang.String id)
Open up a link in a new tab

Parameters:
id - the id of the browser to be

openInNewWindow

public void openInNewWindow(XLink link,
                            java.lang.String id)
Open up a link in a new tab

Parameters:
id - the id of the browser to be

moveActiveLinkUp

public void moveActiveLinkUp()
Move the highlight of the selected link up


moveActiveLinkDown

public void moveActiveLinkDown()
Move the highlight of the selected link down


browserWorking

public void browserWorking()
Informs the gui that browser is working


browserReady

public void browserReady()
Informs the gui that browser is resting


setLocation

public void setLocation(java.lang.String s)
Parameters:
s - The location that is beeing loaded

setSkinsIfNeeded

public void setSkinsIfNeeded(java.lang.String n)
Parameters:
n - Set the skin to n, if possible

setStatusText

public void setStatusText(java.lang.String statusText)
Parameters:
statusText - The text to put in status bar

setEnabledBack

public void setEnabledBack(boolean value)
Parameters:
value - Set state of back widget

setEnabledForward

public void setEnabledForward(boolean value)
Parameters:
value - Set state of forward widget

setEnabledHome

public void setEnabledHome(boolean value)
Parameters:
value - Set state of home widget

setEnabledStop

public void setEnabledStop(boolean value)
Parameters:
value - Set state of top widget

setEnabledReload

public void setEnabledReload(boolean value)
Parameters:
value - Set state of reload widget

setTitle

public void setTitle(java.lang.String title)
Parameters:
title - Set title of UI frame

displayKeypad

public void displayKeypad(java.awt.Component target,
                          java.lang.String mode)
Parameters:
target - JTextComponent to receive "virtual" key presses
mode - inputMode for text element

hideKeypad

public void hideKeypad()

showMessageDialog

public void showMessageDialog(boolean isModal,
                              java.lang.String heading,
                              java.lang.String description,
                              long timeToLiveMillis)
GUI shows a popup error dialog. ErrorHandling should call the Browser's showErrorDialog instead of this.

Parameters:
isModal - Modality
heading - Headline of error ?@param description Description of error

showErrorDialog

public void showErrorDialog(boolean isModal,
                            java.lang.String heading,
                            java.lang.String description)
GUI shows a popup error dialog. ErrorHandling should call the Browser's showErrorDialog instead of this.

Parameters:
isModal - Modality
heading - Headline of error ?@param description Description of error

showSource

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


reDrawGUI

public void reDrawGUI()

addGUIEventListener

public void addGUIEventListener(GUIEventListener e)

removeGUIEventListener

public void removeGUIEventListener(GUIEventListener e)

shouldReloadAtStartup

public boolean shouldReloadAtStartup()
Returns:
whether or not this gui should be instructed to reload. XMLGUI should return false, since it creates an extra content area and browser for the content

fireLatestEvents

public void fireLatestEvents()

registerFocusPointProvider

public void registerFocusPointProvider(FocusPointsProvider fpp,
                                       BrowserWindow bw)

unRegisterFocusPointProvider

public void unRegisterFocusPointProvider(FocusPointsProvider fpp,
                                         BrowserWindow bw)


X-Smiles 1.2