Class GridLayout

  • All Implemented Interfaces:
    Serializable, ILayout

    public class GridLayout
    extends 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 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,
                          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

      • onGridCell

        protected void onGridCell​(Component component,
                                  XmlTag xmlTag)
        May be overriden to modify <td> tag
        Parameters:
        component - component
        xmlTag - <td> tag
      • onGridRow

        protected void onGridRow​(XmlTag xmlTag)
        May be overriden to modify <tr> tag
        Parameters:
        xmlTag - <tr> tag
      • renderComponents

        public CharSequence renderComponents​(List<? extends Component> components)
        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