Class DashboardSection

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.dashboard.DashboardSection
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, HasWidgets, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable

@Tag("vaadin-dashboard-section") @JsModule("@vaadin/dashboard/src/vaadin-dashboard-section.js") @NpmPackage(value="@vaadin/dashboard", version="25.0.0-alpha20") public class DashboardSection extends com.vaadin.flow.component.Component implements HasWidgets
DashboardSection is a container for organizing multiple DashboardWidget instances within a Dashboard.
Author:
Vaadin Ltd
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty section.
    Creates an empty section with title.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the given widgets to this component.
    void
    addWidgetAtIndex(int index, DashboardWidget widget)
    Adds the given widget as child of this component at the specific index.
    Stream<com.vaadin.flow.component.Component>
     
    Returns the title of the section.
    Returns the widgets in this component.
    boolean
     
    void
    Removes the given widgets from this component.
    void
    Removes all widgets from this component.
    void
     
    void
    Sets the title of the section.
    void
    setVisible(boolean visible)
     

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, scrollIntoView, set, setElement, setId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.dashboard.HasWidgets

    add, remove
  • Constructor Details

    • DashboardSection

      public DashboardSection()
      Creates an empty section.
    • DashboardSection

      public DashboardSection(String title)
      Creates an empty section with title.
      Parameters:
      title - the title to set
  • Method Details

    • getTitle

      public String getTitle()
      Returns the title of the section.
      Returns:
      the sectionTitle property from the web component
    • setTitle

      public void setTitle(String title)
      Sets the title of the section.
      Parameters:
      title - the title to set
    • getWidgets

      public List<DashboardWidget> getWidgets()
      Description copied from interface: HasWidgets
      Returns the widgets in this component.
      Specified by:
      getWidgets in interface HasWidgets
      Returns:
      The widgets in this component
    • getChildren

      public Stream<com.vaadin.flow.component.Component> getChildren()
      Overrides:
      getChildren in class com.vaadin.flow.component.Component
    • add

      public void add(Collection<DashboardWidget> widgets)
      Description copied from interface: HasWidgets
      Adds the given widgets to this component.
      Specified by:
      add in interface HasWidgets
      Parameters:
      widgets - the widgets to add, not null
    • addWidgetAtIndex

      public void addWidgetAtIndex(int index, DashboardWidget widget)
      Description copied from interface: HasWidgets
      Adds the given widget as child of this component at the specific index.

      In case the specified widget has already been added to another parent, it will be removed from there and added to this one.

      Specified by:
      addWidgetAtIndex in interface HasWidgets
      Parameters:
      index - the index, where the widget will be added. The index must be non-negative and may not exceed the children count
      widget - the widget to add, not null
    • remove

      public void remove(Collection<DashboardWidget> widgets)
      Description copied from interface: HasWidgets
      Removes the given widgets from this component.
      Specified by:
      remove in interface HasWidgets
      Parameters:
      widgets - the widgets to remove, not null
    • removeAll

      public void removeAll()
      Description copied from interface: HasWidgets
      Removes all widgets from this component.
      Specified by:
      removeAll in interface HasWidgets
    • removeFromParent

      public void removeFromParent()
      Overrides:
      removeFromParent in class com.vaadin.flow.component.Component
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class com.vaadin.flow.component.Component
      Throws:
      UnsupportedOperationException - Dashboard section does not support setting visibility
    • isVisible

      public boolean isVisible()
      Overrides:
      isVisible in class com.vaadin.flow.component.Component