Class Divider

java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.Divider
All Implemented Interfaces:
Component

public class Divider extends HtmlTag
Visual separator supporting horizontal/vertical orientation and style options.

Rendering derives temporary attributes without changing stored configuration. Horizontal dividers reserve the exact lowercase properties border-top, width, display, line-height, position, text-align, margin and the whole outer class token divider-with-text. With null text, the first four properties are generated and the last three/token suppressed; with any non-null text, including empty text, the reverse applies. Inactive reserved names are suppressed even when caller-configured. Vertical dividers generate only border-left and display; they do not suppress other properties or the outer text token.

Other declarations, case variants and classes remain caller-owned. Cleanup does not repair arbitrary CSS conflicts. Configuration is mutable and must finish before sharing; templates retain this renderer live. Child delegates and request contexts have separate sharing obligations.

  • Method Details

    • horizontal

      public static Divider horizontal()
    • vertical

      public static Divider vertical()
    • thin

      public Divider thin()
    • medium

      public Divider medium()
    • thick

      public Divider thick()
    • solid

      public Divider solid()
    • dashed

      public Divider dashed()
    • dotted

      public Divider dotted()
    • withColor

      public Divider withColor(String color)
    • withText

      public Divider withText(String text)
    • withHeight

      public Divider withHeight(String height)
    • withClass

      public Divider withClass(String className)
      Description copied from class: HtmlTag
      Overrides:
      withClass in class HtmlTag
    • getChildrenStream

      protected Stream<Component> getChildrenStream()
      Description copied from class: HtmlTag
      Returns children to render, in order.

      Extension point: subclasses may override to filter/reorder children.

      Overrides:
      getChildrenStream in class HtmlTag
    • render

      public String render(RenderContext context)
      Description copied from class: HtmlTag
      Renders opening tag, text payload, child output, and closing tag.

      Security contract: slot and plain text are escaped; trusted HTML payload is emitted verbatim.

      Specified by:
      render in interface Component
      Overrides:
      render in class HtmlTag
      Parameters:
      context - context used for slot resolution and render policy
      Returns:
      rendered HTML for this component