net.sf.jacobie.ie
Class IE

java.lang.Object
  |
  +--com.jacob.com.JacobObject
        |
        +--com.jacob.com.Dispatch
              |
              +--net.sf.jacobie.ie.JacobieDispatch
                    |
                    +--net.sf.jacobie.ie.IE

public class IE
extends JacobieDispatch

This is the main class that is called to create a new Internet Explorer instance. See the following InternetExplorer Object on MSDN. http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/objects/internetexplorer.asp

Author:
Nick Neuberger

Field Summary
static java.lang.String COMPONENT_NAME
           
 
Fields inherited from class net.sf.jacobie.ie.JacobieDispatch
componentName, CRLF, READY_STATE_COMPLETE
 
Fields inherited from class com.jacob.com.Dispatch
DISPID_ABOUTBOX, DISPID_AMBIENT_APPEARANCE, DISPID_AMBIENT_AUTOCLIP, DISPID_AMBIENT_BACKCOLOR, DISPID_AMBIENT_CHARSET, DISPID_AMBIENT_CODEPAGE, DISPID_AMBIENT_DISPLAYASDEFAULT, DISPID_AMBIENT_DISPLAYNAME, DISPID_AMBIENT_FONT, DISPID_AMBIENT_FORECOLOR, DISPID_AMBIENT_LOCALEID, DISPID_AMBIENT_MESSAGEREFLECT, DISPID_AMBIENT_PALETTE, DISPID_AMBIENT_SCALEUNITS, DISPID_AMBIENT_SHOWGRABHANDLES, DISPID_AMBIENT_SHOWHATCHING, DISPID_AMBIENT_SUPPORTSMNEMONICS, DISPID_AMBIENT_TEXTALIGN, DISPID_AMBIENT_TRANSFERPRIORITY, DISPID_AMBIENT_UIDEAD, DISPID_AMBIENT_USERMODE, DISPID_APPEARANCE, DISPID_AUTOSIZE, DISPID_BACKCOLOR, DISPID_BACKSTYLE, DISPID_BORDERCOLOR, DISPID_BORDERSTYLE, DISPID_BORDERVISIBLE, DISPID_BORDERWIDTH, DISPID_CAPTION, DISPID_CLICK, DISPID_COLLECT, DISPID_CONSTRUCTOR, DISPID_DBLCLICK, DISPID_DESTRUCTOR, DISPID_DOCLICK, DISPID_DRAWMODE, DISPID_DRAWSTYLE, DISPID_DRAWWIDTH, DISPID_ENABLED, DISPID_ERROREVENT, DISPID_EVALUATE, DISPID_FILLCOLOR, DISPID_FILLSTYLE, DISPID_FONT, DISPID_FORECOLOR, DISPID_HWND, DISPID_KEYDOWN, DISPID_KEYPRESS, DISPID_KEYUP, DISPID_MOUSEDOWN, DISPID_MOUSEICON, DISPID_MOUSEMOVE, DISPID_MOUSEPOINTER, DISPID_MOUSEUP, DISPID_NEWENUM, DISPID_PICTURE, DISPID_PROPERTYPUT, DISPID_READYSTATE, DISPID_READYSTATECHANGE, DISPID_REFRESH, DISPID_TABSTOP, DISPID_TEXT, DISPID_UNKNOWN, DISPID_VALID, DISPID_VALUE, fdexNameCaseSensitive, Get, LOCALE_SYSTEM_DEFAULT, m_pDispatch, Method, Put, PutRef
 
Constructor Summary
IE()
          Normal constructor to create the InetExplorer object.
IE(com.jacob.com.Dispatch aDispatch)
           
 
Method Summary
 boolean getAddressBar()
           
 boolean getBusy()
          Retrieves a boolean value indicating whether the object is engaged in a navigation or downloading operation.
 java.lang.Boolean getBusyAsBoolean()
          Retrieves a boolean value indicating whether the object is engaged in a navigation or downloading operation.
 Document getDocument()
          Gets the main document object from the browser
 java.lang.String getFullName()
          Gets the fully qualified path of the Internet Explorer executable file.
 boolean getFullScreen()
          Gets a Boolean value that indicates whether Internet Explorer is in full-screen or normal window mode.
 IEDialog getIeDialog()
          Allows you to get a dialog popup window (alert from javascript) from IE and click it.
 IEEvents getIeEvents()
           
 long getMaxWaitCount()
          Gets the max wait count.
 java.lang.String getPath()
           
 boolean getVisible()
           
 long getWaitSleepTime()
          Gets the wait sleep time.
 void GoBack()
          Navigates backward one item in the history list.
 void GoForward()
          Navigate the web browser to the next url in the browser history
 void GoHome()
          Navigates to the current home or start page.
 void initialize()
          Initializes any internal variables.
 void Navigate(java.lang.String theURL)
          Navigates IE to the passed in URL.
 void Quit()
          Closes the IE object.
 void Refresh()
          Reloads the file that is currently displayed in the object.
 void reset()
          Reset the internal variable inside the class.
 void resetWaitTimes()
          Resets the default wait times to original values.
 void setAddressBar(boolean lastParam)
           
 void setFullScreen(boolean lastParam)
          Sets a Boolean value that indicates whether Internet Explorer is in full-screen or normal window mode.
 void setIeDialog(IEDialog ieDialog)
           
 void setIeEvents(IEEvents ieEvents)
           
 void setMaxWaitCount(long maxWaitCount)
          Set the max wait count.
 void setVisible(boolean lastParam)
           
 void setWaitSleepTime(long waitSleepTime)
          Sets the wait sleep time.
 IEEvents startupIEEvents()
           
 void Stop()
          Stop the current navigation.
 void waitWhileBusy()
          This will wait the current thread until IE is no longer "busy".
 
Methods inherited from class net.sf.jacobie.ie.JacobieDispatch
getMaxWaitDispatchCount, getReadyState, getWaitDispatchSleepTime, setMaxWaitDispatchCount, setWaitDispatchSleepTime, waitWhileDispatchBusy
 
Methods inherited from class com.jacob.com.Dispatch
call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, callN_CaseSensitive, callN, callN, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSub, callSubN, callSubN, createInstance, finalize, get_CaseSensitive, get, get, getIDOfName, getIDsOfNames, getIDsOfNames, invoke, invoke, invoke, invokeSub, invokeSub, invokeSub, invokeSubv, invokeSubv, invokeSubv, invokev, invokev, invokev, invokev, obj2variant, obj2variant, put_Casesensitive, put, put, putRef, putRef, QueryInterface, release
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_NAME

public static final java.lang.String COMPONENT_NAME
See Also:
Constant Field Values
Constructor Detail

IE

public IE()
Normal constructor to create the InetExplorer object.


IE

public IE(com.jacob.com.Dispatch aDispatch)
Method Detail

initialize

public void initialize()
Initializes any internal variables.


reset

public void reset()
Reset the internal variable inside the class.


resetWaitTimes

public void resetWaitTimes()
Resets the default wait times to original values.

Overrides:
resetWaitTimes in class JacobieDispatch
Returns:

startupIEEvents

public IEEvents startupIEEvents()

setIeEvents

public void setIeEvents(IEEvents ieEvents)

getIeDialog

public IEDialog getIeDialog()
Allows you to get a dialog popup window (alert from javascript) from IE and click it.

Returns:

setIeDialog

public void setIeDialog(IEDialog ieDialog)

getIeEvents

public IEEvents getIeEvents()

getVisible

public boolean getVisible()

setVisible

public void setVisible(boolean lastParam)

getAddressBar

public boolean getAddressBar()

setAddressBar

public void setAddressBar(boolean lastParam)

getFullScreen

public boolean getFullScreen()
Gets a Boolean value that indicates whether Internet Explorer is in full-screen or normal window mode.

Returns:

getFullName

public java.lang.String getFullName()
Gets the fully qualified path of the Internet Explorer executable file.

Returns:

setFullScreen

public void setFullScreen(boolean lastParam)
Sets a Boolean value that indicates whether Internet Explorer is in full-screen or normal window mode.

Returns:

getBusy

public boolean getBusy()
Retrieves a boolean value indicating whether the object is engaged in a navigation or downloading operation.


getBusyAsBoolean

public java.lang.Boolean getBusyAsBoolean()
Retrieves a boolean value indicating whether the object is engaged in a navigation or downloading operation.


Quit

public void Quit()
          throws java.lang.InterruptedException
Closes the IE object.

java.lang.InterruptedException

GoHome

public void GoHome()
Navigates to the current home or start page.


GoBack

public void GoBack()
Navigates backward one item in the history list.


GoForward

public void GoForward()
Navigate the web browser to the next url in the browser history


Stop

public void Stop()
Stop the current navigation.


Refresh

public void Refresh()
Reloads the file that is currently displayed in the object.


Navigate

public void Navigate(java.lang.String theURL)
Navigates IE to the passed in URL.

Parameters:
theURL -

getDocument

public Document getDocument()
Gets the main document object from the browser

Returns:
Returns the Document object.

getPath

public java.lang.String getPath()

waitWhileBusy

public void waitWhileBusy()
                   throws JacobieException
This will wait the current thread until IE is no longer "busy". This should be called after executing any process that could take a while such as: click, navigation, etc.

Throws:
JacobieException

setMaxWaitCount

public void setMaxWaitCount(long maxWaitCount)
Set the max wait count. Set it high if the process is long running process.

Parameters:
maxWaitCount -

getMaxWaitCount

public long getMaxWaitCount()
Gets the max wait count.


setWaitSleepTime

public void setWaitSleepTime(long waitSleepTime)
Sets the wait sleep time. This is the amount of time in milleseconds that the thread will sleep.

Parameters:
waitSleepTime -
See Also:
Thread.sleep

getWaitSleepTime

public long getWaitSleepTime()
Gets the wait sleep time.

Returns:


Copyright © 2004-2005 SourceForge. All Rights Reserved.