fi.hut.tml.xsmiles.gui.gui2.awt
Class SimpleAWTGUI
java.lang.Object
fi.hut.tml.xsmiles.gui.gui2.awt.SimpleAWTGUI
- All Implemented Interfaces:
- GUIEventListener, GUIInterface
- Direct Known Subclasses:
- SimpleSwingGUI
- public class SimpleAWTGUI
- extends java.lang.Object
- implements GUIEventListener, GUIInterface
This is a simple ABSTRACT GUI that does not use the OLD gui system.
The idea is that it creates a browser window without a OLD gui system and
then just gets the content area and adds it to itself.
Actually the old GUI system is still created under the hoods, but it is only
used to get events back...
Anyway, this should show that it is easy to use the browser inside a
container in a Java project.
Note that some settings (e.g. the ComponentFactory) are set in the
config.xml file.
Currently this does not support tabs, so it is always one main BrowserWindow
inside a AWTGUI.
This should be Swing-independent.
NOTE: SwingGUI extends this GUI, so that all changes here will be incorporated in both
versions
- Author:
- Mikko Honkala
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dialogClass
public static final java.lang.String dialogClass
- See Also:
- Constant Field Values
title
public static final java.lang.String title
- See Also:
- Constant Field Values
initialURL
public XLink initialURL
dialog
protected XSmilesDialog dialog
browserWindow
public Browser browserWindow
actionContainer
public java.awt.Container actionContainer
- The structure of the containers :
-------------------------------------------------
Menu
-------------------------------------------------
actionContainer
(BorderLayout.NORTH)
------------------------------------------------
BrowserWindow.contentArea() (BorderLayout.CENTER)
------------------------------------------------
statusContainer
(BorderLayout.SOUTH)
statusContainer
public java.awt.Container statusContainer
status
public XCaption status
backCommand
public static final java.lang.String backCommand
- See Also:
- Constant Field Values
forwardCommand
public static final java.lang.String forwardCommand
- See Also:
- Constant Field Values
homeCommand
public static final java.lang.String homeCommand
- See Also:
- Constant Field Values
reloadCommand
public static final java.lang.String reloadCommand
- See Also:
- Constant Field Values
xsmilesCommand
public static final java.lang.String xsmilesCommand
- See Also:
- Constant Field Values
menuBar
protected XMenuBar menuBar
editMenu
protected XMenu editMenu
fileMenu
protected XMenu fileMenu
bookmarksMenu
protected XMenu bookmarksMenu
viewMenu
protected XMenu viewMenu
helpMenu
protected XMenu helpMenu
goMenu
protected XMenu goMenu
frame
protected java.awt.Frame frame
rootContainer
protected java.awt.Container rootContainer
configMenu
public static final java.lang.String configMenu
- See Also:
- Constant Field Values
sethomepageMenu
public static final java.lang.String sethomepageMenu
- See Also:
- Constant Field Values
exitMenu
public static final java.lang.String exitMenu
- See Also:
- Constant Field Values
openFileMenu
public static final java.lang.String openFileMenu
- See Also:
- Constant Field Values
aboutHelpMenu
public static final java.lang.String aboutHelpMenu
- See Also:
- Constant Field Values
viewBookmarksMenu
public static final java.lang.String viewBookmarksMenu
- See Also:
- Constant Field Values
viewSpeechMenu
public static final java.lang.String viewSpeechMenu
- See Also:
- Constant Field Values
viewXMLSourceMenu
public static final java.lang.String viewXMLSourceMenu
- See Also:
- Constant Field Values
viewShowGUIMenu
public static final java.lang.String viewShowGUIMenu
- See Also:
- Constant Field Values
viewHideGUIMenu
public static final java.lang.String viewHideGUIMenu
- See Also:
- Constant Field Values
editBookmarksMenu
public static final java.lang.String editBookmarksMenu
- See Also:
- Constant Field Values
zoomPlusMenu
public static final java.lang.String zoomPlusMenu
- See Also:
- Constant Field Values
zoomMinusMenu
public static final java.lang.String zoomMinusMenu
- See Also:
- Constant Field Values
locationField
protected XInput locationField
topContainer
protected java.awt.Container topContainer
zoomFactor
protected double zoomFactor
SimpleAWTGUI
public SimpleAWTGUI()
openInNewWindow
public void openInNewWindow(XLink l,
java.lang.String id)
- Specified by:
openInNewWindow in interface GUIEventListener
createRootContainer
protected java.awt.Container createRootContainer()
listenForWindowClose
protected void listenForWindowClose(java.awt.Window w)
getRootContainer
protected java.awt.Container getRootContainer()
setDoubleBuffering
protected void setDoubleBuffering(boolean b)
show
public void show()
- Specified by:
show in interface GUIInterface
setDefaultWindowSize
public void setDefaultWindowSize()
- subclasses can override this
decorateGUI
public void decorateGUI()
addMenuBar
protected void addMenuBar()
createMenus
public void createMenus()
- menus
createMenuItem
protected XMenuItem createMenuItem(java.lang.String name,
java.lang.String actionCommand)
createContainer
protected java.awt.Container createContainer()
createLocation
protected java.awt.Component createLocation()
loadLocation
public void loadLocation(java.lang.String location)
createActionContainer
public void createActionContainer()
getActionFont
protected java.awt.Font getActionFont()
getStatusFont
protected java.awt.Font getStatusFont()
createStatusContainer
public void createStatusContainer()
createActionButton
protected XComponent createActionButton(java.lang.String name,
java.lang.String icon,
java.lang.String actionCommand)
setInitialURL
public void setInitialURL(XLink url)
- Specified by:
setInitialURL in interface GUIInterface
getComponentFactoryClassName
protected java.lang.String getComponentFactoryClassName()
getGUIName
protected java.lang.String getGUIName()
createBrowserWindow
protected void createBrowserWindow()
getBrowser
public Browser getBrowser()
- Specified by:
getBrowser in interface GUIInterface
getContentArea
public java.awt.Container getContentArea()
createBrowserListeners
public void createBrowserListeners()
createListeners
protected void createListeners()
action
public void action(java.lang.Object action)
start
public void start()
- the GUI event listener interface
- Specified by:
start in interface GUIEventListener
destroy
public void destroy()
- Specified by:
destroy in interface GUIEventListener
openInNewTab
public void openInNewTab(XLink l,
java.lang.String id)
- Specified by:
openInNewTab in interface GUIEventListener
setStatusText
public void setStatusText(java.lang.String statusText)
- Specified by:
setStatusText in interface GUIEventListener
setEnabledBack
public void setEnabledBack(boolean value)
- Specified by:
setEnabledBack in interface GUIEventListener
setEnabledForward
public void setEnabledForward(boolean value)
- Specified by:
setEnabledForward in interface GUIEventListener
setEnabledHome
public void setEnabledHome(boolean value)
- Specified by:
setEnabledHome in interface GUIEventListener
setEnabledStop
public void setEnabledStop(boolean value)
- Specified by:
setEnabledStop in interface GUIEventListener
setEnabledReload
public void setEnabledReload(boolean value)
- Specified by:
setEnabledReload in interface GUIEventListener
setTitle
public void setTitle(java.lang.String title)
- Specified by:
setTitle in interface GUIEventListener
setLocation
public void setLocation(java.lang.String s)
- Specified by:
setLocation in interface GUIEventListener
browserWorking
public void browserWorking()
- Specified by:
browserWorking in interface GUIEventListener
GUIEvent
public void GUIEvent(GUIEvent ev)
- Specified by:
GUIEvent in interface GUIEventListener
browserReady
public void browserReady()
- Specified by:
browserReady in interface GUIEventListener
setXMLConfigurer
public void setXMLConfigurer(XMLConfigurer c)
- Specified by:
setXMLConfigurer in interface GUIInterface
X-Smiles 1.2