|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lobobrowser.main.PlatformInit
public class PlatformInit
A singleton class that is used to initialize a browser session in the current JVM. It can also be used to open a browser window.
getInstance()| Method Summary | |
|---|---|
void |
addPrivilegedPermission(java.security.Permission permission)
Adds one permission to the base set of permissions assigned to privileged code, i.e. |
java.io.File |
getApplicationDirectory()
|
static PlatformInit |
getInstance()
Gets the singleton instance. |
void |
init(boolean exitWhenAllWindowsAreClosed,
boolean initConsole)
Initializes security, protocols, look & feel, console, the default window factory, extensions and java.library.path. |
void |
init(java.lang.String[] args,
boolean exitWhenAllWindowsAreClosed)
Deprecated. Use init(boolean, boolean). |
void |
initConsole()
Resets standard output and error streams so they are redirected to the browser console. |
void |
initExtensions()
Initializes browser extensions. |
void |
initLogging(boolean debugOn)
Initializes platform logging. |
void |
initLookAndFeel()
Initializes the Swing look & feel. |
void |
initNative(java.lang.String dirName)
Initializers the java.library.path property. |
void |
initOtherProperties()
Initializes some Java properties required by the browser. |
void |
initProtocols()
Initializes the global URLStreamHandlerFactory, sets up an authenticator and a cookie handler. |
void |
initSecurity()
Intializes security by installing a security policy and a security manager. |
void |
initWindowFactory(boolean exitWhenAllWindowsAreClosed)
Initializes the default window factory such that the JVM exits when all windows created by the factory are closed by the user. |
boolean |
isCodeLocationDirectory()
|
void |
launch()
Opens as many browser windows as there are startup URLs in general settings. |
void |
launch(java.lang.String urlOrPath)
Opens a window and attempts to render the URL or path given. |
void |
scheduleTask(org.lobobrowser.util.SimpleThreadPoolTask task)
|
static void |
shutdown()
Performs some cleanup and then exits the JVM. |
void |
start(java.lang.String[] args)
Starts the browser by opening the URLs specified in the command-line arguments provided. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void initSecurity()
init)
to prevent web content from having full access to the user's
computer.
addPrivilegedPermission(Permission)public void initProtocols()
This method is invoked by init(boolean, boolean).
public void initLookAndFeel()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isCodeLocationDirectory()
public void initConsole()
ConsoleModel
public void initLogging(boolean debugOn)
throws java.lang.Exception
init(boolean, boolean).
debugOn - Debugging mode. This determines which one
of two different logging configurations is used.
java.lang.Exceptionpublic void initExtensions()
init(boolean, boolean).
public void initWindowFactory(boolean exitWhenAllWindowsAreClosed)
public void initNative(java.lang.String dirName)
java.library.path property.
This method is called by init(boolean, boolean).
dirName - A directory name relative to the browser application directory.public void initOtherProperties()
This method is called by init(boolean, boolean).
public void init(java.lang.String[] args,
boolean exitWhenAllWindowsAreClosed)
throws java.lang.Exception
init(boolean, boolean).
java.lang.Exception
public void init(boolean exitWhenAllWindowsAreClosed,
boolean initConsole)
throws java.lang.Exception
java.library.path. This method should
be invoked before
using other functionality in the browser API. If this method is not
called, at the very least initOtherProperties(), initProtocols() and initExtensions()
should be called.
Applications that need to install their own security manager and policy should not call this method.
exitWhenAllWindowsAreClosed - Whether the JVM should exit when
all windows created by the default window factory are closed.initConsole - If this
parameter is true, standard output
is redirected to a browser console. See
ConsoleModel.
java.lang.ExceptioninitSecurity(),
initProtocols(),
initExtensions()
public void launch(java.lang.String urlOrPath)
throws java.net.MalformedURLException
urlOrPath - A URL or file path.
java.net.MalformedURLException
public void launch()
throws java.net.MalformedURLException
java.net.MalformedURLExceptionGeneralSettings.getStartupURLs()
public void start(java.lang.String[] args)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionGeneralSettings.getStartupURLs()public static PlatformInit getInstance()
public static void shutdown()
public void addPrivilegedPermission(java.security.Permission permission)
init(boolean, boolean)
or initSecurity() are invoked. The purpose of the
method is to add permissions otherwise missing from the
security policy installed by this facility.
permission - A Permission instance.public void scheduleTask(org.lobobrowser.util.SimpleThreadPoolTask task)
public java.io.File getApplicationDirectory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||