com.webrenderer
Interface IIEBrowserCanvas

All Superinterfaces:
IBrowserCanvas

public interface IIEBrowserCanvas
extends IBrowserCanvas

IIEBrowserCanvas provides Microsoft Internet Explorer specific extensions to the standard IBrowserCanvas interface. This functionality can be accessed by casting a standard IBrowserCanvas interface, but only if Internet Explorer is the currently used browser. For example:


 if ( browser.getBrowserType().equals("IE") ) {
     ((IIEBrowserCanvas) browser).pageSetup();
 }


Field Summary
 
Fields inherited from interface com.webrenderer.IBrowserCanvas
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, PRINT_SILENT_SHOW_HELP, RELOAD_BYPASS_CACHE, RELOAD_BYPASS_PROXY, RELOAD_BYPASS_PROXY_AND_CACHE, RELOAD_NORMAL
 
Method Summary
 void clearSelection()
          Clear Selection command
 void delete()
          Delete command
 void disableSelection(boolean bDisable)
          Disables selection in the browser.
 java.awt.Point getCaretPosition()
          Returns the co-ordinates of the caret position.
 IElement getElementAtCaretPosition()
          Gets the IElement at the current caret position.
 int getIEBrowserHandle()
          Get the IE browser Handle.
 void insertHTML(java.lang.String strHTMLText)
          Insert HTML string into the current active element (location).
 void insertTextAtCaretPosition(java.lang.String text)
          Insert given text at the current Caret position.
 void pageSetup()
          Page Setup Preview Browser Content command
 void print(int options, java.lang.String header, java.lang.String footer)
          Print with custom header and footer.
 void print(int options, java.lang.String printerName, java.lang.String header, java.lang.String footer)
          Print with custom header and footer to specified printer.
 void redo()
          Redo command
 void saveToPage(java.lang.String strLocalFilePath)
          Saves current loaded HTML document to file.
 void setPrintBackground(boolean onOff)
          Set whether to print background images and colors.
 void setPrintMargins(java.lang.String top, java.lang.String bottom, java.lang.String left, java.lang.String right)
          Sets the print margins.
 void setStatusBar(boolean bEnable)
          Enable or disable the status bar.
 void showFindDialog()
          Find Text command
 void spawnSystemBrowser(java.lang.String url)
          Loads the given URL in the default system browser.
 void undo()
          Undo command
 
Methods inherited from interface com.webrenderer.IBrowserCanvas
addBlockedURL, addBrowserListener, addDOMListener, addJavascriptListener, addKeyListener, addMouseListener, addNetworkListener, addPrintListener, addPromptListener, addWindowListener, allowPopups, autoconfigureProxy, cancelSave, canGoBack, canGoForward, copy, cut, decreaseTextZoom, deleteCookies, destroy, disableCache, disableClipping, disableCookies, disableHTTPSDialog, disableJInternalFrame, disableProxy, enableCache, enableCookies, enableDefaultContextMenu, enableImageLoading, enableJInternalFrame, enableProxy, EventsFireStatus, executeScript, executeScriptWithReturn, getAllowPopups, getBoolPrefProperty, getBrowserType, getCanvas, getCompanyName, getCookie, getCookie, getDefaultContextMenuStatus, getdisableHTTPSDialog, getDocument, getElementAtCaretPosition, getHistory, getHomeDirectory, getHTMLEditingMode, getHTTPSDialog, getIntPrefProperty, getJavascriptEnabled, getPageSize, getPopupParentWindow, getPreferredSize, getPrinterNames, getProductName, getProxyBypasses, getProxyProtocol, getScrollBarInfo, getSelectedText, getStatusBar, getStringPrefProperty, getTitle, getURL, getVersion, getWebRendererVersion, goBack, goForward, grabFocus, highlightSelectedText, httpPOST, httpPOST, httpPOST, increaseTextZoom, isCacheDisabled, isCookiesEnabled, isDisableClipping, isPopup, isProxyEnabled, isScrollBarsVisible, loadHTML, loadHTML, loadHTML, loadURL, loadURL, loadURL, makeImageUrl, openFileWithApp, paste, print, print, printPreview, registerProtocol, reload, removeBlockedURL, removeBrowserListener, removeDOMListener, removeImage, removeJavascriptListener, removeKeyListener, removeMouseListener, removeNetworkListener, removePrintListener, removePromptListener, removeWindowListener, savePageToBitmapImage, saveToBufferedImage, saveToBufferedImage, saveToFile, scrollToX, scrollToY, selectAll, sendKeyPressToElement, setCookie, setCookie, setHomeDirectory, setHTMLEditingMode, setJavascriptEnabled, setPopupParentWindow, setPreferredSize, setPrefProperty, setPrefProperty, setPrefProperty, setPrintPageOrientation, setProxyBypasses, setProxyProtocol, showAboutBox, showScrollBars, stopLoad, useDefaultProfile
 

Method Detail

showFindDialog

public void showFindDialog()
Find Text command


pageSetup

public void pageSetup()
Page Setup Preview Browser Content command


delete

public void delete()
Delete command


undo

public void undo()
Undo command


redo

public void redo()
Redo command


clearSelection

public void clearSelection()
Clear Selection command


saveToPage

public void saveToPage(java.lang.String strLocalFilePath)
Saves current loaded HTML document to file.

Parameters:
strLocalFilePath - Fully qualified path of the filename to save the file.

print

public void print(int options,
                  java.lang.String printerName,
                  java.lang.String header,
                  java.lang.String footer)
Print with custom header and footer to specified printer.

Parameters:
options - The following values allowed for options
  • IBrowserCanvasPRINT_DEFAULT_ACTION Default printing action
  • IBrowserCanvasPRINT_SHOW_DIALOG_BOX Show print dialog box.
  • IBrowserCanvasPRINT_SILENT Don't show print dialog box.
  • IBrowserCanvasPRINT_SILENT_SHOW_HELP Show help.

printerName - One of the printer name strings returned from IBrowserCanvas.getPrinterNames()
header - see below.
footer - The header or footer string can contain the following special characters:
  • "&p" current page number
  • "&P" total number of pages
  • "&u" current url
To track the printing status, use the IBrowserCanvas.addPrintListener(PrintListener) method with a PrintListener.

print

public void print(int options,
                  java.lang.String header,
                  java.lang.String footer)
Print with custom header and footer.

Parameters:
options - The following values allowed for options
header - see below.
footer - The header or footer string can contain the following special characters:
  • "&p" current page number
  • "&P" total number of pages
  • "&u" current url
To track the printing status, use the IBrowserCanvas.addPrintListener method with a PrintListener.

setPrintBackground

public void setPrintBackground(boolean onOff)
Set whether to print background images and colors.

Parameters:
onOff - boolean true enables images/colours.

setPrintMargins

public void setPrintMargins(java.lang.String top,
                            java.lang.String bottom,
                            java.lang.String left,
                            java.lang.String right)
Sets the print margins. Settings are in inches or centimetres, based upon region.

Parameters:
top - value for top margin
bottom - value bottom top
left - value for left margin
right - value for right margin

spawnSystemBrowser

public void spawnSystemBrowser(java.lang.String url)
Loads the given URL in the default system browser.

Parameters:
url - URL to load in System Browser.

setStatusBar

public void setStatusBar(boolean bEnable)
Enable or disable the status bar.

Parameters:
bEnable - State of the status bar (true is enabled).

getIEBrowserHandle

public int getIEBrowserHandle()
Get the IE browser Handle.

Returns:
int The IE browser handle.

insertHTML

public void insertHTML(java.lang.String strHTMLText)
Insert HTML string into the current active element (location).

Specified by:
insertHTML in interface IBrowserCanvas
Parameters:
strHTMLText - String to insert.
See Also:
IBrowserCanvas.setHTMLEditingMode(boolean)

disableSelection

public void disableSelection(boolean bDisable)
Disables selection in the browser.

Parameters:
bDisable -

getElementAtCaretPosition

public IElement getElementAtCaretPosition()
Gets the IElement at the current caret position.

Returns:
IElement Element at the current caret position.

getCaretPosition

public java.awt.Point getCaretPosition()
Returns the co-ordinates of the caret position.

Returns:
Point Caret coordinates.

insertTextAtCaretPosition

public void insertTextAtCaretPosition(java.lang.String text)
Insert given text at the current Caret position. This is for use when IBrowserCanvas.setHTMLEditingMode(boolean) has been enabled.

Parameters:
text - Text to insert.