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
Class JRexFactory

    java.lang.Object
      org.mozilla.jrex.JRexFactory

public final class JRexFactory
extends Object

A factory class for initialization of XPCOM and JRex interface implementers The implementor's for any interface in JRex is mapped in 'jrex.impl' file. Which will be loaded at startup and intialized, if you want to replace any of the interface implementation with yours put your implementation calss against interface key in 'jrex.impl' file. Note:- All the implementation classes should have no param constructor.

Version:
  1.0
Author:
  C.N.Medappa

Field Summary
`static String` | `CONTEXTMENU_EVENT_HANDLER` Key for ContextMenuEventHandler implementer retrival.
`static String` | `HISTORY_EVENT_HANDLER` Key for HistoryEventHandler implementer retrival.
`static String` | `JREX_MENUBAR` Key for JRexMenuBar implementer retrival.
`static String` | `JREX_POPUPMENU` Key for JRexPopupMenu implementer retrival.
`static String` | `JREX_PRINTPREVIEWTOOLBAR` Key for JRexPrintPreviewToolBar implementer retrival.
`static String` | `JREX_STATUSBAR` Key for JRexStatusBar implementer retrival.
`static String` | `JREX_TOOLBAR` Key for JRexToolBar implementer retrival.
`static String` | `OBSERVER_EVENT_HANDLER` Key for ObserverEventHandler implementer retrival.
`static String` | `PROGRESS_EVENT_HANDLER` Key for ProgressEventHandler implementer retrival.
`static String` | `TOOLTIP_EVENT_HANDLER` Key for TooltipEventHandler implementer retrival.
`static String` | `URICONTENT_EVENT_HANDLER` Key for URIContentEventHandler implementer retrival.
`static String` | `WINDOW_EVENT_HANDLER` Key for WindowEventHandler implementer retrival.
`static String` | `WINDOW_MANAGER` Key for WindowManager implementer retrival.

Method Summary
`boolean` | `getAutoShutdown()` Returns `true` if XPCOM will be auto shutdown when Root-Window closes.
`Object` | `getImplInstance(String key)` This function returns implemenation instance for give interface key.
`Object` | `getImplNewInstance(String key)` This function returns new implemenation instance for give interface key.
`static JRexFactory` | `getInstance()` This function returns JRexFactory instance.
`boolean` | `isDOMEnabled()` Returns `true` if DOM is enabled.
`boolean` | `isShutdownHook()` Returns `true` if current thread is ShutdownHook that was registered when XPCOM was started.
`void` | `setAutoShutdown(boolean autoShutdown)` If set to `true` then XPCOM will be auto shutdown when Root-Window closes.
`void` | `shutdownEngine()` This function Stops the XPCOM engine and JRexEventManager.
`void` | `startEngine()` This function Starts the XPCOM Engine and JRexEventManager.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### WINDOW_MANAGER

    public static final String WINDOW_MANAGER

  Key for WindowManager implementer retrival.

  See Also:
    Constant Field Values

### WINDOW_EVENT_HANDLER

    public static final String WINDOW_EVENT_HANDLER

  Key for WindowEventHandler implementer retrival.

  See Also:
    Constant Field Values

### HISTORY_EVENT_HANDLER

    public static final String HISTORY_EVENT_HANDLER

  Key for HistoryEventHandler implementer retrival.

  See Also:
    Constant Field Values

### PROGRESS_EVENT_HANDLER

    public static final String PROGRESS_EVENT_HANDLER

  Key for ProgressEventHandler implementer retrival.

  See Also:
    Constant Field Values

### CONTEXTMENU_EVENT_HANDLER

    public static final String CONTEXTMENU_EVENT_HANDLER

  Key for ContextMenuEventHandler implementer retrival.

  See Also:
    Constant Field Values

### TOOLTIP_EVENT_HANDLER

    public static final String TOOLTIP_EVENT_HANDLER

  Key for TooltipEventHandler implementer retrival.

  See Also:
    Constant Field Values

### OBSERVER_EVENT_HANDLER

    public static final String OBSERVER_EVENT_HANDLER

  Key for ObserverEventHandler implementer retrival.

  See Also:
    Constant Field Values

### URICONTENT_EVENT_HANDLER

    public static final String URICONTENT_EVENT_HANDLER

  Key for URIContentEventHandler implementer retrival.

  See Also:
    Constant Field Values

### JREX_MENUBAR

    public static final String JREX_MENUBAR

  Key for JRexMenuBar implementer retrival.

  See Also:
    Constant Field Values

### JREX_STATUSBAR

    public static final String JREX_STATUSBAR

  Key for JRexStatusBar implementer retrival.

  See Also:
    Constant Field Values

### JREX_TOOLBAR

    public static final String JREX_TOOLBAR

  Key for JRexToolBar implementer retrival.

  See Also:
    Constant Field Values

### JREX_POPUPMENU

    public static final String JREX_POPUPMENU

  Key for JRexPopupMenu implementer retrival.

  See Also:
    Constant Field Values

### JREX_PRINTPREVIEWTOOLBAR

    public static final String JREX_PRINTPREVIEWTOOLBAR

  Key for JRexPrintPreviewToolBar implementer retrival.

  See Also:
    Constant Field Values

Method Detail

### getInstance

    public static JRexFactory getInstance()

  This function returns JRexFactory instance.

### getImplNewInstance

    public Object getImplNewInstance(String key)

  This function returns new implemenation instance for give interface key. Use this function for non singleton instance creation.

  Parameters:
    `key` - The interface key.
  Returns:
    `Object` the Instance of the interface.

### getImplInstance

    public Object getImplInstance(String key)

  This function returns implemenation instance for give interface key.

  Parameters:
    `key` - The interface key.
  Returns:
    `Object` the Instance of the interface.

### startEngine

    public void startEngine()
                     throws JRexException

  This function Starts the XPCOM Engine and JRexEventManager. This function also adds a shutdown hook for shutting down xpcom in case it was not shutdown.

  Throws:
    `JRexException`

### setAutoShutdown

    public void setAutoShutdown(boolean autoShutdown)

  If set to `true` then XPCOM will be auto shutdown when Root-Window closes. Root-Window will be parent window of component passed to WindowManager init method. If `null` is passed to init method the JFrame window created by window manger will be Root-Window. Default value is set to `true`.

  See Also:
    `JRexWindowManager.init(javax.swing.JComponent)`

### getAutoShutdown

    public boolean getAutoShutdown()

  Returns `true` if XPCOM will be auto shutdown when Root-Window closes.

  See Also:
    `setAutoShutdown(boolean)`

### isDOMEnabled

    public boolean isDOMEnabled()

  Returns `true` if DOM is enabled. To enable JRex DOM set "jrex.dom.enable" system property to true before starting XPCOM engine.

### isShutdownHook

    public boolean isShutdownHook()

  Returns `true` if current thread is ShutdownHook that was registered when XPCOM was started.

  See Also:
    `startEngine()`

### shutdownEngine

    public void shutdownEngine()
                        throws JRexException

  This function Stops the XPCOM engine and JRexEventManager. It also closes all browser windows opened.

  Throws:
    `JRexException`

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.