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

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.BoxLayout
All Implemented Interfaces:
Observable
Direct Known Subclasses:
HBoxLayout, VBoxLayout

public abstract class BoxLayout
extends Layout

Base class for box layouts.

Pack config:


Nested Class Summary
static class BoxLayout.BoxLayoutPack
          BoxLayoutPack enumeration.
 
Field Summary
protected  El innerCt
           
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Layout
activeItem, componentStyleName, container, monitorResize, renderHidden, target, targetStyleName
 
Constructor Summary
BoxLayout()
           
 
Method Summary
 BoxLayout.BoxLayoutPack getPack()
          Returns the layouts pack value.
 Padding getPadding()
          Returns the padding.
 int getScrollOffset()
          Returns the scroll offset.
 boolean isAdjustForFlexRemainder()
          Returns true if the remaining space after flex calculation is applied to the last component being flexed.
protected  void onLayout(Container<?> container, El target)
           
 void setAdjustForFlexRemainder(boolean adjustForFlexRemainder)
          Set to true if the remaining space after flex calculation should be applied to the last component being flexed.
 void setPack(BoxLayout.BoxLayoutPack pack)
          Sets how the child items of the container are packed together.
 void setPadding(Padding padding)
          Sets the padding to be applied to all child items managed by this container's layout (defaults to 0).
 void setScrollOffset(int scrollOffset)
          Sets the scroll offset (defaults to 0).
 
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
 

Field Detail

innerCt

protected El innerCt
Constructor Detail

BoxLayout

public BoxLayout()
Method Detail

getPadding

public Padding getPadding()
Returns the padding.

Returns:
the padding

getPack

public BoxLayout.BoxLayoutPack getPack()
Returns the layouts pack value.

Returns:
the pack value

getScrollOffset

public int getScrollOffset()
Returns the scroll offset.

Returns:
the scroll offset

isAdjustForFlexRemainder

public boolean isAdjustForFlexRemainder()
Returns true if the remaining space after flex calculation is applied to the last component being flexed.

Returns:
true if adjusting for flex remainder

setAdjustForFlexRemainder

public void setAdjustForFlexRemainder(boolean adjustForFlexRemainder)
Set to true if the remaining space after flex calculation should be applied to the last component being flexed.

Parameters:
adjustForFlexRemainder - true to add the space

setPack

public void setPack(BoxLayout.BoxLayoutPack pack)
Sets how the child items of the container are packed together.

Parameters:
pack - the pack value

setPadding

public void setPadding(Padding padding)
Sets the padding to be applied to all child items managed by this container's layout (defaults to 0).

Parameters:
padding - the padding

setScrollOffset

public void setScrollOffset(int scrollOffset)
Sets the scroll offset (defaults to 0).

Parameters:
scrollOffset - the scroll offset

onLayout

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