Class DashboardSection
- All Implemented Interfaces:
AttachNotifier,HasWidgets,DetachNotifier,HasElement,HasStyle,Serializable
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.Gets the child components of this component.getTitle()Returns the title of the section.Returns the widgets in this component.booleanGets the component visibility value.voidremove(Collection<DashboardWidget> widgets) Removes the given widgets from this component.voidRemoves all widgets from this component.voidRemoves the component from its parent.voidSets the title of the section.voidsetVisible(boolean visible) Sets the component visibility value.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
Description copied from class:ComponentGets the child components of this component.The default implementation finds child components by traversing each child
Elementtree.If the component is injected to a PolymerTemplate using the
@Idannotation the getChildren method will only return children added from the server side and will not return any children declared in the template file.- Overrides:
getChildrenin classComponent- Returns:
- the child components of this component
- See Also:
-
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()Description copied from class:ComponentRemoves the component from its parent.- Overrides:
removeFromParentin classComponent
-
setVisible
public void setVisible(boolean visible) Description copied from class:ComponentSets 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:
setVisiblein classComponent- Parameters:
visible- the component visibility value- Throws:
UnsupportedOperationException- Dashboard section does not support setting visibility
-
isVisible
public boolean isVisible()Description copied from class:ComponentGets the component visibility value.
-