Package com.storedobject.ui
Class Dashboard<T>
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>
- Type Parameters:
T- The type of object data that this dashboard manages.
- All Implemented Interfaces:
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
- Direct Known Subclasses:
ObjectDashboard
UI of a dashboard that uses a structured template-based UI. The data object can have "get" methods that return
values that can be used to populate the dashboard layout 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
ConstructorsModifierConstructorDescriptionConstructor to create an ObjectDashboard instance based on the fully qualified name of a class.protectedDashboard(String caption, Class<T> objectClass, TextContent template) Constructor to create a Dashboard instance based on the given object type and template.Constructor to create a Dashboard instance based on the given object and template name.Dashboard(String caption, T object, TextContent template) Constructor to create a Dashboard instance based on the given object and template.Constructor to create a Dashboard instance based on the given object and template name.Constructor to create a Dashboard instance based on the given object.Dashboard(T object, TextContent template) Constructor to create a Dashboard instance based on the given object and template.Constructor to create a Dashboard instance based on the given object and template name. -
Method Summary
Modifier and TypeMethodDescriptionvoidDecorate the outermost component if required.com.vaadin.flow.component.ComponentGet the component that represents this template view.getView(boolean create) Get the View.voidsetCaption(String caption) Set the captionvoidviewConstructed(View view) This will be invoked when theViewis constructed for the first time.Methods 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.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
Dashboard
Constructor to create a Dashboard instance based on the given object.- Parameters:
object- The data that will be represented and managed.
-
Dashboard
-
Dashboard
-
Dashboard
Constructor to create a Dashboard instance based on the given object and template name.- Parameters:
caption- Caption to set.object- The data that will be represented and managed.templateName- The template name to use for the dashboard layout.
-
Dashboard
Constructor to create a Dashboard instance based on the given object and template.- Parameters:
object- The data that will be represented and managed.template- The template to use for the dashboard layout.
-
Dashboard
Constructor to create a Dashboard instance based on the given object and template.- Parameters:
caption- Caption to set.object- The data that will be represented and managed.template- The template to use for the dashboard layout.
-
Dashboard
Constructor to create a Dashboard instance based on the given object type and template.- Parameters:
caption- Caption to set.objectClass- The class type of the objects that will be represented and managed.template- The template to use for the dashboard layout.
-
Dashboard
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
-
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.
-
setCaption
Description copied from interface:ExecutableViewSet the caption- Specified by:
setCaptionin interfaceExecutableView- Parameters:
caption- Caption
-
viewConstructed
-
decorateComponent
public void decorateComponent()Decorate the outermost component if required. This will be invoked after applying theView.decorateComponent(). -
getComponent
public com.vaadin.flow.component.Component getComponent()Get the component that represents this template view. (This will be the outermost component). This is an equivalent toView.getComponent().- Returns:
- The outermost component.
-