com.vaadin.flow.component.dashboard.
Class DashboardSection
All Implemented Interfaces:
AttachNotifier
, HasWidgets
, DetachNotifier
, HasElement
, HasStyle
, Serializable
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 TypeMethodDescriptionvoid
add
(Collection<DashboardWidget> widgets) 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.
Gets the child components of this component.
getTitle()
Returns the title of the section.
Returns the widgets in this component.
boolean
Gets the component visibility value.
void
remove
(Collection<DashboardWidget> widgets) Removes the given widgets from this component.
void
Removes all widgets from this component.
void
Removes the component from its parent.
void
Sets the title of the section.
void
setVisible
(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, 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
Creates an empty section with title.
Parameters:
title
- the title to set
-
-
Method Details
-
getTitle
Returns the title of the section.
Returns:
the
sectionTitle
property from the web component -
setTitle
Sets the title of the section.
Parameters:
title
- the title to set -
getWidgets
Description copied from interface:
HasWidgets
Returns the widgets in this component.
Specified by:
getWidgets
in interfaceHasWidgets
Returns:
The widgets in this 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 classComponent
Returns:
the child components of this component
See Also:
-
add
Description copied from interface:
HasWidgets
Adds the given widgets to this component.
Specified by:
add
in interfaceHasWidgets
Parameters:
widgets
- the widgets to add, notnull
-
addWidgetAtIndex
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 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:
HasWidgets
Removes the given widgets from this component.
Specified by:
remove
in interfaceHasWidgets
Parameters:
widgets
- the widgets to remove, notnull
-
removeAll
public void removeAll()Description copied from interface:
HasWidgets
Removes all widgets from this component.
Specified by:
removeAll
in interfaceHasWidgets
-
removeFromParent
public void removeFromParent()Description copied from class:
Component
Removes the component from its parent.
Overrides:
removeFromParent
in classComponent
-
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 classComponent
Parameters:
visible
- the component visibility valueThrows:
UnsupportedOperationException
- Dashboard section does not support setting visibility -
isVisible
public boolean isVisible()Description copied from class:
Component
Gets the component visibility value.
-