Package com.storedobject.ui
Class CardDashboard
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
com.storedobject.ui.ScrollingContent
com.storedobject.ui.CardDashboard
- All Implemented Interfaces:
ClickHandler,CloseableView,ExecutableView,ValueChangeHandler,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasOrderedComponents,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasText,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener
- Direct Known Subclasses:
ObjectCardDashboard
The CardDashboard class represents a dashboard composed of interactive cards laid out on a grid.
It extends the functionality of the ScrollingContent class and implements the ExecutableView
and CloseableView interfaces. This allows the dashboard to be part of an application's interactive
view system with capabilities to execute and manage its lifecycle.
The CardDashboard is designed to display a collection of cards organized using a grid layout,
and its caption can be dynamically set. It also includes an inner view component that manages
display-specific details and interactions related to its content. The caption updates are propagated
to the view if it exists.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace -
Constructor Summary
ConstructorsConstructorDescriptionCardDashboard(String caption, CardGrid grid) Constructs a newCardDashboardinstance with the specified caption and grid layout. -
Method Summary
Modifier and TypeMethodDescriptionvoidExecute the associated view by locking another view (the locked view will not be selectable until this view is closed).Get the caption for this view.getGrid()Retrieves theCardGridassociated with thisCardDashboard.getView(boolean create) Get the View.voidsetCaption(String caption) Set the captionMethods inherited from class com.storedobject.ui.ScrollingContent
getContent, getHeader, getMargin, setContent, setHeader, setHeaderHeight, setMarginMethods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods 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.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clean, clearAlerts, clicked, close, createMenuItem, error, execute, getApplication, getMenuIconName, getMenuItem, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warningMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasOrderedComponents
getChildren, getComponentAt, getComponentCount, indexOf, replaceMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods 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.HasText
getText, getWhiteSpace, setText, setWhiteSpaceMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
CardDashboard
Constructs a newCardDashboardinstance with the specified caption and grid layout. This constructor initializes the dashboard by associating it with the givenCardGrid. The provided grid is set as the scrollable content of the dashboard, and it is linked back to the dashboard using thesetDashboardmethod. Additionally, the caption for the dashboard is set, and it can be dynamically modified later.- Parameters:
caption- the display caption for the dashboard. Ifnullor blank, a default value ("Dashboard") is used.grid- theCardGridthat organizes and manages the cards displayed in the dashboard. This grid is essential for layout and content management within the dashboard.
-
-
Method Details
-
setCaption
Description copied from interface:ExecutableViewSet the caption- Specified by:
setCaptionin interfaceExecutableView- Parameters:
caption- Caption
-
getCaption
Description copied from interface:ExecutableViewGet the caption for this view.- Specified by:
getCaptionin interfaceExecutableView- Returns:
- Caption.
-
getGrid
Retrieves theCardGridassociated with thisCardDashboard. TheCardGridorganizes and manages the layout and content of the cards displayed within the dashboard.- Returns:
- the
CardGridinstance linked to thisCardDashboard.
-
execute
Description copied from interface:ExecutableViewExecute the associated view by locking another view (the locked view will not be selectable until this view is closed). The locked view acts as its "parent" and it will automatically get selected when this view closes.- Specified by:
executein interfaceExecutableView- Parameters:
lock- View to be locked.
-
getView
Description copied from interface:ExecutableViewGet the View. Create it if it doesn't exist.- Specified by:
getViewin interfaceExecutableView- Parameters:
create- Whether to create or not.- Returns:
- View.
-