org.wicketstuff.minis.apanel
Class GridLayout

java.lang.Object
  extended by org.wicketstuff.minis.apanel.GridLayout
All Implemented Interfaces:
java.io.Serializable, ILayout

public class GridLayout
extends java.lang.Object
implements ILayout

GridLayout puts markup of components in <table><table/> according to GridLayoutConstraints. Component without a constraint will be added to the first empty cell. If there is no empty cells for the component WicketRuntimeException will be thrown.

See Also:
Serialized Form

Constructor Summary
GridLayout(int width, int height)
          Constructor.
GridLayout(int width, int height, java.util.List<IComponentRenderer<?>> renderers)
          Constructor.
 
Method Summary
protected  void onGridCell(org.apache.wicket.Component component, org.apache.wicket.markup.parser.XmlTag xmlTag)
          May be overriden to modify <td> tag
protected  void onGridRow(org.apache.wicket.markup.parser.XmlTag xmlTag)
          May be overriden to modify <tr> tag
 java.lang.CharSequence renderComponents(java.util.List<? extends org.apache.wicket.Component> components)
          Creates wicket markup for components, adding markup specific for this layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridLayout

public GridLayout(int width,
                  int height)
Constructor.

Parameters:
width - width of grid
height - height of grid

GridLayout

public GridLayout(int width,
                  int height,
                  java.util.List<IComponentRenderer<?>> renderers)
Constructor.

Parameters:
width - width of grid
height - height of grid
renderers - list of renderers to customize component rendering in this layout
Method Detail

renderComponents

public java.lang.CharSequence renderComponents(java.util.List<? extends org.apache.wicket.Component> components)
Description copied from interface: ILayout
Creates wicket markup for components, adding markup specific for this layout.

Specified by:
renderComponents in interface ILayout
Parameters:
components - components to render
Returns:
wicket markup

onGridRow

protected void onGridRow(org.apache.wicket.markup.parser.XmlTag xmlTag)
May be overriden to modify <tr> tag

Parameters:
xmlTag - <tr> tag

onGridCell

protected void onGridCell(org.apache.wicket.Component component,
                          org.apache.wicket.markup.parser.XmlTag xmlTag)
May be overriden to modify <td> tag

Parameters:
component - component
xmlTag - <td> tag


Copyright © 2010. All Rights Reserved.