Package com.onec.ui

Record Class ShellConfig

java.lang.Object
java.lang.Record
com.onec.ui.ShellConfig

public record ShellConfig(NavStyle nav, BrandingConfig branding) extends Record
App-shell presentation config: the NavStyle this layout's navigation uses, plus the consumer's BrandingConfig (app name, logo, favicon, brand palette). Since a Layout is now authored per Viewport, the shell carries a single style — author a separate layout to present the nav differently on another device. A null style means "let the renderer pick a sensible default for the viewport". Authored via UiLayoutBuilder.shell().
  • Constructor Details

    • ShellConfig

      public ShellConfig(NavStyle nav, BrandingConfig branding)
      Creates an instance of a ShellConfig record class.
      Parameters:
      nav - the value for the nav record component
      branding - the value for the branding record component
    • ShellConfig

      public ShellConfig(NavStyle nav)
      Back-compat: a shell with just a nav style and default (empty) branding.
  • Method Details

    • defaults

      public static ShellConfig defaults()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • branding

      public BrandingConfig branding()
      Returns the value of the branding record component.
      Returns:
      the value of the branding record component