Class Row

java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.layout.Row
All Implemented Interfaces:
Component

public class Row extends HtmlTag
Horizontal layout container for the framework row/column grid.

This type is mutable and not thread-safe. Configure and render within a single request (or other confined lifecycle) and do not share one instance across concurrent threads.

Non-Column children passed to withChild(Component) are wrapped in a default div.col to preserve row semantics.

  • Constructor Details

    • Row

      public Row()
      Creates an empty row with base class row.
  • Method Details

    • withComponents

      public Row withComponents(Component... components)
      Appends all components to this row in argument order.
      Parameters:
      components - components to append
      Returns:
      this row
    • withId

      public Row withId(String id)
      Sets the id attribute.
      Overrides:
      withId in class HtmlTag
      Parameters:
      id - element id
      Returns:
      this row
    • withChild

      public Row withChild(Component component)
      Appends a child component.

      If component is a Column, it is appended directly; otherwise it is wrapped in div.col before append.

      Overrides:
      withChild in class HtmlTag
      Parameters:
      component - component to append
      Returns:
      this row
    • addColumn

      public Row addColumn(Column column)
      Appends a preconfigured Column without additional wrapping.
      Parameters:
      column - column to append
      Returns:
      this row
    • copy

      public Row copy()
      Creates a shallow copy of this row's current attributes, text payload, and children.

      Child components are reused, not cloned. This is intended for wrappers that need to preserve a configured row while adding request-local structure during render.

      Returns:
      copied row
    • withGap

      public Row withGap(String gap)
      Replaces class attribute with row gap-<gap>.
      Parameters:
      gap - gap token used by CSS
      Returns:
      this row
    • withAlign

      public Row withAlign(String alignment)
      Replaces class attribute with row align-<alignment>.
      Parameters:
      alignment - alignment token used by CSS
      Returns:
      this row
    • withJustify

      public Row withJustify(String justify)
      Replaces class attribute with row justify-<justify>.
      Parameters:
      justify - justify token used by CSS
      Returns:
      this row
    • withClass

      public Row withClass(String className)
      Description copied from class: HtmlTag
      Overrides:
      withClass in class HtmlTag