chrriis.dj.nativeswing.swtimpl.components
Class WebBrowserWindowWillOpenEvent

java.lang.Object
  extended by java.util.EventObject
      extended by chrriis.dj.nativeswing.swtimpl.components.WebBrowserEvent
          extended by chrriis.dj.nativeswing.swtimpl.components.WebBrowserWindowWillOpenEvent
All Implemented Interfaces:
Serializable

public class WebBrowserWindowWillOpenEvent
extends WebBrowserEvent

This event is sent when a new window needs to be created. It allows to consume the event to prevent the opening, or to give a different web browser object to open the content elsewhere (for example in a tab). If this event is not consumed, then it will be followed by a window opening event, where the appearance will be defined. Note that navigation events can happen after this event, but may be before or after the opening event.

Author:
Christopher Deckers
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WebBrowserWindowWillOpenEvent(JWebBrowser webBrowser, JWebBrowser newWebBrowser)
           
 
Method Summary
 void consume()
           
 JWebBrowser getNewWebBrowser()
           
 boolean isConsumed()
           
 boolean isDialogWindow()
          Indicate whether the new window should be opened as a dialog (instead of a frame).
 void setDialogWindow(boolean isDialogWindow)
          Set whether the new window should be opened as a dialog (instead of a frame).
 void setNewWebBrowser(JWebBrowser newWebBrowser)
          Set a different web browser.
 
Methods inherited from class chrriis.dj.nativeswing.swtimpl.components.WebBrowserEvent
getWebBrowser
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebBrowserWindowWillOpenEvent

public WebBrowserWindowWillOpenEvent(JWebBrowser webBrowser,
                                     JWebBrowser newWebBrowser)
Method Detail

getNewWebBrowser

public JWebBrowser getNewWebBrowser()

setNewWebBrowser

public void setNewWebBrowser(JWebBrowser newWebBrowser)
Set a different web browser. Note that null is not allowed: to prevent the window from opening, use the consume() method.


setDialogWindow

public void setDialogWindow(boolean isDialogWindow)
Set whether the new window should be opened as a dialog (instead of a frame).

Parameters:
isDialogWindow - true if the window is to be opened as a dialog, false otherwise.

isDialogWindow

public boolean isDialogWindow()
Indicate whether the new window should be opened as a dialog (instead of a frame).

Returns:
true if the window is to be opened as a dialog, false otherwise.

consume

public void consume()

isConsumed

public boolean isConsumed()