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

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.FlowLayout
All Implemented Interfaces:
Observable

public class FlowLayout
extends Layout

Layout that simply renders each child component into its container. The size and position of children are not altered by this layout.

Margins can be applied directly to child components to control the spacing between components.


Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Layout
activeItem, componentStyleName, container, monitorResize, renderHidden, target, targetStyleName
 
Constructor Summary
FlowLayout()
          Creates a new layout instance.
FlowLayout(boolean removePostioning)
          Creates a new flow layout.
FlowLayout(int margin)
          Creates a new layout instance with the given margin.
 
Method Summary
 Margins getMargins()
          Returns the margins of the layout.
 boolean getRemovePositioning()
          Returns true if positioning is being removed.
protected  void onLayout(Container<?> container, El target)
           
protected  void renderComponent(Component c, int index, El target)
           
 void setMargin(int margin)
          Sets the margins using the give margin.
 void setMargins(Margins margins)
          Sets the margins of the layout to be applied to the container.
 void setRemovePositioning(boolean removePositioning)
          True to remove positioning from the container's children (defaults to false).
 
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, 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

FlowLayout

public FlowLayout()
Creates a new layout instance.


FlowLayout

public FlowLayout(boolean removePostioning)
Creates a new flow layout.

Parameters:
removePostioning - true to remove positioning on child components

FlowLayout

public FlowLayout(int margin)
Creates a new layout instance with the given margin.

Parameters:
margin - the margin
Method Detail

getMargins

public Margins getMargins()
Returns the margins of the layout.

Returns:
the margins

getRemovePositioning

public boolean getRemovePositioning()
Returns true if positioning is being removed.

Returns:
the remove positioning state

setMargin

public void setMargin(int margin)
Sets the margins using the give margin.

Parameters:
margin - the margin

setMargins

public void setMargins(Margins margins)
Sets the margins of the layout to be applied to the container.

Parameters:
margins - the margins in pixels

setRemovePositioning

public void setRemovePositioning(boolean removePositioning)
True to remove positioning from the container's children (defaults to false).

Parameters:
removePositioning - true to remove positioning

onLayout

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

renderComponent

protected void renderComponent(Component c,
                               int index,
                               El target)
Overrides:
renderComponent in class Layout