com.vaadin.flow.component.dashboard.

Class DashboardSection

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.dashboard.DashboardSection

All Implemented Interfaces:

AttachNotifier, HasWidgets, DetachNotifier, HasElement, HasStyle, Serializable

@Tag("vaadin-dashboard-section") @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="24.7.0-alpha7") @NpmPackage(value="@vaadin/dashboard",version="24.7.0-alpha7") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/dashboard/src/vaadin-dashboard-section.js") public class DashboardSection extends Component implements HasWidgets

DashboardSection is a container for organizing multiple DashboardWidget instances within a Dashboard.

Author:

Vaadin Ltd

See Also:

  • 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<Component> getChildren()

      Description copied from class: Component

      Gets the child components of this component.

      The default implementation finds child components by traversing each child Element tree.

      If the component is injected to a PolymerTemplate using the @Id annotation the getChildren method will only return children added from the server side and will not return any children declared in the template file.

      Overrides:

      getChildren in class Component

      Returns:

      the child components of this component

      See Also:

    • 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()

      Description copied from class: Component

      Removes the component from its parent.

      Overrides:

      removeFromParent in class Component

    • setVisible

      public void setVisible(boolean visible)

      Description copied from class: Component

      Sets the component visibility value.

      When a component is set as invisible, all the updates of the component from the server to the client are blocked until the component is set as visible again.

      Invisible components don't receive any updates from the client-side. Unlike the server-side updates, client-side updates, if any, are discarded while the component is invisible, and are not transmitted to the server when the component is made visible.

      Overrides:

      setVisible in class Component

      Parameters:

      visible - the component visibility value

      Throws:

      UnsupportedOperationException - Dashboard section does not support setting visibility

    • isVisible

      public boolean isVisible()

      Description copied from class: Component

      Gets the component visibility value.

      Overrides:

      isVisible in class Component

      Returns:

      true if the component is visible, false otherwise