org.lobobrowser.ua
Interface NavigatorWindow


public interface NavigatorWindow

This interface represents a navigator window.


Method Summary
 void addAddressBarComponent(java.awt.Component addressBarComponent)
          Adds a component to the address bar.
 void addMenu(java.lang.String menuId, javax.swing.JMenu menu)
          Adds a top-level menu to the window.
 void addNavigatorWindowListener(NavigatorWindowListener listener)
          Adds a listener of window events.
 void addSharedToolBarComponent(java.awt.Component toolBarComponent)
          Adds a component to the shared tool bar.
 void addStatusBarComponent(java.awt.Component statusBarComponent)
          Adds a component to the status bar.
 void addToolBar(java.awt.Component toolBar)
          Adds a "tool bar" component to the window.
 boolean back()
           
 boolean canBack()
           
 boolean canCopy()
           
 boolean canForward()
           
 boolean canReload()
           
 boolean copy()
           
 java.awt.Component createGap()
          Creates a gap component that should be placed between toolbar, address bar or status bar components.
 java.awt.Component createGlueComponent(java.awt.Component wrappedComponent, boolean usingMaxSize)
          Creates a component wrapper that expands to fill its parent's available space.
 void dispose()
          Closes the window.
 boolean forward()
           
 java.awt.Window getAwtWindow()
          Gets the java.awt.Frame instance associated with this NavigatorWindow.
 NavigationEntry[] getBackNavigationEntries()
           
 NavigationEntry getCurrentNavigationEntry()
           
 NavigationEntry[] getForwardNavigationEntries()
           
 javax.swing.JMenu getMenu(java.lang.String menuId)
          Gets a menu previously added, typically by another extension with higher priority.
 NavigatorFrame getTopFrame()
          Gets the top frame of this window.
 UserAgent getUserAgent()
          Gets the navigator for the window.
 boolean goTo(NavigationEntry entry)
          Navigates to a NavigationEntry belonging to navigation history in the current session.
 boolean hasSource()
           
 boolean reload()
           
 void removeNavigatorWindowListener(NavigatorWindowListener listener)
          Removes a listener previously added with addNavigatorWindowListener(NavigatorWindowListener)
 boolean stop()
           
 

Method Detail

addMenu

void addMenu(java.lang.String menuId,
             javax.swing.JMenu menu)
Adds a top-level menu to the window.

Parameters:
menuId - A globally unique ID for the menu.
menu - A JMenu instance.
See Also:
getMenu(String)

getMenu

javax.swing.JMenu getMenu(java.lang.String menuId)
Gets a menu previously added, typically by another extension with higher priority.

Parameters:
menuId - The unique ID of the menu. The convention in Lobo is to use "lobo." followed by the name of the menu in lower case, with any spaces converted to dots. For example, the ID of the File menu should be "lobo.file". The ID of the Page Services menu should be "lobo.page.services".
Returns:
A JMenu instance.

addToolBar

void addToolBar(java.awt.Component toolBar)
Adds a "tool bar" component to the window. The preferred height of the tool bar is used, whereas its width will be set roughly to the width of the window.

Parameters:
toolBar - A AWT or Swing lightweight.

addSharedToolBarComponent

void addSharedToolBarComponent(java.awt.Component toolBarComponent)
Adds a component to the shared tool bar. The preferred width of the component is used, whereas its height will be set roughly to the height of the shared tool bar.

Parameters:
toolBarComponent -
See Also:
createGlueComponent(Component, boolean)

addStatusBarComponent

void addStatusBarComponent(java.awt.Component statusBarComponent)
Adds a component to the status bar. The preferred width of the component is used, whereas its height will be set roughly to the height of the status bar.

Parameters:
statusBarComponent -
See Also:
createGlueComponent(Component, boolean)

addAddressBarComponent

void addAddressBarComponent(java.awt.Component addressBarComponent)
Adds a component to the address bar. The preferred width of the component is used, whereas its height will be set roughly to the height of the status bar.

Parameters:
addressBarComponent -
See Also:
createGlueComponent(Component, boolean)

addNavigatorWindowListener

void addNavigatorWindowListener(NavigatorWindowListener listener)
Adds a listener of window events.

Parameters:
listener - A listener instance.

removeNavigatorWindowListener

void removeNavigatorWindowListener(NavigatorWindowListener listener)
Removes a listener previously added with addNavigatorWindowListener(NavigatorWindowListener)

Parameters:
listener -

getTopFrame

NavigatorFrame getTopFrame()
Gets the top frame of this window.


createGlueComponent

java.awt.Component createGlueComponent(java.awt.Component wrappedComponent,
                                       boolean usingMaxSize)
Creates a component wrapper that expands to fill its parent's available space. It only works if the parent uses a Swing BoxLayout. Examples of components that are wrapped this way are the address combo box and the status message component.

Parameters:
wrappedComponent - The component that is wrapped by the glue box.
usingMaxSize - Whether the adjacent components have a maximum size that the container should try to use. If this argument is false, it is assumed that the adjacent components can be shrunk to their minimum sizes.

createGap

java.awt.Component createGap()
Creates a gap component that should be placed between toolbar, address bar or status bar components.


dispose

void dispose()
Closes the window.


getUserAgent

UserAgent getUserAgent()
Gets the navigator for the window.


canBack

boolean canBack()

canForward

boolean canForward()

back

boolean back()

forward

boolean forward()

canReload

boolean canReload()

reload

boolean reload()

stop

boolean stop()

canCopy

boolean canCopy()

copy

boolean copy()

hasSource

boolean hasSource()

goTo

boolean goTo(NavigationEntry entry)
Navigates to a NavigationEntry belonging to navigation history in the current session. without generating a new entry, in much the same way that back() and forward() work.

Parameters:
entry - A existing NavigationEntry.
Returns:
True if the operation succeeded.

getBackNavigationEntries

NavigationEntry[] getBackNavigationEntries()

getForwardNavigationEntries

NavigationEntry[] getForwardNavigationEntries()

getCurrentNavigationEntry

NavigationEntry getCurrentNavigationEntry()

getAwtWindow

java.awt.Window getAwtWindow()
Gets the java.awt.Frame instance associated with this NavigatorWindow. In most cases this method will return an instance of javax.swing.JFrame.



SourceForge.net LogoCopyright © 2005, 2006, 2007 The Lobo Project. All Rights Reserved.
[Lobo Home]