fi.hut.tml.xsmiles.gui.ftv
Class FtvGUI

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

public class FtvGUI
extends XSmilesUI

FtvGUI is a TV GUI for the XSmiles browser.

Author:
Juha Vierinen

Field Summary
protected  boolean backEnabled
           
protected  BrowserWindow browser
           
protected  boolean forwardEnabled
           
protected static int GREEN
           
protected static int NORMAL
           
protected static int RED
           
protected  int state
           
protected static int TEXT
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.XSmilesUIAWT
browserWindow, contentHandlerFactory, focusPointProviders, guiEventListeners, latestLoc, latestTitle
 
Constructor Summary
FtvGUI(BrowserWindow b)
          Initial gui contructor
FtvGUI(BrowserWindow b, java.awt.Container c)
          For switching gui on the fly
 
Method Summary
 void changeGui()
           
 void destroy()
          Destroy The GUI (delete frame, etc)
 void documentReady()
           
 BrowserConstraints getBrowserConstraints()
           
 ComponentFactory getComponentFactory()
          Default components.
 ContentHandlerFactory getContentHandlerFactory()
           
 java.awt.Container getContentPanel()
          Needed by browser for rendering the contents of the page.
 MLFCControls getMLFCControls()
           
 java.awt.Window getWindow()
           
 void navigateAddtoBookmarks()
          This adds a URL to the bookmarks.
 void navigateBack()
          Back
 void navigateForward()
          Forward
 void navigateHomeEvent()
          Home will be specified to a colorbutton
protected  void navigateReload()
          In the tv ui, the reload will be left to the program.
 void navigateToBookmarks()
          Navigates to bookmarks
 void navigateToURL(java.lang.String urlString)
          Navigates to an URL
protected  void removeComponents()
          Removes all grpahical components of the gui
 void reValidateDocumentArea()
          Revalidates (redraws) the document area.
 void setColorMenu(java.lang.String color, boolean state)
          This hides and opens the colormenus.
 void setConfigMenu(boolean state)
          This open and hides the configuration menu
 void setDocumentAreaSize(java.awt.Dimension size)
          Sets the document area size
 void setEnabledBack(boolean v)
          Is back enabled
 void setEnabledForward(boolean v)
          Is forward enabled
 void setLocation(java.lang.String str)
           
 void setStatusText(java.lang.String str)
          A refrence to the MLFCMenu (i.e.
 void setURLMenu(boolean state)
          This hides and opens the URLMenu, setting the focus in the right place also.
 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, browserReady, browserWorking, displayKeypad, fireLatestEvents, hideKeypad, isTabbed, moveActiveLinkDown, moveActiveLinkUp, openInNewTab, openInNewWindow, reDrawGUI, registerFocusPointProvider, removeGUIEventListener, setEnabledHome, setEnabledReload, setEnabledStop, setSkinsIfNeeded, setSkinsIfNeeded, setTitle, shouldReloadAtStartup, showSourceStatic, start, 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, browserReady, browserWorking, displayKeypad, fireLatestEvents, hideKeypad, isTabbed, moveActiveLinkDown, moveActiveLinkUp, openInNewTab, openInNewWindow, reDrawGUI, registerFocusPointProvider, removeGUIEventListener, setEnabledHome, setEnabledReload, setEnabledStop, setSkinsIfNeeded, setTitle, shouldReloadAtStartup, start, unRegisterFocusPointProvider
 

Field Detail

browser

protected BrowserWindow browser

backEnabled

protected boolean backEnabled

forwardEnabled

protected boolean forwardEnabled

state

protected int state

NORMAL

protected static final int NORMAL
See Also:
Constant Field Values

RED

protected static final int RED
See Also:
Constant Field Values

GREEN

protected static final int GREEN
See Also:
Constant Field Values

TEXT

protected static final int TEXT
See Also:
Constant Field Values
Constructor Detail

FtvGUI

public FtvGUI(BrowserWindow b)
Initial gui contructor

Parameters:
b - The Browser

FtvGUI

public FtvGUI(BrowserWindow b,
              java.awt.Container c)
For switching gui on the fly

Parameters:
b - The browser
c - the browser container of previous gui
Method Detail

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

getWindow

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

getBrowserConstraints

public BrowserConstraints getBrowserConstraints()

setLocation

public void setLocation(java.lang.String str)
Specified by:
setLocation in interface GUI
Overrides:
setLocation in class XSmilesUIAWT
Parameters:
str - sets the location text

navigateBack

public void navigateBack()
Back


navigateForward

public void navigateForward()
Forward


navigateReload

protected void navigateReload()
In the tv ui, the reload will be left to the program.


navigateHomeEvent

public void navigateHomeEvent()
Home will be specified to a colorbutton


navigateToBookmarks

public void navigateToBookmarks()
Navigates to bookmarks


navigateToURL

public void navigateToURL(java.lang.String urlString)
Navigates to an URL


getContentPanel

public java.awt.Container getContentPanel()
Needed by browser for rendering the contents of the page.

Returns:
componentContainer A scrollbarless ScrollPane

setStatusText

public void setStatusText(java.lang.String str)
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:
str - the text to set in statusbar
Returns:
null if no menu exists (mlfc's will handle the null checking)

setColorMenu

public void setColorMenu(java.lang.String color,
                         boolean state)
This hides and opens the colormenus. Also take care of moving focus to the right place.

Parameters:
color - Which menu is to be set.
state - true=visible false=hidden

documentReady

public void documentReady()

setURLMenu

public void setURLMenu(boolean state)
This hides and opens the URLMenu, setting the focus in the right place also.

Parameters:
state - visible or not

setConfigMenu

public void setConfigMenu(boolean state)
This open and hides the configuration menu

Parameters:
state - visible or not

navigateAddtoBookmarks

public void navigateAddtoBookmarks()
This adds a URL to the bookmarks. Just haven't figured out how to implement is yet


removeComponents

protected void removeComponents()
Removes all grpahical components of the gui


changeGui

public void changeGui()

setDocumentAreaSize

public void setDocumentAreaSize(java.awt.Dimension size)
Sets the document area size

Parameters:
size - as a Dimension

reValidateDocumentArea

public void reValidateDocumentArea()
Revalidates (redraws) the document area.


validate

public void validate()

destroy

public void destroy()
Description copied from interface: GUI
Destroy The GUI (delete frame, etc)

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

setEnabledBack

public void setEnabledBack(boolean v)
Is back enabled

Specified by:
setEnabledBack in interface GUI
Overrides:
setEnabledBack 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:
The componentFactory
See Also:
ComponentFactory

getMLFCControls

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

setEnabledForward

public void setEnabledForward(boolean v)
Is forward enabled

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


X-Smiles 1.2