fi.hut.tml.xsmiles.gui.newgui
Class NewGUI

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

public class NewGUI
extends XSmilesUI

A New GUI! With Swing

Author:
Juha

Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.gui.XSmilesUIAWT
browserWindow, contentHandlerFactory, focusPointProviders, guiEventListeners, latestLoc, latestTitle
 
Constructor Summary
NewGUI(BrowserWindow b)
          When creating the first GUI, then the componentContainer is created
NewGUI(BrowserWindow b, java.awt.Container c)
          GUI constructor needs the BrowserWindow and the Container The component hierarchy is as follows: mainFrame
- contentPane
-- StatusBar
-- UBar
-- presentationPanel
 
Method Summary
 void browserReady()
          Browser is finished, stop the animator
 void browserWorking()
          Browser is working, animate the animator
 void changeViewEvent(int viewType)
           
 void destroy()
          Destroy The GUI (delete frame, etc)
 void exit()
           
 ComponentFactory getComponentFactory()
          Default components.
 ContentHandlerFactory getContentHandlerFactory()
           
 java.awt.Container getContentPanel()
          Access to the contentPanel for the MLFC's
 MLFCControls getMLFCControls()
           
 java.awt.Container getMLFCToolbar()
          Returns the MLFCToolbar where the MLFC's can then add their controls
 java.awt.Window getWindow()
          Return mainFrame
 void navigate(int navigationCommand)
           
 void openFile(java.io.File file)
           
 void openFile(java.lang.String fileName)
           
 void openLocation(java.lang.String urlName)
           
 void openLocation(java.net.URL url)
           
 void resizeEvent(java.awt.Dimension size)
           
 void setEnabledAllMenus(boolean value)
           
 void setEnabledBack(boolean value)
           
 void setEnabledForward(boolean value)
           
 void setEnabledHome(boolean value)
           
 void setEnabledLocationCombo(boolean value)
           
 void setEnabledOpenFile(boolean value)
           
 void setEnabledReload(boolean value)
           
 void setEnabledStop(boolean value)
           
 void setLocation(java.lang.String s)
           
 void setScrollable(int a_scroll_policy)
          Set the scroll policy.
 void setStatusText(java.lang.String statusText)
          A refrence to the MLFCMenu (i.e.
 void setTitle(java.lang.String title)
           
 java.io.File showFileDialog(boolean save)
           
 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, reDrawGUI, registerFocusPointProvider, removeGUIEventListener, setSkinsIfNeeded, setSkinsIfNeeded, 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, displayKeypad, fireLatestEvents, hideKeypad, isTabbed, moveActiveLinkDown, moveActiveLinkUp, openInNewTab, openInNewWindow, reDrawGUI, registerFocusPointProvider, removeGUIEventListener, setSkinsIfNeeded, shouldReloadAtStartup, start, unRegisterFocusPointProvider
 

Constructor Detail

NewGUI

public NewGUI(BrowserWindow b,
              java.awt.Container c)
GUI constructor needs the BrowserWindow and the Container The component hierarchy is as follows: mainFrame
- contentPane
-- StatusBar
-- UBar
-- presentationPanel

Parameters:
b - the BrowserWindow
c - componentContainer (optional)

NewGUI

public NewGUI(BrowserWindow b)
When creating the first GUI, then the componentContainer is created

Parameters:
b - the BrowserWindow
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

validate

public void validate()

showFileDialog

public java.io.File showFileDialog(boolean save)

navigate

public void navigate(int navigationCommand)

openFile

public void openFile(java.io.File file)

openFile

public void openFile(java.lang.String fileName)

openLocation

public void openLocation(java.net.URL url)

openLocation

public void openLocation(java.lang.String urlName)

exit

public void exit()

changeViewEvent

public void changeViewEvent(int viewType)

resizeEvent

public void resizeEvent(java.awt.Dimension size)

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
Returns:
null if no menu exists (mlfc's will handle the null checking)

setEnabledBack

public void setEnabledBack(boolean value)
Specified by:
setEnabledBack in interface GUI
Overrides:
setEnabledBack in class XSmilesUIAWT

setEnabledForward

public void setEnabledForward(boolean value)
Specified by:
setEnabledForward in interface GUI
Overrides:
setEnabledForward in class XSmilesUIAWT

setEnabledHome

public void setEnabledHome(boolean value)
Specified by:
setEnabledHome in interface GUI
Overrides:
setEnabledHome in class XSmilesUIAWT

setEnabledStop

public void setEnabledStop(boolean value)
Specified by:
setEnabledStop in interface GUI
Overrides:
setEnabledStop in class XSmilesUIAWT

setEnabledReload

public void setEnabledReload(boolean value)
Specified by:
setEnabledReload in interface GUI
Overrides:
setEnabledReload in class XSmilesUIAWT

setEnabledAllMenus

public void setEnabledAllMenus(boolean value)

setEnabledLocationCombo

public void setEnabledLocationCombo(boolean value)

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface GUI
Overrides:
setTitle in class XSmilesUIAWT

setEnabledOpenFile

public void setEnabledOpenFile(boolean value)

setLocation

public void setLocation(java.lang.String s)
Specified by:
setLocation in interface GUI
Overrides:
setLocation in class XSmilesUIAWT

getContentPanel

public java.awt.Container getContentPanel()
Access to the contentPanel for the MLFC's

Returns:
the rendering area

getWindow

public java.awt.Window getWindow()
Return mainFrame

Specified by:
getWindow in interface GUI
Specified by:
getWindow in class XSmilesUIAWT
Returns:
mainFrame

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

browserWorking

public void browserWorking()
Browser is working, animate the animator

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

browserReady

public void browserReady()
Browser is finished, stop the animator

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

getMLFCToolbar

public java.awt.Container getMLFCToolbar()
Returns the MLFCToolbar where the MLFC's can then add their controls

Returns:
The container

setScrollable

public void setScrollable(int a_scroll_policy)
Set the scroll policy. See java.awt.ScrollPane for values for scroll_policy. SCROLLBARS_AS_NEEDED -?Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension. SCROLLBARS_NEVER?- Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child.


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

getMLFCControls

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


X-Smiles 1.2