Interface FlowLayout

All Superinterfaces:
Layout

public interface FlowLayout
extends Layout
A Flow Layout is similar to having no layout in that child controls are written horizontally across the page and will flow onto a new line when there is insufficient remaining width. Note that the point at which output flows onto the next line is dependent on the browser window width and is therefore sensitive to screen dimensions and window re-sizing by the user.

Compared to no layout, Flow Layout offers the following features:

  • Block controls are positioned in the flow and will not start on a new line
  • Layout properties of vertical alignment and gap between controls can be specified
Many controls (e.g. Titled Panel, Grid, Table) are block controls meaning that the HTML/XHTML generated are block elements and will normally start on a new line in the browser. When placed inside a Flow Layout however, these block controls will be positioned within the normal flow i.e. they will only start on a new line when the browser window is not wide enough to accommodate them.

Further documentation.

Since:
V4.4
See Also:
LayoutControl.getLayout()
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getSpacerSize()
    Horizontal spacing between adjacent controls.
    java.lang.String getVerticalAlignment()
    Vertical alignment for all child content.
    void setSpacerSize​(java.lang.String spacerSize)
    Horizontal spacing between adjacent controls.
    void setVerticalAlignment​(java.lang.String verticalAlignment)
    Sets the Vertical alignment for all child content.
  • Method Details

    • getSpacerSize

      java.lang.String getSpacerSize()
      Horizontal spacing between adjacent controls. See setSpacerSize(String) for details of supported values when setting this property.
      Since:
      V4.4
    • setSpacerSize

      void setSpacerSize​(java.lang.String spacerSize)
      Horizontal spacing between adjacent controls. Any value supported by the CSS font-size property can be used e.g. 30px.
      Since:
      V4.4
    • getVerticalAlignment

      java.lang.String getVerticalAlignment()
      Vertical alignment for all child content. See setVerticalAlignment(String) for details of supported values when setting this property.
      Since:
      V4.4
    • setVerticalAlignment

      void setVerticalAlignment​(java.lang.String verticalAlignment)
      Sets the Vertical alignment for all child content. verticalAlignment must be one of the following:

      Supported values:

      ValueConstant
      CenterControlConstants.VERTICAL_ALIGNMENT_CENTER
      TopControlConstants.VERTICAL_ALIGNMENT_TOP
      BottomControlConstants.VERTICAL_ALIGNMENT_BOTTOM

      Setting a value of null removes any existing value for the property.

      Example:

       controls.PANEL1.layout.setVerticalAlignment(ControlConstants.VERTICAL_ALIGNMENT_TOP);
       
      Since:
      V4.4