Package com.storedobject.ui
Class ObjectDashboard<T extends StoredObject>
java.lang.Object
com.vaadin.flow.component.Component
com.storedobject.ui.util.HtmlTemplate
com.storedobject.ui.TemplateLayout
com.storedobject.ui.TemplateComponent
com.storedobject.ui.ObjectTemplate<T>
com.storedobject.ui.Dashboard<T>
com.storedobject.ui.ObjectDashboard<T>
- Type Parameters:
T- The type ofStoredObjectthat this dashboard manages.
- All Implemented Interfaces:
ObjectSetter<T>,ClickHandler,CloseableView,ExecutableView,ValueChangeHandler,com.vaadin.flow.component.AttachNotifier,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.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener,Consumer<T>
public class ObjectDashboard<T extends StoredObject>
extends Dashboard<T>
implements ObjectSetter<T>
UI of a dashboard that uses a structured template-based UI. The data object's "get" methods that return
values that are used to populate the dashboard layout are defined in the template as "id" attributes of the HTML tags.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.ui.util.HtmlTemplate
HtmlTemplate.ComponentCreator, HtmlTemplate.StreamSupplier, HtmlTemplate.StyleSupplierNested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component> -
Field Summary
Fields inherited from class com.storedobject.ui.ObjectTemplate
object, objectClass -
Constructor Summary
ConstructorsConstructorDescriptionObjectDashboard(Class<T> objectClass) Constructor.ObjectDashboard(Class<T> objectClass, TextContent template) Constructor to create an ObjectDashboard instance based on the given object class type and template code.ObjectDashboard(String className) Constructor to create an ObjectDashboard instance based on the fully qualified name of a class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <O extends StoredObject>
ObjectDashboard<O> Creates an instance ofObjectDashboardfor the specified object class.Methods inherited from class com.storedobject.ui.Dashboard
decorateComponent, getComponent, getView, setCaption, viewConstructedMethods inherited from class com.storedobject.ui.ObjectTemplate
createComponentForId, getObject, getObjectClass, paint, setObjectMethods inherited from class com.storedobject.ui.TemplateLayout
centerMethods inherited from class com.storedobject.ui.util.HtmlTemplate
build, clearCache, createComponentForId, createSvgForId, isCreated, onAttach, setComponentCreator, setViewMethods 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, 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.DetachNotifier
addDetachListenerMethods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clean, clearAlerts, clicked, close, createMenuItem, error, execute, execute, getApplication, getCaption, 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.HasElement
getElementMethods 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.storedobject.core.ObjectSetter
accept, getObjectClass, isAllowAny, setObject, setObjectMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
ObjectDashboard
Constructor to create an ObjectDashboard instance based on the given object class type and template code.- Parameters:
objectClass- The class type of the objects that will be represented and managed.template- The template to use for the dashboard layout.
-
ObjectDashboard
-
ObjectDashboard
Constructor to create an ObjectDashboard instance based on the fully qualified name of a class.- Parameters:
className- The fully qualified name of the class whose objects will be represented and managed.- Throws:
Exception- If the specified class name cannot be loaded or cast to the required type.
-
-
Method Details
-
create
Creates an instance ofObjectDashboardfor the specified object class. This method attempts to dynamically load or create a dashboard class based on the naming convention and associated logic. If the process fails at any step, an error message will be embedded in the resulting dashboard instance.- Type Parameters:
O- The type of the objects that extendStoredObject.- Parameters:
objectClass- The class of objects for which the dashboard is being created.- Returns:
- An instance of
ObjectDashboardfor the specified object class.
-