org.mozilla.jrex.window
Interface JRexWindowManager

All Known Implementing Classes:
JRexWindowManagerImpl

public interface JRexWindowManager

An interface representing JREX Window manager It is also represents a listener interface for receiving window events.

Version:
1.0
Author:
C.N.Medappa
See Also:
WindowEvent

Field Summary
static int FORCED_TAB_MODE
          A window mode representing tabbed browser window.
static int INTERNAL_PANE_MODE
          A window mode representing JInternalPane browser window.
static int SINGLE_WINDOW_MODE
          A window mode representing single browser window.
static int TAB_MODE
          A window mode representing tabbed browser window.
static int WINDOW_MODE
          A window mode representing normal browser window.
 
Method Summary
 void addJRexWindowListener(WindowListener wl)
          Invoked to add JRex WindowListener, which helps in hooking up for window create/destroy request.
 void addWindow(JRexCanvas browser, Container parent, Container rootParent, Window window, long chromeFlags)
          Used to add a window into window manger list of created windows.
 void create(int mode)
          Window manager creation function.
 void createWindow(WindowEvent event)
          Invoked when an window create request is received.
 void destroyTab(int browserPeer)
          Invoked to remove a tab.
 void destroyWindow(WindowEvent event)
          Invoked when an window destroy request is received.
 void dispose()
          Invoked to dispose the window manager with all its child windows.
 JRexCanvas getBrowser(int peerWindow)
          Finds and returns the JRexCanvas assocciated with given peer window.
 JRexBrowserData getBrowserData(int peerWindow)
          Finds and returns the JRexBrowserData assocciated with given peer window.
 Container getBrowserParent(int peerWindow)
          Finds and returns the Container assocciated with given peer window.
 Window getBrowserWindow(int peerWindow)
          Finds and returns the Window assocciated with given peer window.
 void init(JComponent parentComponent)
          Window manager intialization function, window manager should be created before calling initialize function.
 void openNewTab(int parentPeer, String uri, int loadFlags)
          Invoked when an open new tab request is received.
 void openNewWindow(int parentPeer, String uri, int loadFlags)
          Invoked when an open new window request is received.
 void removeJRexWindowListener()
          Invoked to remove JRex WindowListener.
 void removeWindow(int peerWindow)
          Used to remove a window from window manger list of created windows.
 void setChromeFlags(WindowEvent event)
          Invoked when an chrome flags for a window needs to be changed.
 void setModal(WindowEvent event)
          Invoked when an dialog needs to be made modal.
 void setRealized(WindowEvent event)
          Invoked when jrex native implementation realizes the browser window.
 void setSize(WindowEvent event)
          Invoked when an window size needs to be changed.
 void setTitle(WindowEvent event)
          Invoked when an window title needs to be changed.
 

Field Detail

WINDOW_MODE

public static final int WINDOW_MODE
A window mode representing normal browser window.

See Also:
Constant Field Values

SINGLE_WINDOW_MODE

public static final int SINGLE_WINDOW_MODE
A window mode representing single browser window. If an application uses this mode, any request to new window from web page will be ignored.

See Also:
Constant Field Values

TAB_MODE

public static final int TAB_MODE
A window mode representing tabbed browser window.

See Also:
Constant Field Values

FORCED_TAB_MODE

public static final int FORCED_TAB_MODE
A window mode representing tabbed browser window. If an application uses this mode, any request to new window from web page will will be opened in new tab.

See Also:
Constant Field Values

INTERNAL_PANE_MODE

public static final int INTERNAL_PANE_MODE
A window mode representing JInternalPane browser window.

See Also:
Constant Field Values
Method Detail

create

public void create(int mode)
Window manager creation function.

Parameters:
mode - The mode which the window manager should use.
Throws:
Throws - java.lang.IllegalArgumentException if mode is not valid.

init

public void init(JComponent parentComponent)
Window manager intialization function, window manager should be created before calling initialize function.

Parameters:
parentComponent - The parent component where the jrex browser will be attached. If null a new JFrame window will be created.

createWindow

public void createWindow(WindowEvent event)
Invoked when an window create request is received.


setModal

public void setModal(WindowEvent event)
Invoked when an dialog needs to be made modal.


setSize

public void setSize(WindowEvent event)
Invoked when an window size needs to be changed.


setTitle

public void setTitle(WindowEvent event)
Invoked when an window title needs to be changed.


setChromeFlags

public void setChromeFlags(WindowEvent event)
Invoked when an chrome flags for a window needs to be changed. Chrome flags help in identifying the type of window to be opened.


setRealized

public void setRealized(WindowEvent event)
Invoked when jrex native implementation realizes the browser window. Used to indicate Java implementation about the realization so the event listeners can be added.


destroyWindow

public void destroyWindow(WindowEvent event)
Invoked when an window destroy request is received.


openNewWindow

public void openNewWindow(int parentPeer,
                          String uri,
                          int loadFlags)
Invoked when an open new window request is received. The action taken depends on the mode of the window manager.

Parameters:
parentPeer - the parent peer window ID which invoked this function, Usage depends on window manager mode
uri - the URI to open.
loadFlags - the load flags to use for loading the URI.
See Also:
WebNavigationConstants

openNewTab

public void openNewTab(int parentPeer,
                       String uri,
                       int loadFlags)
Invoked when an open new tab request is received. The action taken depends on the mode of the window manager.

Parameters:
parentPeer - the parent peer window ID which invoked this function, Usage depends on window manager mode
uri - the URI to open.
loadFlags - the load flags to use for loading the URI.
See Also:
WebNavigationConstants

destroyTab

public void destroyTab(int browserPeer)
Invoked to remove a tab. The action taken depends on the mode of the window manager.

Parameters:
browserPeer - the peer browser ID for the tab.

addWindow

public void addWindow(JRexCanvas browser,
                      Container parent,
                      Container rootParent,
                      Window window,
                      long chromeFlags)
Used to add a window into window manger list of created windows.

Parameters:
browser - the browser component associated window.
parent - the Container containing the browser component.
rootParent - the rootContainer containing the browser component, like the content pane of JFrame or can be parent itself or
window - the window containing the browser component.
chromeFlags - the Chrome Flags for the window.

removeWindow

public void removeWindow(int peerWindow)
Used to remove a window from window manger list of created windows.

Parameters:
peerWindow - the peer window ID for the window.

getBrowser

public JRexCanvas getBrowser(int peerWindow)
Finds and returns the JRexCanvas assocciated with given peer window.


getBrowserParent

public Container getBrowserParent(int peerWindow)
Finds and returns the Container assocciated with given peer window.


getBrowserWindow

public Window getBrowserWindow(int peerWindow)
Finds and returns the Window assocciated with given peer window.


getBrowserData

public JRexBrowserData getBrowserData(int peerWindow)
Finds and returns the JRexBrowserData assocciated with given peer window.


addJRexWindowListener

public void addJRexWindowListener(WindowListener wl)
Invoked to add JRex WindowListener, which helps in hooking up for window create/destroy request.


removeJRexWindowListener

public void removeJRexWindowListener()
Invoked to remove JRex WindowListener.


dispose

public void dispose()
Invoked to dispose the window manager with all its child windows.



Copyright © 2004 C.N.Medappa. All Rights Reserved.