chrriis.dj.nativeswing.swtimpl.components
Class WebBrowserWindowWillOpenEvent
java.lang.Object
java.util.EventObject
chrriis.dj.nativeswing.swtimpl.components.WebBrowserEvent
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
WebBrowserWindowWillOpenEvent
public WebBrowserWindowWillOpenEvent(JWebBrowser webBrowser,
JWebBrowser newWebBrowser)
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()