net.sf.jameleon.plugin.jiffie.util
Class JiffieEventHandler

java.lang.Object
  extended by net.sf.jiffie.AbstractEventHandler
      extended by net.sf.jiffie.NewWindowEventHandler
          extended by net.sf.jameleon.plugin.jiffie.util.JiffieEventHandler
All Implemented Interfaces:
EventHandler

public class JiffieEventHandler
extends NewWindowEventHandler

This class implements an event handler which receives only the events the jiffie plug-in cares about. This class extends the new window event handler, which only recieves new window events and makes all other methods thread-safe. Note that the non-standard capitalisation of the method names is necessary to ensure that they match exactly the names used by Internet Explorer. Detailed documentation on these events can be found at: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reflist_vb.asp


Field Summary
protected  boolean available
           
 
Fields inherited from class net.sf.jiffie.AbstractEventHandler
m_navigationListeners, m_parentBrowser, m_windowListeners
 
Constructor Summary
JiffieEventHandler(InternetExplorer parentBrowser)
          Constructor.
 
Method Summary
 boolean addNavigationListener(NavigationListener listener)
          Adds a new navigation listener.
 boolean addWindowListener(WindowListener listener)
          Adds a new window listener.
 void NewWindow2(com.jacob.com.Variant[] args)
          NewWindow2 event handler.
 void OnQuit(com.jacob.com.Variant[] args)
          OnQuit event handler.
 void ProgressChange(com.jacob.com.Variant[] args)
          ProgressChange event handler.
 boolean removeNavigationListener(NavigationListener listener)
          Removes a navigation listener from the set of listeners.
 boolean removeWindowListener(WindowListener listener)
          Removes a window listener from the set of listeners.
 
Methods inherited from class net.sf.jiffie.NewWindowEventHandler
NewWindow3
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

available

protected boolean available
Constructor Detail

JiffieEventHandler

public JiffieEventHandler(InternetExplorer parentBrowser)
Constructor.

Parameters:
parentBrowser - parent browser
Method Detail

NewWindow2

public void NewWindow2(com.jacob.com.Variant[] args)
NewWindow2 event handler. args[0] Object expression that, optionally, receives a new, hidden InternetExplorer object with no URL loaded. args[1] Boolean value to determine whether the current navigation should be canceled.

Overrides:
NewWindow2 in class NewWindowEventHandler
Parameters:
args - event arguments

ProgressChange

public void ProgressChange(com.jacob.com.Variant[] args)
ProgressChange event handler. args[0] Long that specifies the amount of total progress to show, or -1 when progress is complete. args[1] Long that specifies the maximum progress value.

Parameters:
args - event arguments

OnQuit

public void OnQuit(com.jacob.com.Variant[] args)
OnQuit event handler.

Parameters:
args - event arguments

addNavigationListener

public boolean addNavigationListener(NavigationListener listener)
Adds a new navigation listener.

Specified by:
addNavigationListener in interface EventHandler
Overrides:
addNavigationListener in class AbstractEventHandler
Parameters:
listener - the new listener to add
Returns:
true if the listener was not already in the set of listeners

removeNavigationListener

public boolean removeNavigationListener(NavigationListener listener)
Removes a navigation listener from the set of listeners.

Specified by:
removeNavigationListener in interface EventHandler
Overrides:
removeNavigationListener in class AbstractEventHandler
Parameters:
listener - the listener to remove
Returns:
true if the listener was present in the set of listeners

addWindowListener

public boolean addWindowListener(WindowListener listener)
Adds a new window listener.

Specified by:
addWindowListener in interface EventHandler
Overrides:
addWindowListener in class AbstractEventHandler
Parameters:
listener - the new listener to add
Returns:
true if the listener was not already in the set of listeners

removeWindowListener

public boolean removeWindowListener(WindowListener listener)
Removes a window listener from the set of listeners.

Specified by:
removeWindowListener in interface EventHandler
Overrides:
removeWindowListener in class AbstractEventHandler
Parameters:
listener - the listener to remove
Returns:
true if the listener was removed from the collection or false if the listener was not in the collection.


Copyright © 2004-2008 Christian Hargraves. All Rights Reserved.