Class TokenRow


public class TokenRow extends Row
A Row whose gap follows the resolved ControlSize step.

The gap is pushed from onMeasure, so it tracks a step change with no app code and with no extra layout pass: the push uses Flex's silent form, which assigns without requesting a pass, because the caller is already inside the pass that consumes it.

  • Constructor Details

    • TokenRow

      public TokenRow()
      A row gutter at spacingMedium, the default between controls.
    • TokenRow

      public TokenRow(Tokens.Role role)
      A row whose gap follows role at the resolved size step.
  • Method Details

    • onMeasure

      protected Size onMeasure(Constraints constraints)
      Description copied from class: Widget
      Reports the size this widget wants within constraints. Called once per layout pass, and the result is cached against the constraints and the resolved axes (size step, layout direction, locale), so it must be a pure function of them and of this widget's own state.

      Resolve the ControlSize and the LayoutDirection once each here and thread them down; never read either in a constructor. The locale needs no threading: it is in scope, and I18n.locale() answers it wherever text is resolved.

      Overrides:
      onMeasure in class Flex