net.sourceforge.java.feednread.frontend.components.tabbar
Class InternalBrowser

java.lang.Object
  extended bynet.sourceforge.java.feednread.frontend.components.tabbar.InternalBrowser

public class InternalBrowser
extends Object

Internal web browser component which consists of a Browser and a ToolBar component holding the default browser operations which are back, forward, refresh, stop and home.

Author:
Sebastian Machhausen

Nested Class Summary
private  class InternalBrowser.LocationHandler
           
private  class InternalBrowser.PageTitleHandler
           
private  class InternalBrowser.ProgressHandler
           
private  class InternalBrowser.StatusBarHandler
           
 
Field Summary
private  Browser browser
           The Browser widget
private  Composite browserPanel
           The panel holding the browser components
private  ToolBar browserToolBar
           The Browser ToolBar
private  ToolBarManager browserToolBarManager
           The ToolBarManager to manage the Browser ToolBar
private  InternalBrowser.LocationHandler locationHandler
           Event handle for location changes
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
private  InternalBrowser.PageTitleHandler pageTitleHandler
           Event handler for changes to the page title
private  InternalBrowser.ProgressHandler progressHandler
           Event handler for changes in the page loading progress
private  InternalBrowser.StatusBarHandler statusBarHandler
           Event handler for changes in the status bar
private  ViewForm toolBarForm
           The ViewForm to hold the ToolBar
 
Constructor Summary
InternalBrowser(Composite parent, MainApplicationWindow mainWindow)
           Creates a new InternalBrowser and embeds it into the specified placeholder component.
 
Method Summary
 boolean areContorolsVisible()
           Gets the visibility status of the browser controls (back, forward, home, stop, refresh).
private  void createComponents(Composite parent)
           Creates all components required by this InternalBrowser, adjusts its settings and does the layout.
 void dispose()
           Disposes all resources claimed by this InternalBrowser instance.
 Browser getBrowser()
           Gets the Browser widget.
 Composite getInternalBrowserPanel()
           Gets the panel holding the complete InternalBrowser component.
 String getTitle()
           Gets the title of the web page currently displayed in this InternalBrowser.
 String getUrl()
           Gets the url currently displayed in this InternalBrowser.
private  void registerEventHandler()
           Creates all Event Handler required in this InternalBrowser context.
 void setControlsVisible(boolean visible)
           Sets the visibility status of the browser controls (back, forward, home, stop, refresh).
 void setUrl(String url)
           Sets this InternalBrowser to the specified url.
private  void unregisterEventHandler()
           Unregisters all Event Handler created in this InternalBrowser context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window


browserPanel

private Composite browserPanel

The panel holding the browser components


browser

private Browser browser

The Browser widget


browserToolBarManager

private ToolBarManager browserToolBarManager

The ToolBarManager to manage the Browser ToolBar


toolBarForm

private ViewForm toolBarForm

The ViewForm to hold the ToolBar


browserToolBar

private ToolBar browserToolBar

The Browser ToolBar


locationHandler

private InternalBrowser.LocationHandler locationHandler

Event handle for location changes


statusBarHandler

private InternalBrowser.StatusBarHandler statusBarHandler

Event handler for changes in the status bar


pageTitleHandler

private InternalBrowser.PageTitleHandler pageTitleHandler

Event handler for changes to the page title


progressHandler

private InternalBrowser.ProgressHandler progressHandler

Event handler for changes in the page loading progress

Constructor Detail

InternalBrowser

public InternalBrowser(Composite parent,
                       MainApplicationWindow mainWindow)

Creates a new InternalBrowser and embeds it into the specified placeholder component.

Parameters:
parent - the placeholder component to embed this InternalBrowser into
mainWindow - The Feed'n Read main window
Method Detail

getInternalBrowserPanel

public Composite getInternalBrowserPanel()

Gets the panel holding the complete InternalBrowser component.

Returns:
he panel holding the complete InternalBrowser component

getBrowser

public Browser getBrowser()

Gets the Browser widget.

Returns:
the Browser widget

getTitle

public String getTitle()

Gets the title of the web page currently displayed in this InternalBrowser.

Returns:
the title of the web page currently displayed in this InternalBrowser

setUrl

public void setUrl(String url)

Sets this InternalBrowser to the specified url.

Parameters:
url - the url to set

getUrl

public String getUrl()

Gets the url currently displayed in this InternalBrowser.

Returns:
the url currently displayed in this InternalBrowser

dispose

public void dispose()

Disposes all resources claimed by this InternalBrowser instance.


setControlsVisible

public void setControlsVisible(boolean visible)

Sets the visibility status of the browser controls (back, forward, home, stop, refresh).

Parameters:
visible - true to show the browser controls; false to hide them

areContorolsVisible

public boolean areContorolsVisible()

Gets the visibility status of the browser controls (back, forward, home, stop, refresh).

Returns:
true if the browser controls are visible; false if hidden

createComponents

private void createComponents(Composite parent)

Creates all components required by this InternalBrowser, adjusts its settings and does the layout.

Parameters:
parent - the placeholder component to embed the created components into

registerEventHandler

private void registerEventHandler()

Creates all Event Handler required in this InternalBrowser context.


unregisterEventHandler

private void unregisterEventHandler()

Unregisters all Event Handler created in this InternalBrowser context.