org.eclipse.actf.model.ui.editor.browser
Interface IWebBrowserACTF

All Superinterfaces:
IModelService

public interface IWebBrowserACTF
extends IModelService

Interface to provide access to model of the Web content as Document. This interface extends IModelService to enable to control Web Browser. Users can get this IModelService through IModelServiceHolder that is implemented with IEditorPart.

See Also:
IModelService, IModelServiceHolder

Nested Class Summary
static class IWebBrowserACTF.WebBrowserNavigationEventListnerHolder
          To set IWebBrowserACTFEventListener to override DefaultWebBrowserNavigationEventListener
 
Field Summary
static int READYSTATE_COMPLETE
           
static int READYSTATE_INTERACTIVE
           
static int READYSTATE_LOADED
           
static int READYSTATE_LOADING
           
static int READYSTATE_UNINITIALIZED
           
 
Fields inherited from interface org.eclipse.actf.model.ui.IModelService
ATTR_WINDOWHANDLE, EXTS_HTML, EXTS_ODF, MIMETYPES_HTML, MIMETYPES_ODF
 
Method Summary
 void clearHighlight()
          Clear highlight
 boolean clearInterval(int id)
          Cancels setInterval
 boolean clearTimeout(int id)
          Cancels setTimeout
 int getBrowserAddress()
          Get native pointer of the browser.
 int getFontSize()
          Get font size
 String getLocationName()
          Get current location name
 int getNavigateErrorCode()
          Get navigation error code
 int getReadyState()
          Get ready state of the browser
 IWebBrowserStyleInfo getStyleInfo()
          Get current style information of the browser
 void goBackward()
          Navigate to a backward page
 void goForward()
          Navigate to a forward page
 void highlightElementById(String id)
          Highlight element that has specified ID
 void hightlightElementByAttribute(String name, String value)
          Highlight elements that have specified attribute/value set
 boolean isDisableScriptDebugger()
          Check whether the script debugger is disabled
 boolean isReady()
          Check whether the browser is ready
 boolean isUrlExists()
          Check whether the navigated URL exists
 void navigate(String url)
          Navigate to URL
 void navigateRefresh()
          Refresh
 void navigateStop()
          Stop navigation
 void setDisableScriptDebugger(boolean bDisable)
          Disable script debugger
 void setFocusAddressText(boolean selectAll)
          Focus address text area
 void setFontSize(int fontSize)
          Set font size
 int setInterval(String script, int interval)
          Evaluates a script each time a specified interval (msec) has elapsed.
 int setTimeout(String script, int interval)
          Evaluates a script after a specified interval (msec) has elapsed.
 void setWebBrowserSilent(boolean bSilent)
          Set silent property
 void showAddressText(boolean flag)
          Show/hide address text area
 
Methods inherited from interface org.eclipse.actf.model.ui.IModelService
getAllImagePosition, getAttribute, getCurrentMIMEType, getDocument, getID, getLiveDocument, getModelServiceHolder, getScrollManager, getSupportExtensions, getSupportMIMETypes, getTargetComposite, getTitle, getURL, jumpToNode, open, open, saveDocumentAsHTMLFile, saveOriginalDocument
 

Field Detail

READYSTATE_UNINITIALIZED

static final int READYSTATE_UNINITIALIZED
See Also:
Constant Field Values

READYSTATE_LOADING

static final int READYSTATE_LOADING
See Also:
Constant Field Values

READYSTATE_LOADED

static final int READYSTATE_LOADED
See Also:
Constant Field Values

READYSTATE_INTERACTIVE

static final int READYSTATE_INTERACTIVE
See Also:
Constant Field Values

READYSTATE_COMPLETE

static final int READYSTATE_COMPLETE
See Also:
Constant Field Values
Method Detail

setFocusAddressText

void setFocusAddressText(boolean selectAll)
Focus address text area

Parameters:
selectAll - if true, select all text in the address text area

showAddressText

void showAddressText(boolean flag)
Show/hide address text area

Parameters:
flag - true to show address text area

navigate

void navigate(String url)
Navigate to URL

Parameters:
url - target URL

goBackward

void goBackward()
Navigate to a backward page


goForward

void goForward()
Navigate to a forward page


navigateStop

void navigateStop()
Stop navigation


navigateRefresh

void navigateRefresh()
Refresh


getReadyState

int getReadyState()
Get ready state of the browser

Returns:
ready state

isReady

boolean isReady()
Check whether the browser is ready

Returns:
whether the browser is ready

getLocationName

String getLocationName()
Get current location name

Returns:
location name

isUrlExists

boolean isUrlExists()
Check whether the navigated URL exists

Returns:
whether the navigated URL exists

getNavigateErrorCode

int getNavigateErrorCode()
Get navigation error code

Returns:
error code

setWebBrowserSilent

void setWebBrowserSilent(boolean bSilent)
Set silent property

Parameters:
bSilent - silent property

setDisableScriptDebugger

void setDisableScriptDebugger(boolean bDisable)
Disable script debugger

Parameters:
bDisable - true to disable script debugger

isDisableScriptDebugger

boolean isDisableScriptDebugger()
Check whether the script debugger is disabled

Returns:
whether the script debugger is disabled

highlightElementById

void highlightElementById(String id)
Highlight element that has specified ID

Parameters:
id - target ID

hightlightElementByAttribute

void hightlightElementByAttribute(String name,
                                  String value)
Highlight elements that have specified attribute/value set

Parameters:
name - target attribute name
value - target attribute value

clearHighlight

void clearHighlight()
Clear highlight


setFontSize

void setFontSize(int fontSize)
Set font size

Parameters:
fontSize - font size

getFontSize

int getFontSize()
Get font size

Returns:
font size

getStyleInfo

IWebBrowserStyleInfo getStyleInfo()
Get current style information of the browser

Returns:
current style information
See Also:
IWebBrowserStyleInfo

getBrowserAddress

int getBrowserAddress()
Get native pointer of the browser.

Returns:
pointer

setTimeout

int setTimeout(String script,
               int interval)
Evaluates a script after a specified interval (msec) has elapsed.

Parameters:
script - target script
interval - interval (msec)
Returns:
id of this timer

clearTimeout

boolean clearTimeout(int id)
Cancels setTimeout

Parameters:
id - id of target timer
Returns:
true if succeeded

setInterval

int setInterval(String script,
                int interval)
Evaluates a script each time a specified interval (msec) has elapsed.

Parameters:
script - target script
interval - interval (msec)
Returns:
id of this timer

clearInterval

boolean clearInterval(int id)
Cancels setInterval

Parameters:
id - id of target timer
Returns:
true if succeeded