com.jniwrapper.win32.ie
Class Browsers

java.lang.Object
  extended bycom.jniwrapper.win32.ie.Browsers

public class Browsers
extends java.lang.Object

This is a utility class for browser-related operations.


Field Summary
static InternetFeatures PROCESS_FEATURES
          The Internet features for the current process.
static InternetFeatures THREAD_FEATURES
          The Internet features for the current thread.
static InternetFeatures THREAD_INTERNET_FEATURES
          The Internet features for the Internet zone.
static InternetFeatures THREAD_INTRANET_FEATURES
          The Internet features for the intranet zone.
static InternetFeatures THREAD_LOCALMACHINE_FEATURES
          The Internet features for the local machine zone.
static InternetFeatures THREAD_RESTRICTED_FEATURES
          The Internet features for the restricted zone.
static InternetFeatures THREAD_TRUSTED_FEATURES
          The Internet features for the trusted zone.
 
Method Summary
static void clearCache(InternetCacheEntry cacheEntry)
          Clears the Internet Explorer cache.
static com.jniwrapper.win32.shdocvw.IWebBrowser2 getBrowserPeer(WebBrowser browser)
          Returns an instance of the native web browser peer IWebBrowser2 of the passed browser object.
static com.jniwrapper.win32.ui.Wnd getBrowserWindow(WebBrowser browser)
          Returms handle of the browser window.
static com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop(WebBrowser browser)
          Returns an instance of the message loop support OleMessageLoop of the passed browser object.
static com.jniwrapper.win32.winhttp.ProxySettings getProxySettings()
          Returns Internet Explorer proxy settings.
static boolean isBrowserSupported()
          Function that determines if the IE browser version is supported.
static boolean isSameBrowserPeer(WebBrowser webBrowser1, WebBrowser webBrowser2)
          Returns true if both object are web browsers for the same native browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THREAD_FEATURES

public static final InternetFeatures THREAD_FEATURES
The Internet features for the current thread.


PROCESS_FEATURES

public static final InternetFeatures PROCESS_FEATURES
The Internet features for the current process.


THREAD_LOCALMACHINE_FEATURES

public static final InternetFeatures THREAD_LOCALMACHINE_FEATURES
The Internet features for the local machine zone.


THREAD_INTRANET_FEATURES

public static final InternetFeatures THREAD_INTRANET_FEATURES
The Internet features for the intranet zone.


THREAD_TRUSTED_FEATURES

public static final InternetFeatures THREAD_TRUSTED_FEATURES
The Internet features for the trusted zone.


THREAD_INTERNET_FEATURES

public static final InternetFeatures THREAD_INTERNET_FEATURES
The Internet features for the Internet zone.


THREAD_RESTRICTED_FEATURES

public static final InternetFeatures THREAD_RESTRICTED_FEATURES
The Internet features for the restricted zone.

Method Detail

getBrowserPeer

public static com.jniwrapper.win32.shdocvw.IWebBrowser2 getBrowserPeer(WebBrowser browser)
Returns an instance of the native web browser peer IWebBrowser2 of the passed browser object.

Parameters:
browser - browser object.
Returns:
native peer object.

getOleMessageLoop

public static com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop(WebBrowser browser)
Returns an instance of the message loop support OleMessageLoop of the passed browser object.

Parameters:
browser - browser object.
Returns:
message loop for the browser.

isSameBrowserPeer

public static boolean isSameBrowserPeer(WebBrowser webBrowser1,
                                        WebBrowser webBrowser2)
Returns true if both object are web browsers for the same native browser.

Returns:
true if both browsers use the same native browser

getBrowserWindow

public static com.jniwrapper.win32.ui.Wnd getBrowserWindow(WebBrowser browser)
Returms handle of the browser window.

Parameters:
browser - browser object
Returns:
browser's handle

isBrowserSupported

public static boolean isBrowserSupported()
Function that determines if the IE browser version is supported.

Returns:
true if browser version is 6.x and greater, false otherwise

getProxySettings

public static com.jniwrapper.win32.winhttp.ProxySettings getProxySettings()
                                                                   throws com.jniwrapper.win32.winhttp.WinHttpException
Returns Internet Explorer proxy settings.

Returns:
information about proxy settings of Internet Explorer
Throws:
com.jniwrapper.win32.winhttp.WinHttpException

clearCache

public static void clearCache(InternetCacheEntry cacheEntry)
Clears the Internet Explorer cache.

To clear:

  • Internet Temporary files pass InternetCacheEntry.NORMAL_CACHE_ENTRY value.
  • All stored cookies pass InternetCacheEntry.COOKIE_CACHE_ENTRY value.
  • URL history pass InternetCacheEntry.URLHISTORY_CACHE_ENTRY value.
  • Parameters:
    cacheEntry - Internet cache entry type that will be cleared.