com.pepper.guiutils.mozilla
Class MozillaContainer

java.lang.Object
  extended by com.pepper.guiutils.mozilla.MozillaContainer
All Implemented Interfaces:
WebBrowserContainer

public class MozillaContainer
extends Object
implements WebBrowserContainer

Manager of MozillaBrowserView objects for an application


Field Summary
 
Fields inherited from interface com.pepper.guiutils.browser.WebBrowserContainer
TYPE_MOZILLA
 
Constructor Summary
MozillaContainer(AbstractPepperProgram theProg)
          Constructor
 
Method Summary
 void clearInternalCaches()
          Clear any internal file caches, to allow files to be replaced/reloaded.
 WebBrowserView createView(Section section)
          Create a view for the specified Section.
 WebBrowserView createView(Section section, int windowOptions)
          Create a view for the specified Section using the specified window options
 WebBrowserView createView(Section section, int windowOptions, String uri)
          Create a view for the specified Section using the specified window options and load initial uri
 void destroy()
          Called when the package is quit
 WebBrowserView getActiveView()
          Returns the browser view that currently visible and active.
 List getAllViews()
          Get a list of all open browser views
 int getType()
          Get the type of Container
 WebBrowserView getView(String viewId)
          Returns the browser view with the specified id
 void init()
          Initialize the Mozilla engine
 boolean isDestroyed()
          Returns true if container views have been destroyed
 boolean isInitialized()
          Returns whether or not the container is initialized
 void removeView(String viewId)
          Remove the browser view with the specified id
 void setActiveView(WebBrowserView view)
          Make the passed in view visible
 void shutdown()
          Shutdown the browser and free all of it's resources
 void viewChange(String selectedViewId)
          This method will handle selection changes between views
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MozillaContainer

public MozillaContainer(AbstractPepperProgram theProg)
Constructor

Parameters:
theProg - Program that this container is for
Method Detail

init

public void init()
Initialize the Mozilla engine

Specified by:
init in interface WebBrowserContainer

getView

public WebBrowserView getView(String viewId)
Returns the browser view with the specified id

Specified by:
getView in interface WebBrowserContainer
Parameters:
viewId - a String value
Returns:
a WebBrowserView value

getActiveView

public WebBrowserView getActiveView()
Returns the browser view that currently visible and active. Could be a view in a tab or in a popup window..

Specified by:
getActiveView in interface WebBrowserContainer
Returns:
a WebBrowserView value

setActiveView

public void setActiveView(WebBrowserView view)
Make the passed in view visible

Specified by:
setActiveView in interface WebBrowserContainer
Parameters:
view - a WebBrowserView value

getAllViews

public List getAllViews()
Get a list of all open browser views

Specified by:
getAllViews in interface WebBrowserContainer
Returns:
a List of WebBrowserView objects

removeView

public void removeView(String viewId)
Remove the browser view with the specified id

Specified by:
removeView in interface WebBrowserContainer
Parameters:
viewId - a String value

createView

public WebBrowserView createView(Section section)
Create a view for the specified Section. In this case we will delegate to the MozillaTabbedBrowser to create a JRexCanvas object, and add the Canvas to the TabbedSectionMgr as a card in the card layout. Defaults to creating a new tab

Specified by:
createView in interface WebBrowserContainer
Parameters:
section - a Section value
Returns:
a WebBrowserView value

createView

public WebBrowserView createView(Section section,
                                 int windowOptions)
Create a view for the specified Section using the specified window options

Specified by:
createView in interface WebBrowserContainer
Parameters:
section - a Section value
windowOptions - one of WebBrowserView.WINDOW_NEW, WebBrowserView.WINDOW_NEW_TAB
Returns:
a WebBrowserView value

createView

public WebBrowserView createView(Section section,
                                 int windowOptions,
                                 String uri)
Create a view for the specified Section using the specified window options and load initial uri

Specified by:
createView in interface WebBrowserContainer
Parameters:
section - a Section value
windowOptions - one of WebBrowserView.WINDOW_NEW, WebBrowserView.WINDOW_NEW_TAB
uri - initial uri to load in view
Returns:
a WebBrowserView value
Since:
3.2

viewChange

public void viewChange(String selectedViewId)
This method will handle selection changes between views

Specified by:
viewChange in interface WebBrowserContainer
Parameters:
selectedViewId - The id of the view that has been selected

getType

public int getType()
Get the type of Container

Specified by:
getType in interface WebBrowserContainer
Returns:
an int value

shutdown

public void shutdown()
Description copied from interface: WebBrowserContainer
Shutdown the browser and free all of it's resources

Specified by:
shutdown in interface WebBrowserContainer
See Also:
WebBrowserContainer

destroy

public void destroy()
Description copied from interface: WebBrowserContainer
Called when the package is quit

Specified by:
destroy in interface WebBrowserContainer

isDestroyed

public boolean isDestroyed()
Description copied from interface: WebBrowserContainer
Returns true if container views have been destroyed

Specified by:
isDestroyed in interface WebBrowserContainer
Returns:
a boolean value
Since:
3.2
See Also:
WebBrowserContainer

isInitialized

public boolean isInitialized()
Description copied from interface: WebBrowserContainer
Returns whether or not the container is initialized

Specified by:
isInitialized in interface WebBrowserContainer
Returns:
a boolean value

clearInternalCaches

public void clearInternalCaches()
Clear any internal file caches, to allow files to be replaced/reloaded. Doesn't clear the browser's page cache.

Specified by:
clearInternalCaches in interface WebBrowserContainer


Copyright © 2006-2007 Pepper Computer, Inc. All Rights Reserved.