Package com.storedobject.ui
Class TemplateView
java.lang.Object
com.vaadin.flow.component.Component
com.storedobject.ui.util.HtmlTemplate
com.storedobject.ui.TemplateLayout
com.storedobject.ui.TemplateView
- All Implemented Interfaces:
ClickHandler,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:
AbstractBlockView,LoginForm
An
ExecutableView that uses a TemplateLayout as its sole component.- 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> -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.TemplateView(String caption, TextContent textContent) Constructor.TemplateView(String caption, String textContentName) Constructor.TemplateView(String caption, Supplier<String> contentSupplier) Constructor.TemplateView(Supplier<String> contentSupplier) Constructor. -
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.TemplateLayout
centerMethods inherited from class com.storedobject.ui.util.HtmlTemplate
build, clearCache, createComponentForId, createComponentForId, 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
-
TemplateView
public TemplateView()Constructor. This will look for the HTML content in aTextContentthat has the same name as this class. -
TemplateView
-
TemplateView
Constructor.- Parameters:
caption- Caption to set.textContent- Text content that provides the HTML content.
-
TemplateView
-
TemplateView
-
-
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 equivalent toView.getComponent().- Returns:
- The outermost component.
-