Package com.storedobject.ui
Class ObjectCardGrid<T extends StoredObject>
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.CardGrid
com.storedobject.ui.ObjectCardGrid<T>
- Type Parameters:
T- the type of objects that extendStoredObject, which will be managed by this grid
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>,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,Serializable
ObjectCardGrid is a specialized
CardGrid designed to work with objects
of type StoredObject. It provides additional methods to handle events
related to loading cards and facilitates retrieving a list of stored objects
from the associated CardDashboard.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcardLoaded(T object) Marks a single card as loaded and triggers processing for when all cards are loaded.voidThis method is called when all cards in the grid have been successfully loaded.getList()Retrieves the list of objects managed by the associatedObjectCardDashboard.Methods inherited from class com.storedobject.ui.CardGrid
getCardWidth, getDashboard, getGap, setCardWidth, setGapMethods 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.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods 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, setWhiteSpace
-
Constructor Details
-
ObjectCardGrid
public ObjectCardGrid()
-
-
Method Details
-
cardsLoaded
public void cardsLoaded()This method is called when all cards in the grid have been successfully loaded. It is intended to handle any post-loading logic or events that need to occur after the cards have been fully initialized or populated. -
cardLoaded
Marks a single card as loaded and triggers processing for when all cards are loaded.- Parameters:
object- the loaded card object of typeT
-
getList
Retrieves the list of objects managed by the associatedObjectCardDashboard. If the dashboard associated with this grid is an instance ofObjectCardDashboard, the method returns the list of objects. Otherwise, it returns an empty list.- Returns:
- a
List<T>containing the objects from the associatedObjectCardDashboard, or an empty list if the dashboard is not an instance ofObjectCardDashboardor no dashboard is set.
-