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
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.StyleSupplier
Nested 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 TypeMethodDescriptionvoid
Decorate the outermost component if required.com.vaadin.flow.component.Component
Get the component that represents this template view.getView
(boolean create) Get the View.void
setCaption
(String caption) Set the captionvoid
viewConstructed
(View view) This will be invoked when theView
is constructed for the first time.Methods inherited from class com.storedobject.ui.TemplateLayout
center
Methods inherited from class com.storedobject.ui.util.HtmlTemplate
build, clearCache, createComponentForId, createComponentForId, isCreated, onAttach, setComponentCreator, setView
Methods 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, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClicked
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods 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, warning
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods 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, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
TemplateView
public TemplateView()Constructor. This will look for the HTML content in aTextContent
that 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:ExecutableView
Get the View. Create it if it doesn't exist.- Specified by:
getView
in interfaceExecutableView
- Parameters:
create
- Whether to create or not.- Returns:
- View.
-
setCaption
Description copied from interface:ExecutableView
Set the caption- Specified by:
setCaption
in 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.
-