Class Code

All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasComponents, HasElement, HasEnabled, HasSize, HasStyle, HasText, Serializable

@Tag("code") public class Code extends HtmlContainer
Component representing a <code> element.
Since:
25.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • Code

      public Code()
      Creates a new empty code component.
    • Code

      public Code(Component... components)
      Creates a new code component with the given child components.
      Parameters:
      components - the child components
    • Code

      public Code(String text)
      Creates a new code component with the given text.
      Parameters:
      text - the text
    • Code

      public Code(Signal<String> textSignal)
      Creates a new code component with its text content bound to the given signal.
      Parameters:
      textSignal - the signal to bind, not null
      See Also: