Class ApplicationView

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.orderedlayout.HorizontalLayout>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.orderedlayout.FlexComponent, com.vaadin.flow.component.orderedlayout.ThemableLayout, com.vaadin.flow.router.BeforeEnterObserver, com.vaadin.flow.router.HasUrlParameter<String>, com.vaadin.flow.router.internal.BeforeEnterHandler, Serializable

    @Route(value="Application",
           layout=MainLayout.class)
    public class ApplicationView
    extends com.vaadin.flow.component.orderedlayout.HorizontalLayout
    implements com.vaadin.flow.router.HasUrlParameter<String>, com.vaadin.flow.router.BeforeEnterObserver
    A view for performing create-read-update-delete operations on Jobs.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.vaadin.flow.component.orderedlayout.FlexComponent

        com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment, com.vaadin.flow.component.orderedlayout.FlexComponent.JustifyContentMode
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String VIEW_NAME
      private static final parameter representing the name of the page view
    • Constructor Summary

      Constructors 
      Constructor Description
      ApplicationView()
      ApplicationView constructor to initialize all the instance like ApplicationDataProvider, initiating the APplication Grid Application form in the application page.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beforeEnter​(com.vaadin.flow.router.BeforeEnterEvent event)
      Before-entering to the app one can access the job-tracker site as null user.
      void clearSelection()
      Deselects the selected row in the grid.
      com.vaadin.flow.component.orderedlayout.HorizontalLayout createTopBar()
      ApplicationView filtering and new Application form will be assigned int he page UI.
      void editJob​(Jobs job)
      Displays user a form to edit a Job.
      void removeProduct​(Jobs job)
      Removes a Job from the list of Jobs.
      void selectRow​(Jobs row)
      Selects a row
      void setnewApplicationEnabled​(boolean enabled)
      Enables/Disables the new Jobs button.
      void setParameter​(com.vaadin.flow.router.BeforeEvent event, String parameter)  
      void showError​(String msg)
      Showing error message using Notification.show from Vaadin
      void showForm​(boolean show)
      Shows and hides the new job form
      void showNotification​(String msg)
      Shows a temporary popup notification to the user.
      void updateProduct​(Jobs job)
      Updates a Jobs in the list of jobs.
      • Methods inherited from class com.vaadin.flow.component.orderedlayout.HorizontalLayout

        addAndExpand, getAlignItems, getAlignSelf, getDefaultVerticalComponentAlignment, getVerticalComponentAlignment, setAlignItems, setAlignSelf, setDefaultVerticalComponentAlignment, setSpacing, setVerticalComponentAlignment
      • 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, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.ClickNotifier

        addClickListener, addClickShortcut
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.orderedlayout.FlexComponent

        expand, getFlexGrow, getJustifyContentMode, replace, setFlexGrow, setJustifyContentMode
      • Methods inherited from interface com.vaadin.flow.component.HasComponents

        add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasEnabled

        isEnabled, setEnabled
      • Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents

        getChildren, getComponentAt, getComponentCount, indexOf
      • 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.vaadin.flow.component.orderedlayout.ThemableLayout

        getBoxSizing, getThemeList, isMargin, isPadding, isSpacing, setBoxSizing, setMargin, setPadding
    • Field Detail

      • VIEW_NAME

        public static final String VIEW_NAME
        private static final parameter representing the name of the page view
        See Also:
        Constant Field Values
    • Constructor Detail

      • ApplicationView

        public ApplicationView()
        ApplicationView constructor to initialize all the instance like ApplicationDataProvider, initiating the APplication Grid Application form in the application page.
    • Method Detail

      • createTopBar

        public com.vaadin.flow.component.orderedlayout.HorizontalLayout createTopBar()
        ApplicationView filtering and new Application form will be assigned int he page UI. Application form in the application page.
        Returns:
        layout for filtering and new application
      • showError

        public void showError​(String msg)
        Showing error message using Notification.show from Vaadin
        Parameters:
        msg - message to show
        See Also:
        Notification.show(String)
      • showNotification

        public void showNotification​(String msg)
        Shows a temporary popup notification to the user.
        Parameters:
        msg - to show
        See Also:
        Notification.show(String)
      • setnewApplicationEnabled

        public void setnewApplicationEnabled​(boolean enabled)
        Enables/Disables the new Jobs button.
        Parameters:
        enabled - whether the new jobs button should appear or not
      • clearSelection

        public void clearSelection()
        Deselects the selected row in the grid.
      • selectRow

        public void selectRow​(Jobs row)
        Selects a row
        Parameters:
        row - that is selected
      • updateProduct

        public void updateProduct​(Jobs job)
        Updates a Jobs in the list of jobs.
        Parameters:
        job - Jobs that should be updated
      • removeProduct

        public void removeProduct​(Jobs job)
        Removes a Job from the list of Jobs.
        Parameters:
        job - object to be removed
      • editJob

        public void editJob​(Jobs job)
        Displays user a form to edit a Job.
        Parameters:
        job - object to be edited
      • showForm

        public void showForm​(boolean show)
        Shows and hides the new job form
        Parameters:
        show - whether the form should be shown or hidden
      • setParameter

        public void setParameter​(com.vaadin.flow.router.BeforeEvent event,
                                 @OptionalParameter
                                 String parameter)
        Specified by:
        setParameter in interface com.vaadin.flow.router.HasUrlParameter<String>
      • beforeEnter

        public void beforeEnter​(com.vaadin.flow.router.BeforeEnterEvent event)
        Before-entering to the app one can access the job-tracker site as null user.
        Specified by:
        beforeEnter in interface com.vaadin.flow.router.internal.BeforeEnterHandler
        Parameters:
        event - a before-enter event