Class Details

    • Constructor Detail

      • Details

        public Details()
        Initializes a new Details component.
      • Details

        public Details​(String summary)
        Initializes a new Details using the provided summary.
        Parameters:
        summary - the summary component to set.
        See Also:
        setSummaryText(String)
      • Details

        public Details​(Component summary)
        Initializes a new Details using the provided summary.
        Parameters:
        summary - the summary component to set.
        See Also:
        setSummary(Component)
    • Method Detail

      • setSummary

        public void setSummary​(Component summary)
        Sets the component summary
        Parameters:
        summary - the summary component to set, or null to remove any previously set summary
        See Also:
        getSummary()
      • getSummaryText

        public String getSummaryText()
        Returns:
        summary section content as string (empty string if nothing was set)
      • setContent

        public void setContent​(Component content)
        Sets the component content
        Parameters:
        content - the content of the component to set, or null to remove any previously set content
        See Also:
        getContent()
      • addContent

        public void addContent​(Component... components)
        Adds components to the content section
        Parameters:
        components - the components to add
        See Also:
        getContent()
      • setOpened

        public void setOpened​(boolean opened)

        True if the details are opened and the content is displayed

        Parameters:
        opened - the boolean value to set
      • addThemeVariants

        public void addThemeVariants​(DetailsVariant... variants)
        Adds theme variants to the component.
        Parameters:
        variants - theme variants to add
      • removeThemeVariants

        public void removeThemeVariants​(DetailsVariant... variants)
        Removes theme variants from the component.
        Parameters:
        variants - theme variants to remove