com.gwtext.client.widgets
Class Viewport

java.lang.Object
  extended by com.gwtext.client.widgets.Viewport

public class Viewport
extends java.lang.Object

A specialized container representing the viewable application area (the browser viewport).
The Viewport renders itself to the document body, and automatically sizes itself to the size of the browser viewport and manages window resizing. There may only be one Viewport created in a page.

This class takes the "main" / top level panel passed in its constructor and "expands" it to fit the browsers viewable area. You must not add the "main" panel to GWT's RootPanel via RootPanel.get().add(..) when using the ViewPort class - this is done automatically for you.


Constructor Summary
Viewport()
           
Viewport(Panel mainPanel)
          Create a Viewport class.
 
Method Summary
protected  com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
           
 void doLayout()
          Force this container's layout to be recalculated.
protected  java.lang.String getId(com.google.gwt.core.client.JavaScriptObject viewport)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Viewport

public Viewport()

Viewport

public Viewport(Panel mainPanel)
Create a Viewport class.

Parameters:
mainPanel - the application's "main" / top level panel which can contain child panels and components.
Method Detail

doLayout

public void doLayout()
Force this container's layout to be recalculated. A call to this function is required after adding a new component to an already rendered container. If you are not dynamically adding and removing components after render, this function will generally not need to be called.


getId

protected java.lang.String getId(com.google.gwt.core.client.JavaScriptObject viewport)

create

protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)