Package com.storedobject.vaadin
Class WindowDecorator
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<ButtonLayout>
com.storedobject.vaadin.WindowDecorator
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
A component that can be added to
Window as the first component so that it will look like a window header.- Author:
- Syam
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWindowDecorator(View view, com.vaadin.flow.component.Component... headerComponents) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final ButtonLayoutvoidsetCaption(String caption) Set the caption.voidsetCloseable(boolean closeable) Toggle the visibility of the "Close" button so that the associated Window's closeability can be controlled.Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, 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.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
WindowDecorator
Constructor.- Parameters:
view- View used by the window (View will be aborted when "close" button is pressed)headerComponents- Additional header components to be added just before "close" button
-
-
Method Details
-
initContent
- Overrides:
initContentin classcom.vaadin.flow.component.Composite<ButtonLayout>
-
setCaption
Set the caption. (By default the caption from the view must have been already set).- Parameters:
caption- Caption to set
-
setCloseable
public void setCloseable(boolean closeable) Toggle the visibility of the "Close" button so that the associated Window's closeability can be controlled.- Parameters:
closeable- True/false.
-