Package com.storedobject.vaadin
Class WrappedView
java.lang.Object
com.storedobject.vaadin.View
com.storedobject.vaadin.WrappedView
- All Implemented Interfaces:
ClickHandler,ExecutableView,ValueChangeHandler,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener
A
View that is wrapped in an ExecutableView.
The ExecutableView's ExecutableView.getView(boolean) can return such a wrapped view.
However, any Component may be used inside, and it is not necessary to use anything that really
implements ExecutableView.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component> -
Constructor Summary
ConstructorsConstructorDescriptionWrappedView(com.vaadin.flow.component.Component executableView) Constructor.WrappedView(com.vaadin.flow.component.Component executableView, String caption) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Abort this view.voidclean()Close resources if any that are left opened.voidClear all alters owned by this view.voidclose()Close this view.createMenuItem(Runnable menuAction) Create the menu item for this view.Get the name of the icon to be displayed in the menu when this view is active (running).booleanCheck if this view is closeable or not.booleanCheck if this view is a "Home View" or not.voidreturnedFrom(View parent) This method is invoked whenever this view is automatically selected because its parent was closed.Methods inherited from class com.storedobject.vaadin.View
aborted, addClosedListener, addOpenedListener, createCloseableView, createWindow, decorateComponent, execute, execute, execute, executing, focus, focus, focusAny, getApplication, getCaption, getComponent, getContent, getCreatedBy, getEmbeddedView, getMenuItem, getMenuItem, getView, initUI, invoke, isFullScreen, isScrollable, isWindowMode, select, setCaption, setComponent, setCreatedBy, setDefaultPadding, setEmbeddedView, setFirstFocus, setFullScreen, setScrollable, setWindowMode, skipFirstFocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.storedobject.vaadin.ExecutableView
clicked, error, getView, log, log, message, run, setClickable, speak, trackValueChange, tray, valueChanged, warningMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
WrappedView
public WrappedView(com.vaadin.flow.component.Component executableView) Constructor.- Parameters:
executableView- TheExecutableViewcomponent. (It can be a normalComponenttoo).
-
WrappedView
Constructor.- Parameters:
executableView- TheExecutableViewcomponent. (It can be a normalComponenttoo).caption- Caption for the view.
-
-
Method Details
-
isCloseable
public boolean isCloseable()Description copied from interface:ExecutableViewCheck if this view is closeable or not. If closeable, a "closeable" menu item will be created byExecutableView.getMenuItem(Runnable). This is checked only once when the "menu item" is created.- Returns:
- True if closeable. By default, a view is closeable if it implements
CloseableViewor its internal component (View.getComponent()) implementsCloseableView.
-
isHomeView
public boolean isHomeView()Description copied from interface:ExecutableViewCheck if this view is a "Home View" or not. A "Home View" will not show any menu when it gets executed. Typically, views that show background images or some sort of dashboards can be defined as "Home Views" so that they will always appear on the content portion of theApplication.- Returns:
- True if this view is a "Home View". By default, if a view implements
HomeViewor its internal component (View.getComponent()) implementsHomeView, this method returntrue.
-
returnedFrom
Description copied from interface:ExecutableViewThis method is invoked whenever this view is automatically selected because its parent was closed.- Parameters:
parent- Parent view that was closed
-
close
public void close()Description copied from class:ViewClose this view.- Specified by:
closein interfaceExecutableView- Overrides:
closein classView
-
abort
public void abort()Description copied from class:ViewAbort this view. Default implementation sets an "abort flag" and closes the view.- Specified by:
abortin interfaceExecutableView- Overrides:
abortin classView
-
clean
public void clean()Description copied from class:ViewClose resources if any that are left opened. This method is invoked when the view is removed from theApplication. The default implementation does nothing.- Specified by:
cleanin interfaceExecutableView- Overrides:
cleanin classView
-
getMenuIconName
Description copied from interface:ExecutableViewGet the name of the icon to be displayed in the menu when this view is active (running).- Returns:
- Default implementation takes this value from
ApplicationEnvironment.getActiveMenuIconName().
-
createMenuItem
Description copied from interface:ExecutableViewCreate the menu item for this view. This will be invoked byExecutableView.getMenuItem(Runnable). By default, this invokesApplicationEnvironment.createMenuItem(ExecutableView, String, Runnable)to create the menu item.- Parameters:
menuAction- Action for the menu item to be created- Returns:
- Menu item.
-
clearAlerts
public void clearAlerts()Description copied from interface:ExecutableViewClear all alters owned by this view.
-