com.extjs.gxt.ui.client.widget.layout
Class FitLayout

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.widget.Layout
          extended by com.extjs.gxt.ui.client.widget.layout.FitLayout
All Implemented Interfaces:
Observable
Direct Known Subclasses:
AccordionLayout, CardLayout

public class FitLayout
extends Layout

This is a base class for layouts that contain a single item that automatically expands to fill the layout's container.

Child Widgets are:

In the following code, the child panel will be sized to 400 by 400 when the parent container is sized:

   LayoutContainer container = new LayoutContainer();
   container.setLayout(new FitLayout());

   ContentPanel panel = new ContentPanel();
   container.add(panel);

   container.setSize(400, 400);
 

See Also:
FitData

Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Layout
activeItem, componentStyleName, container, monitorResize, renderHidden, target, targetStyleName
 
Constructor Summary
FitLayout()
          Creates a new fit layout instance.
 
Method Summary
protected  void onLayout(Container<?> container, El target)
           
protected  void setItemSize(Component item, Size size)
           
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Layout
applyMargins, applyPadding, callLayout, fly, fly, getExtraStyle, getLayoutData, getResizeDelay, getSideMargins, initTarget, isLayoutExecuted, isLayoutNeeded, isRenderHidden, isRunning, isValidParent, layout, layoutContainer, onAdd, onComponentHide, onComponentShow, onRemove, onResize, renderAll, renderComponent, setBounds, setContainer, setExtraStyle, setLayoutData, setLayoutNeeded, setLayoutOnChange, setPosition, setRenderHidden, setResizeDelay, setSize
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitLayout

public FitLayout()
Creates a new fit layout instance.

Method Detail

onLayout

protected void onLayout(Container<?> container,
                        El target)
Overrides:
onLayout in class Layout

setItemSize

protected void setItemSize(Component item,
                           Size size)