public class Frame extends Widget implements HasLoadHandlers
Note that if you are using History
, any
browser history items generated by the Frame will interleave with your
application's history.
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Modifier | Constructor and Description |
---|---|
|
Frame()
Creates an empty frame.
|
protected |
Frame(Element element)
This constructor may be used by subclasses to explicitly use an existing
element.
|
|
Frame(String url)
Creates a frame that displays the resource at the specified URL.
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addLoadHandler(LoadHandler handler)
Adds a
LoadEvent load handler which will be called when the frame
loads. |
String |
getUrl()
Gets the URL of the frame's resource.
|
void |
setUrl(SafeUri url)
Sets the URL of the resource to be displayed within the frame.
|
void |
setUrl(String url)
Sets the URL of the resource to be displayed within the frame.
|
static Frame |
wrap(Element element)
Creates a Frame widget that wraps an existing <frame> element.
|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
fireEvent
public Frame()
public Frame(String url)
url
- the URL of the resource to be displayedprotected Frame(Element element)
element
- the element to be usedpublic static Frame wrap(Element element)
RootPanel.detachNow(Widget)
.element
- the element to be wrappedpublic HandlerRegistration addLoadHandler(LoadHandler handler)
LoadEvent
load handler which will be called when the frame
loads.addLoadHandler
in interface HasLoadHandlers
handler
- the load handlerHandlerRegistration
that can be used to remove this handlerpublic String getUrl()
public void setUrl(String url)
url
- the frame's new URLpublic void setUrl(SafeUri url)
url
- the frame's new URLCopyright © 2018. All rights reserved.