Class Container

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

public class Container extends HtmlTag
Width-constrained content container.

Mutable and not thread-safe. Use within a single request/render lifecycle. For reuse, stop mutating shared instances and render stable structures with per-request context data.

  • Constructor Details

    • Container

      public Container()
      Creates a fixed-width container with class container.
  • Method Details

    • create

      public static Container create()
      Creates a fixed-width container.
      Returns:
      new container
    • fluid

      public static Container fluid()
      Creates a fluid container.
      Returns:
      new fluid container
    • withSize

      public Container withSize(Container.ContainerSize size)
      Replaces class attribute with container <sizeClass>.
      Parameters:
      size - container size enum
      Returns:
      this container
    • withId

      public Container withId(String id)
      Sets id attribute.
      Overrides:
      withId in class HtmlTag
      Parameters:
      id - element id
      Returns:
      this container
    • withClass

      public Container withClass(String className)
      Replaces class attribute with container <className>.
      Overrides:
      withClass in class HtmlTag
      Parameters:
      className - additional classes
      Returns:
      this container
    • withChild

      public Container withChild(Component component)
      Appends a child component.
      Overrides:
      withChild in class HtmlTag
      Parameters:
      component - child component
      Returns:
      this container