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
ConstructorsConstructorDescriptionCreates an empty section.DashboardSection(String title) Creates an empty section with title. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Collection<DashboardWidget> widgets) Adds the given widgets to this component.voidaddWidgetAtIndex(int index, DashboardWidget widget) Adds the given widget as child of this component at the specific index.Stream<com.vaadin.flow.component.Component>getTitle()Returns the title of the section.Returns the widgets in this component.booleanvoidremove(Collection<DashboardWidget> widgets) Removes the given widgets from this component.voidRemoves all widgets from this component.voidvoidSets the title of the section.voidsetVisible(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, setIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.dashboard.HasWidgets
add, remove
-
Constructor Details
-
DashboardSection
public DashboardSection()Creates an empty section. -
DashboardSection
Creates an empty section with title.- Parameters:
title- the title to set
-
-
Method Details
-
getTitle
Returns the title of the section.- Returns:
- the
sectionTitleproperty from the web component
-
setTitle
Sets the title of the section.- Parameters:
title- the title to set
-
getWidgets
Description copied from interface:HasWidgetsReturns the widgets in this component.- Specified by:
getWidgetsin interfaceHasWidgets- Returns:
- The widgets in this component
-
getChildren
- Overrides:
getChildrenin classcom.vaadin.flow.component.Component
-
add
Description copied from interface:HasWidgetsAdds the given widgets to this component.- Specified by:
addin interfaceHasWidgets- Parameters:
widgets- the widgets to add, notnull
-
addWidgetAtIndex
Description copied from interface:HasWidgetsAdds 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:
addWidgetAtIndexin interfaceHasWidgets- Parameters:
index- the index, where the widget will be added. The index must be non-negative and may not exceed the children countwidget- the widget to add, notnull
-
remove
Description copied from interface:HasWidgetsRemoves the given widgets from this component.- Specified by:
removein interfaceHasWidgets- Parameters:
widgets- the widgets to remove, notnull
-
removeAll
public void removeAll()Description copied from interface:HasWidgetsRemoves all widgets from this component.- Specified by:
removeAllin interfaceHasWidgets
-
removeFromParent
public void removeFromParent()- Overrides:
removeFromParentin classcom.vaadin.flow.component.Component
-
setVisible
public void setVisible(boolean visible) - Overrides:
setVisiblein classcom.vaadin.flow.component.Component- Throws:
UnsupportedOperationException- Dashboard section does not support setting visibility
-
isVisible
public boolean isVisible()- Overrides:
isVisiblein classcom.vaadin.flow.component.Component
-