public class

Frame

extends Widget
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Frame
Known Direct Subclasses

Class Overview

A widget that wraps an IFRAME element, which can contain an arbitrary web site.

Note that if you are using History, any browser history items generated by the Frame will interleave with your application's history.

CSS Style Rules

  • .gwt-Frame { }

Example

{@example com.google.gwt.examples.FrameExample}

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
Frame()
Creates an empty frame.
Frame(String url)
Creates a frame that displays the resource at the specified URL.
Protected Constructors
Frame(Element element)
This constructor may be used by subclasses to explicitly use an existing element.
Public Methods
String getUrl()
Gets the URL of the frame's resource.
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.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.ui.IsWidget

Public Constructors

public Frame ()

Creates an empty frame.

public Frame (String url)

Creates a frame that displays the resource at the specified URL.

Parameters
url the URL of the resource to be displayed

Protected Constructors

protected Frame (Element element)

This constructor may be used by subclasses to explicitly use an existing element. This element must be an <iframe> element.

Parameters
element the element to be used

Public Methods

public String getUrl ()

Gets the URL of the frame's resource.

Returns
  • the frame's URL

public void setUrl (String url)

Sets the URL of the resource to be displayed within the frame.

Parameters
url the frame's new URL

public static Frame wrap (Element element)

Creates a Frame widget that wraps an existing <frame> element. This element must already be attached to the document. If the element is removed from the document, you must call detachNow(Widget).

Parameters
element the element to be wrapped