|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.mcp.MCP
public class MCP
The main class for the Mozilla Control Program. Please see the package description for an overview.
Constructor Summary | |
---|---|
MCP()
Creates a new instance of MCP |
Method Summary | |
---|---|
void |
addAjaxListener(AjaxListener listener)
Add the argument AjaxListener to this MCP
instance. |
void |
addKeyListener(java.awt.event.KeyListener listener)
Add the argument KeyListener to the
Canvas for this MCP instance. |
void |
addMouseListener(java.awt.event.MouseListener listener)
Add the argument MouseListener to the
Canvas for this MCP instance. |
void |
blockingClickElement(java.lang.String idOrName)
Find the DOM element within the current page matching the argument id using findElement(java.lang.String) . |
void |
blockingLoad(java.lang.String url)
Load the url, blocking until the load has completed. |
void |
clickElement(java.lang.String id)
Find the DOM element within the current page matching the argument id using findElement(java.lang.String) . |
void |
deleteBrowserControl()
Make invisible, and delete the BrowserControl
instance for this MCP instance. |
org.w3c.dom.Element |
findElement(java.lang.String id)
Return the DOM Element with the given id or name. |
boolean |
findInPage(java.lang.String toFind)
Return true if and only if the argument
toFind occurs within the current page. |
BrowserControl |
getBrowserControl()
Return the Webclient BrowserControl instance used
by this MCP instance. |
java.awt.Frame |
getRealizedVisibleBrowserWindow()
Return the realized and visible java.awt.Frame
containing the actual browser window. |
void |
removeAjaxListener(AjaxListener listener)
Remove the argument AjaxListener to this MCP
instance. |
void |
removeKeyListener(java.awt.event.KeyListener listener)
Remove the argument KeyListener from the
Canvas for this MCP instance. |
void |
removeMouseListener(java.awt.event.MouseListener listener)
Remove the argument MouseListener from the
Canvas for this MCP instance. |
void |
setAppData(java.lang.String absolutePathToNativeBrowserBinDir)
|
void |
setBounds(int x,
int y,
int width,
int height)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MCP()
Method Detail |
---|
public void setAppData(java.lang.String absolutePathToNativeBrowserBinDir) throws java.io.FileNotFoundException, java.lang.ClassNotFoundException
java.io.FileNotFoundException
java.lang.ClassNotFoundException
public void setBounds(int x, int y, int width, int height)
public void addAjaxListener(AjaxListener listener)
Add the argument AjaxListener
to this MCP
instance.
public void removeAjaxListener(AjaxListener listener)
Remove the argument AjaxListener
to this MCP
instance.
public void addMouseListener(java.awt.event.MouseListener listener)
Add the argument MouseListener
to the
Canvas
for this MCP instance.
public void removeMouseListener(java.awt.event.MouseListener listener)
Remove the argument MouseListener
from the
Canvas
for this MCP instance.
public void addKeyListener(java.awt.event.KeyListener listener)
Add the argument KeyListener
to the
Canvas
for this MCP instance.
public void removeKeyListener(java.awt.event.KeyListener listener)
Remove the argument KeyListener
from the
Canvas
for this MCP instance.
public BrowserControl getBrowserControl()
Return the Webclient BrowserControl
instance used
by this MCP
instance. This is useful for operations
that require more complex browser control than that offered by
MCP
.
public java.awt.Frame getRealizedVisibleBrowserWindow()
Return the realized and visible java.awt.Frame
containing the actual browser window. There is no need to put
this Frame inside of any surrounding Swing or AWT windows. It is
sufficient to stand alone.
public void deleteBrowserControl()
Make invisible, and delete the BrowserControl
instance for this MCP instance. Reset internal state of the
instance so that a subsequent call to getRealizedVisibleBrowserWindow()
will create a new
Frame
.
public org.w3c.dom.Element findElement(java.lang.String id)
Return the DOM Element
with the given id or name.
First, Document.getElementById()
is called, passing
the argument id
. If an element is found, it is
returned. Otherwise, the document is traversed and the first
element encountered with a name
equal to the argument
id
is returned. If no such element exists,
null
is returned.
public boolean findInPage(java.lang.String toFind)
Return true
if and only if the argument
toFind
occurs within the current page. Case is not
significant. Users desiring more detailed find behavior should
use getBrowserControl()
to obtain a reference to the
CurrentPage
interface, which has more advanced
methods pertaining to the current page.
public void clickElement(java.lang.String id)
Find the DOM element within the current page matching the
argument id
using findElement(java.lang.String)
. Use
java.awt.Robot
to click the element. Return
immediately after clicking the element.
public void blockingClickElement(java.lang.String idOrName)
Find the DOM element within the current page matching the
argument id
using findElement(java.lang.String)
. Use
java.awt.Robot
to click the element. Block until the
document load triggered by the click has completed.
public void blockingLoad(java.lang.String url)
Load the url, blocking until the load has completed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |