Class Rowlayout

All Implemented Interfaces:
Serializable, Cloneable, Component, Scope, ComponentCtrl

public class Rowlayout extends XulElement
Divide the parent container into a row of equal-width columns separated by spacings. Stacking multiple rowlayout components with the same configuration creates a grid inside the parent container.
Since:
8.0.0
Author:
Neil
See Also:
  • Field Details

    • DEFAULT_NUM_COLUMNS

      public static int DEFAULT_NUM_COLUMNS
    • DEFAULT_SPACING

      public static String DEFAULT_SPACING
  • Constructor Details

    • Rowlayout

      public Rowlayout()
  • Method Details

    • getNcols

      public int getNcols()
      Number of columns to divide the row into

      Default: 12

      Returns:
      int
    • setNcols

      public void setNcols(int ncols)
    • getSpacing

      public String getSpacing()
      Spacing between columns should be given as a ratio to the column width. e.g. "1/3", "33.3%", or "0.3333"

      Default: 20.0/60.0 = 0.3333...

      Returns:
      String
    • setSpacing

      public void setSpacing(String value)
    • setWidth

      public void setWidth(String width)
      Description copied from class: HtmlBasedComponent
      Sets the width. If null, the best fit is used.
      Overrides:
      setWidth in class HtmlBasedComponent
      See Also:
    • setHflex

      public void setHflex(String hflex)
      Description copied from class: HtmlBasedComponent
      Sets horizontal flex hint of this component.

      Number flex indicates how this component's container distributes remaining empty space among its children horizontally. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.

      Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.

      Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.

      Overrides:
      setHflex in class HtmlBasedComponent
      Parameters:
      hflex - horizontal flex hint of this component.
      See Also:
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws IOException
      Description copied from class: HtmlBasedComponent
      Renders the content of this component, excluding the enclosing tags and children.

      See also ZK Client-side Reference: Property Rendering

      Overrides:
      renderProperties in class XulElement
      Throws:
      IOException
    • beforeChildAdded

      public void beforeChildAdded(Component child, Component refChild)
      Description copied from class: AbstractComponent
      Default: does nothing.
      Specified by:
      beforeChildAdded in interface ComponentCtrl
      Overrides:
      beforeChildAdded in class AbstractComponent
      Parameters:
      child - the child to be added (never null).
      refChild - another child component that the new child will be inserted before it. If null, the new child will be the last child.
      See Also: