Class ApplicationView
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.orderedlayout.HorizontalLayout
-
- com.group21.jobTracker.ui.application.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.BeforeEnterObserverA view for performing create-read-update-delete operations on Jobs.- See Also:
- Serialized Form
-
-
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 voidbeforeEnter(com.vaadin.flow.router.BeforeEnterEvent event)Before-entering to the app one can access the job-tracker site as null user.voidclearSelection()Deselects the selected row in the grid.com.vaadin.flow.component.orderedlayout.HorizontalLayoutcreateTopBar()ApplicationView filtering and new Application form will be assigned int he page UI.voideditJob(Jobs job)Displays user a form to edit a Job.voidremoveProduct(Jobs job)Removes a Job from the list of Jobs.voidselectRow(Jobs row)Selects a rowvoidsetnewApplicationEnabled(boolean enabled)Enables/Disables the new Jobs button.voidsetParameter(com.vaadin.flow.router.BeforeEvent event, String parameter)voidshowError(String msg)Showing error message using Notification.show from VaadinvoidshowForm(boolean show)Shows and hides the new job formvoidshowNotification(String msg)Shows a temporary popup notification to the user.voidupdateProduct(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut
-
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.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
-
-
-
-
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
-
-
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:
setParameterin interfacecom.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:
beforeEnterin interfacecom.vaadin.flow.router.internal.BeforeEnterHandler- Parameters:
event- a before-enter event
-
-