fi.hut.tml.xsmiles.mlfc.gui
Class XMLGUI

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.XSmilesUIAWT
      extended byfi.hut.tml.xsmiles.gui.swing.XSmilesUI
          extended byfi.hut.tml.xsmiles.mlfc.gui.XMLGUI
All Implemented Interfaces:
GUI

public class XMLGUI
extends XSmilesUI

A GUI, which is to be configured via XML

Author:
juha

Field Summary
 BrowserWindow browser
           
protected  ComponentFactory componentFactory
           
protected  MLFCControls mlfcControls
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.XSmilesUIAWT
browserWindow, contentHandlerFactory, focusPointProviders, guiEventListeners, latestLoc, latestTitle
 
Constructor Summary
XMLGUI(BrowserWindow b)
           
XMLGUI(BrowserWindow b, java.awt.Container c)
           
 
Method Summary
 void addLocationListener(LocationListener l)
           
 void addStateListener(StateListener l)
           
 void addStatusListener(StatusListener l)
           
 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)
 BrowserWindow getBrowserWindow()
           
 ComponentFactory getComponentFactory()
          Default components.
 ContentHandlerFactory getContentHandlerFactory()
           
 MLFCControls getMLFCControls()
           
 Animation getRaksutin()
           
 javax.swing.JTextField getStatusBar()
           
 java.awt.Window getWindow()
           
 void reDrawGUI()
          Reload xml file and draw the GUI
 void removeAllListeners()
           
 void removeLocationListener(LocationListener l)
           
 void removeStateListener(StateListener l)
           
 void removeStatusListener(StatusListener l)
           
 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 setStatusText(java.lang.String statusText)
          A refrence to the MLFCMenu (i.e.
 void setTitle(java.lang.String title)
           
 void setWindowSize(int w, int h)
           
 boolean shouldReloadAtStartup()
           
 void start()
          After browser is ready, then start is called.
 void validate()
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.swing.XSmilesUI
showErrorDialog, showMessageDialog, showSource
 
Methods inherited from class fi.hut.tml.xsmiles.gui.XSmilesUIAWT
addGUIEventListener, displayKeypad, fireLatestEvents, hideKeypad, isTabbed, moveActiveLinkDown, moveActiveLinkUp, openInNewTab, openInNewWindow, registerFocusPointProvider, removeGUIEventListener, setSkinsIfNeeded, setSkinsIfNeeded, showSourceStatic, unRegisterFocusPointProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.GUI
addGUIEventListener, displayKeypad, fireLatestEvents, hideKeypad, isTabbed, moveActiveLinkDown, moveActiveLinkUp, openInNewTab, openInNewWindow, registerFocusPointProvider, removeGUIEventListener, setSkinsIfNeeded, unRegisterFocusPointProvider
 

Field Detail

componentFactory

protected ComponentFactory componentFactory

mlfcControls

protected MLFCControls mlfcControls

browser

public BrowserWindow browser
Constructor Detail

XMLGUI

public XMLGUI(BrowserWindow b,
              java.awt.Container c)

XMLGUI

public XMLGUI(BrowserWindow b)
Method Detail

start

public void start()
Description copied from interface: GUI
After browser is ready, then start is called. Not neccesary to implement

Specified by:
start in interface GUI
Overrides:
start in class XSmilesUIAWT

reDrawGUI

public void reDrawGUI()
Reload xml file and draw the GUI

Specified by:
reDrawGUI in interface GUI
Overrides:
reDrawGUI in class XSmilesUIAWT

getComponentFactory

public ComponentFactory getComponentFactory()
Description copied from class: XSmilesUIAWT
Default components. If GUI has a special component deployment sceme, then they should override the fi.hut.tml.xsmiles.gui.components.ComponentFactory in neccecary places.

Specified by:
getComponentFactory in interface GUI
Specified by:
getComponentFactory in class XSmilesUIAWT
Returns:
A ComponentFactory which is capable of returning all components needed by MLFCs, or any other non-GUI package classes.
See Also:
ComponentFactory

destroy

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

Specified by:
destroy in interface GUI
Overrides:
destroy in class XSmilesUIAWT

getWindow

public java.awt.Window getWindow()
Specified by:
getWindow in interface GUI
Specified by:
getWindow in class XSmilesUIAWT
Returns:
the Frame of current GUI

getContentHandlerFactory

public ContentHandlerFactory getContentHandlerFactory()
Specified by:
getContentHandlerFactory in interface GUI
Overrides:
getContentHandlerFactory in class XSmilesUIAWT
Returns:
ContentHandler creates players for certain mime types
See Also:
ContentHandlerFactory

browserWorking

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

Specified by:
browserWorking in interface GUI
Overrides:
browserWorking in class XSmilesUIAWT

browserReady

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

Specified by:
browserReady in interface GUI
Overrides:
browserReady in class XSmilesUIAWT

setLocation

public void setLocation(java.lang.String s)
Specified by:
setLocation in interface GUI
Overrides:
setLocation in class XSmilesUIAWT
Parameters:
s - The location that is beeing loaded

removeAllListeners

public void removeAllListeners()

addStateListener

public void addStateListener(StateListener l)

removeStateListener

public void removeStateListener(StateListener l)

addLocationListener

public void addLocationListener(LocationListener l)

removeLocationListener

public void removeLocationListener(LocationListener l)

setStatusText

public void setStatusText(java.lang.String statusText)
Description copied from class: XSmilesUIAWT
A refrence to the MLFCMenu (i.e. the "Document"-menu of the GUI)

Specified by:
setStatusText in interface GUI
Overrides:
setStatusText in class XSmilesUIAWT
Parameters:
statusText - The text to put in status bar
Returns:
null if no menu exists (mlfc's will handle the null checking)

addStatusListener

public void addStatusListener(StatusListener l)

removeStatusListener

public void removeStatusListener(StatusListener l)

getStatusBar

public javax.swing.JTextField getStatusBar()

setEnabledBack

public void setEnabledBack(boolean value)
Specified by:
setEnabledBack in interface GUI
Overrides:
setEnabledBack in class XSmilesUIAWT
Parameters:
value - Set state of back widget

setEnabledForward

public void setEnabledForward(boolean value)
Specified by:
setEnabledForward in interface GUI
Overrides:
setEnabledForward in class XSmilesUIAWT
Parameters:
value - Set state of forward widget

setEnabledHome

public void setEnabledHome(boolean value)
Specified by:
setEnabledHome in interface GUI
Overrides:
setEnabledHome in class XSmilesUIAWT
Parameters:
value - Set state of home widget

setEnabledStop

public void setEnabledStop(boolean value)
Specified by:
setEnabledStop in interface GUI
Overrides:
setEnabledStop in class XSmilesUIAWT
Parameters:
value - Set state of top widget

setEnabledReload

public void setEnabledReload(boolean value)
Specified by:
setEnabledReload in interface GUI
Overrides:
setEnabledReload in class XSmilesUIAWT
Parameters:
value - Set state of reload widget

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface GUI
Overrides:
setTitle in class XSmilesUIAWT
Parameters:
title - Set title of UI frame

getRaksutin

public Animation getRaksutin()

getBrowserWindow

public BrowserWindow getBrowserWindow()

validate

public void validate()

setWindowSize

public void setWindowSize(int w,
                          int h)

shouldReloadAtStartup

public boolean shouldReloadAtStartup()
Specified by:
shouldReloadAtStartup in interface GUI
Overrides:
shouldReloadAtStartup in class XSmilesUIAWT
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

getMLFCControls

public MLFCControls getMLFCControls()
Specified by:
getMLFCControls in interface GUI
Specified by:
getMLFCControls in class XSmilesUIAWT


X-Smiles 1.2