Package com.storedobject.vaadin
Interface ApplicationLayout
- All Known Subinterfaces:
ApplicationLayout
- All Known Implementing Classes:
ApplicationFrame,ApplicationFrame
public interface ApplicationLayout
Application requires an instance of this class to determine the "layout" of its page.- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidThis method is for closing the menu display (default implementation does nothing).voiddrawMenu(Application application) This method should draw the "menu".default StringGet the caption of the application.com.vaadin.flow.component.ComponentThe component of the "layout".default StringGet the height of the content area.default StringGet the width of the content area.getMenu()The "menu" of the layout.default com.vaadin.flow.component.ComponentGet the "menu searcher" component.default voidloggedin(Application application) This method is invoked when user authentication completed.default voidopenMenu()This method is for opening the menu display (default implementation does nothing).default voidResize the "content" portion of the "layout" to the desired size.default voidsetCaption(String caption) Set the caption of the application.voidsetContent(com.vaadin.flow.component.Component content) Set the "content" portion of the "layout".default voidThis method is for toggling the menu display (default implementation does nothing).default voidviewSelected(View view) This method is invoked whenever a view is selected for display by application.
-
Method Details
-
setCaption
Set the caption of the application.- Parameters:
caption- Caption component
-
getCaption
Get the caption of the application.- Returns:
- The default implementation returns "SO Application">.
-
getComponent
com.vaadin.flow.component.Component getComponent()The component of the "layout".- Returns:
- The main layout component.
-
getContentWidth
-
getContentHeight
-
setContent
void setContent(com.vaadin.flow.component.Component content) Set the "content" portion of the "layout". (Content portion - This is where the content of allViews get added to.) This will the set by theApplicationinstance.- Parameters:
content- Content component to be set
-
resizeContent
default void resizeContent()Resize the "content" portion of the "layout" to the desired size. This default implementation is suitable for almost all the cases. Otherwise, your overridden method should invoke this as part of your implementation because this sets some important style variables for sizing the "content" area. -
getMenu
-
drawMenu
This method should draw the "menu". It will be invoked when the application comes up.- Parameters:
application- Application
-
getMenuSearcher
default com.vaadin.flow.component.Component getMenuSearcher()Get the "menu searcher" component.- Returns:
- Default implementation returns
null.
-
loggedin
This method is invoked when user authentication completed. Typically, its used to display the user names and other details in some part of the screen.- Parameters:
application- Application.
-
toggleMenu
default void toggleMenu()This method is for toggling the menu display (default implementation does nothing). -
openMenu
default void openMenu()This method is for opening the menu display (default implementation does nothing). -
closeMenu
default void closeMenu()This method is for closing the menu display (default implementation does nothing). -
viewSelected
This method is invoked whenever a view is selected for display by application.- Parameters:
view- Currently selected view
-