public interface IMozillaBrowserCanvas extends IBrowserCanvas
IMozillaBrowserCanvas
provides Mozilla specific extensions to the
standard IBrowserCanvas
interface. This functionality can be
accessed by casting a standard IBrowserCanvas
interface, but only
if Mozilla is the currently used browser. For example:
if ( browser.getBrowserType().equals("MOZILLA") ) {
( (IMozillaBrowserCanvas) browser ).saveToFile( "filename.html" );
}
Modifier and Type | Field and Description |
---|---|
static int |
COOKIE_ACCEPT_ALL
This flag indicates to
setCookieMode that all cookies will
be accepted by Mozilla. |
static int |
COOKIE_ACCEPT_FROM_ORIGINATING_SERVER
This flag indicates to
setCookieMode that only cookies
that have requested by the originating server will be accepted. |
static int |
COOKIE_ACCEPT_NONE
This flag indicates to
setCookieMode that all cookies will
be discarded by Mozilla. |
static int |
DISABLE_JAVA_APPLETS
This flag indicates to
setAppletMode that java applets
will be disabled. |
static int |
ENABLE_JAVA_APPLETS
This flag indicates to
setAppletMode that java applets
will be enabled. |
static int |
ENABLE_JAVA_APPLETS_WITHOUT_SECURITY
This flag indicates to
setAppletMode that java applets
will be enabled and applets will have all permissions. |
KEY_CODE_BACKSPACE, KEY_CODE_DELETE, KEY_CODE_TAB, KEY_MODIFIER_CTRL_DOWN, KEY_MODIFIER_SHIFT_DOWN, PRINT_DEFAULT_ACTION, PRINT_ORIENTATION_LANDSCAPE, PRINT_ORIENTATION_PORTRAIT, PRINT_SHOW_DIALOG_BOX, PRINT_SILENT, RELOAD_BYPASS_CACHE, RELOAD_BYPASS_PROXY, RELOAD_BYPASS_PROXY_AND_CACHE, RELOAD_NORMAL
Modifier and Type | Method and Description |
---|---|
void |
addBadCertificateListener(BadCertificateListener listener)
Add a Bad Certificate Listener.
|
void |
clearCache()
Clears cache from disk and memory.
|
void |
deleteCertificate(X509Certificate cert)
Deletes the specified certificate from the browsers certificate database.
|
boolean |
findInPage(String toFind,
boolean matchCase,
boolean wrap,
boolean backwards)
The given string will be found and highlighted in the document if it exists
Set matchCase if it is a case sensitive search
Set wrap if you want the search to continue searching from top when it hits the bottom
Set backwards if you want the search to go backwards throughout the page
|
X509Certificate |
getCertificateByName(String name)
Returns the specified certificate from the browsers certificate database.
|
String[] |
getCertificateNameList()
Gets a list of the common names of all the certificates in the browsers certificate database.
|
X509Certificate[] |
getCertificates()
Returns all the certificates in the browsers certificate database.
|
ICertificateService |
getCertificateService()
Returns an
ICertificateService that can be used to manipulate the
browser's advanced certificate-management functionality. |
boolean |
getCertificateTrust(X509Certificate certificate)
Gets the certificate trust status.
|
int |
getCookieMode()
Get the current cookie accept mode.
|
IFindService |
getFindService()
Returns an
IFindService that can be used to search for text,
highlight it, and navigate between matches. |
String |
getMozillaVersion()
Returns the current version of Mozilla from corecomponents
|
ScrollBarInfo |
getScrollBarInfo()
Returns the current scroll state of the outer document.
|
Node |
getW3CDocument()
Returns the Document Node for the currently loaded page.
|
void |
importCertificate(X509Certificate cert,
boolean trusted)
Imports an SSL server certificate into the browser's certificate
database.
|
void |
launchFindInPageDialog()
Launches a dialog which prompts for values to be sent to the
findInPage method. |
void |
registerProtocol(String protocol,
ProtocolListener l)
Registers a protocol to Mozilla.
|
void |
removeBadCertificateListener(BadCertificateListener listener)
Remove a Bad Certificate Listener.
|
void |
saveToFile(String filename)
Save the current HTML page to a local file.
|
void |
scrollToX(int xPos)
Scrolls the browser along the x axis to specified position
|
void |
scrollToY(int yPos)
Scrolls the browser along the y axis to specified position
|
void |
setAppletMode(int mode)
Set the mode for displaying applets.
|
void |
setCertificateTrust(X509Certificate cert,
boolean trusted)
Sets whether or not the certificate is to be trusted.
|
void |
setCookieMode(int mode)
Set the mode for accepting cookies.
|
void |
setProxyAuthentication(String username,
String password)
Set Proxy Authentication.
|
void |
setRenderingOptimizations(RenderingOptimization optimizations)
Set rendering optimizations.
|
addAppletListener, addBlockedURL, addBrowserListener, addJavascriptListener, addKeyListener, addMouseListener, addNetworkListener, addPromptListener, addWindowListener, allowPopups, autoconfigureProxy, canGoBack, canGoForward, canRedo, canUndo, copy, cut, decreaseTextZoom, deleteCookies, disableCache, disableCookies, disableHTTPSDialog, disableProxy, dispatchClickEventToPoint, enableCache, enableCookies, enableDefaultContextMenu, enableImageLoading, enablePlugins, enableProxy, executeScript, executeScriptWithReturn, getAllowPopups, getBoolPrefProperty, getBrowserType, getCompanyName, getComponent, getCookie, getCookie, getDefaultContextMenuStatus, getdisableHTTPSDialog, getDocument, getHistory, getHTMLEditingMode, getHTTPHeadersEnabled, getIntPrefProperty, getJavascriptEnabled, getOptionsService, getPluginService, getPopupParentWindow, getPrinterMarginBottom, getPrinterMarginLeft, getPrinterMarginRight, getPrinterMarginTop, getPrintRequestAttributeSet, getProductName, getProxyBypasses, getProxyProtocol, getSelectedText, getStringPrefProperty, getTitle, getURL, getVersion, getWebRendererVersion, getZoomService, goBack, goForward, highlightSelectedText, httpPOST, httpPOST, httpPOST, increaseTextZoom, insertHTML, isCacheDisabled, isCookiesEnabled, isPluginsEnabled, isProxyEnabled, isScrollBarsVisible, loadHTML, loadHTML, loadHTML, loadURL, loadURL, loadURL, makeImageUrl, paste, print, print, printPreview, printPreviewInNewWindow, redo, reload, removeAppletListener, removeBlockedURL, removeBrowserListener, removeJavascriptListener, removeKeyListener, removeMouseListener, removeNetworkListener, removePromptListener, removeWindowListener, savePageToBitmapImage, saveToBufferedImage, selectAll, sendKeyPressToElement, setCookie, setCookie, setHTMLEditingMode, setHTTPHeadersEnabled, setJavascriptEnabled, setPopupParentWindow, setPreferredSize, setPrefProperty, setPrefProperty, setPrefProperty, setPrintBackground, setPrinterMargin, setPrintRequestAttributeSet, setProxyBypasses, setProxyProtocol, showScrollBars, stopLoad, undo
static final int COOKIE_ACCEPT_ALL
setCookieMode
that all cookies will
be accepted by Mozilla. setCookieMode(COOKIE_ACCEPT_ALL)
is
the same as using IBrowserCanvas.enableCookies()
.setCookieMode(int)
,
Constant Field Valuesstatic final int COOKIE_ACCEPT_FROM_ORIGINATING_SERVER
setCookieMode
that only cookies
that have requested by the originating server will be accepted. The
functionality provided by this is currently only found in Mozilla.setCookieMode(int)
,
Constant Field Valuesstatic final int COOKIE_ACCEPT_NONE
setCookieMode
that all cookies will
be discarded by Mozilla. setCookieMode(COOKIE_ACCEPT_NONE)
is the same as using IBrowserCanvas.disableCookies()
.setCookieMode(int)
,
Constant Field Valuesstatic final int DISABLE_JAVA_APPLETS
setAppletMode
that java applets
will be disabled.setAppletMode(int)
,
Constant Field Valuesstatic final int ENABLE_JAVA_APPLETS
setAppletMode
that java applets
will be enabled.setAppletMode(int)
,
Constant Field Valuesstatic final int ENABLE_JAVA_APPLETS_WITHOUT_SECURITY
setAppletMode
that java applets
will be enabled and applets will have all permissions.setAppletMode(int)
,
Constant Field Valuesvoid saveToFile(String filename)
saveToFile
in interface IBrowserCanvas
filename
- Filename to save HTML to.String getMozillaVersion()
void setCookieMode(int mode)
COOKIE_
* members in this class. Using
COOKIE_ACCEPT_ALL
or COOKIE_ACCEPT_NONE
modes
are equivalent to the IBrowserCanvas
methods
enableCookies
and disableCookies
respectively.mode
- The cookie accept mode defined by COOKIE_
*.int getCookieMode()
COOKIE_
* members in this class. Using
COOKIE_ACCEPT_ALL
or COOKIE_ACCEPT_NONE
modes
are equivalent to the IBrowserCanvas
methodsCOOKIE_
*.boolean findInPage(String toFind, boolean matchCase, boolean wrap, boolean backwards)
IFindService getFindService()
IFindService
that can be used to search for text,
highlight it, and navigate between matches.ScrollBarInfo getScrollBarInfo()
void scrollToY(int yPos)
void scrollToX(int xPos)
void setProxyAuthentication(String username, String password)
void registerProtocol(String protocol, ProtocolListener l)
protocol
- name of protocol to create or overridel
- listener to implement protocolvoid launchFindInPageDialog()
findInPage
method.void importCertificate(X509Certificate cert, boolean trusted)
This method is for importing an individual server certificate. To import
a CA root certificate, use
ICertificateService.importCertificateAuthorityCertificate(X509Certificate)
.
cert
- the certificate to importtrusted
- whether this certificate is trusted or notICertificateService.importCertificateAuthorityCertificate(X509Certificate)
String[] getCertificateNameList()
X509Certificate getCertificateByName(String name)
name
- The name of the certificate to returnX509Certificate[] getCertificates()
void setCertificateTrust(X509Certificate cert, boolean trusted)
cert
- The certificate to have its trust value settrusted
- True if the certificate is to be trustedboolean getCertificateTrust(X509Certificate certificate)
certificate
- void deleteCertificate(X509Certificate cert)
cert
- The certificate to be deletedICertificateService getCertificateService()
ICertificateService
that can be used to manipulate the
browser's advanced certificate-management functionality.ICertificateService.importCertificateAuthorityCertificate(X509Certificate)
,
importCertificate(X509Certificate, boolean)
Node getW3CDocument()
getW3CDocument
in interface IBrowserCanvas
void addBadCertificateListener(BadCertificateListener listener)
void removeBadCertificateListener(BadCertificateListener listener)
void setRenderingOptimizations(RenderingOptimization optimizations)
void setAppletMode(int mode)
mode
- The applet mode.DISABLE_JAVA_APPLETS
,
ENABLE_JAVA_APPLETS
,
ENABLE_JAVA_APPLETS_WITHOUT_SECURITY
void clearCache()