Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.
`int` | `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.
`JRexCanvas` | `getBrowserForParent(Container parent)` Finds and returns the JRexCanvas assocciated with given parent.
`Iterator` | `getBrowserForRootParent(Container rootParent)` Finds and returns the list of JRexCanvas assocciated with given rootParent.
`Iterator` | `getBrowserForWindow(Window window)` Finds and returns the list of JRexCanvas assocciated with given window.
`Container` | `getBrowserParent(int peerWindow)` Finds and returns the Container assocciated with given peer window.
`Container` | `getBrowserRootParent(int peerWindow)` Finds and returns the Root 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. The `parentComponent` should already have a parent window, ie, `parentComponent` should be added to a Frame/Dialog/Window before being passed to init function. If `null` is passed a new JFrame window will be used.

### createWindow

    public int 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.

### getBrowserForWindow

    public Iterator getBrowserForWindow(Window window)

  Finds and returns the list of JRexCanvas assocciated with given window.

### getBrowserForRootParent

    public Iterator getBrowserForRootParent(Container rootParent)

  Finds and returns the list of JRexCanvas assocciated with given rootParent.

### getBrowserForParent

    public JRexCanvas getBrowserForParent(Container parent)

  Finds and returns the JRexCanvas assocciated with given parent.

### getBrowserParent

    public Container getBrowserParent(int peerWindow)

  Finds and returns the Container assocciated with given peer window.

### getBrowserRootParent

    public Container getBrowserRootParent(int peerWindow)

  Finds and returns the Root 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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