Package com.storedobject.ui.inventory
Class LocateItem
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<InventoryItem>
- All Implemented Interfaces:
Executable
,Reentrant
,HasLogic
,Transactional
,ViewFilterSupport<InventoryItem>
,ClickHandler
,CloseableView
,ExecutableView
,HasColumns<InventoryItem>
,SupportWindowMode
,ValueChangeHandler
,com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.grid.Grid<InventoryItem>>
,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.grid.Grid<InventoryItem>>
,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.grid.Grid<InventoryItem>>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.HasValue.ValueChangeListener
,com.vaadin.flow.data.event.SortEvent.SortNotifier<com.vaadin.flow.component.grid.Grid<InventoryItem>,
,com.vaadin.flow.component.grid.GridSortOrder<InventoryItem>> com.vaadin.flow.data.provider.HasDataGenerators<InventoryItem>
,com.vaadin.flow.data.provider.HasDataView<InventoryItem,
,Void, com.vaadin.flow.component.grid.dataview.GridDataView<InventoryItem>> com.vaadin.flow.data.provider.HasLazyDataView<InventoryItem,
,Void, com.vaadin.flow.component.grid.dataview.GridLazyDataView<InventoryItem>> com.vaadin.flow.data.provider.HasListDataView<InventoryItem,
,com.vaadin.flow.component.grid.dataview.GridListDataView<InventoryItem>> Serializable
,Iterable<InventoryItem>
,Runnable
,Collection<InventoryItem>
,EventListener
,List<InventoryItem>
,SequencedCollection<InventoryItem>
For locating stocks of a given "Part Number" and its APNs. The result includes all locations, including items
fitted on assemblies, items sent for repair etc. However, items that are already scrapped are not included.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.grid.Grid
com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>, com.vaadin.flow.component.grid.Grid.Column<T>, com.vaadin.flow.component.grid.Grid.DataCommunicatorBuilder<T,
U extends com.vaadin.flow.data.provider.ArrayUpdater>, com.vaadin.flow.component.grid.Grid.MultiSortPriority, com.vaadin.flow.component.grid.Grid.NestedNullBehavior, com.vaadin.flow.component.grid.Grid.SelectionMode, com.vaadin.flow.component.grid.Grid.SpringData, com.vaadin.flow.component.grid.Grid.UpdateQueue Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.storedobject.vaadin.HasColumns
HasColumns.SOGrid<T>
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.LocateItem
(boolean canInspect) Constructor.LocateItem
(InventoryItemType partNumber) Constructor.LocateItem
(InventoryItemType partNumber, boolean canInspect) Constructor.LocateItem
(Class<? extends InventoryItem> itemClass) Constructor.LocateItem
(String caption) Constructor.LocateItem
(String caption, boolean canInspect) Constructor.LocateItem
(String caption, InventoryItemType partNumber) Constructor.LocateItem
(String caption, InventoryItemType partNumber, boolean canInspect) Constructor.LocateItem
(String caption, Class<? extends InventoryItem> itemClass) Constructor.LocateItem
(String caption, Class<? extends InventoryItem> itemClass, boolean canInspect) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clean()
Clean this up by closing resources if any.void
clear()
void
This method is invoked once all the columns are built and the grid is ready to display.void
Create footer rows if required here by invokingHasColumns.appendFooter()
orHasColumns.prependFooter()
.com.vaadin.flow.component.Component
You can have a "header row" (as the first row) that covers the whole grid.protected void
onAttach
(com.vaadin.flow.component.AttachEvent attachEvent) void
setAllowBreaking
(boolean allowBreaking) Allow breaking of assemblies.void
setAllowEditCost
(boolean allowEditCost) Allow editing of cost.void
setAllowInspection
(boolean allowInspection) Sets whether inspection is allowed or not.void
setStore
(InventoryStore store) Set a store so that the search is limited to the specified store.Methods inherited from class com.storedobject.ui.DataGrid
actionAllowed, append, canAllowAction, createListDataProvider, doAppendAction, doDeleteAction, doInsertAction, doReloadAction, doReloadAllAction, doUndeleteAction, doUpdateAction, getActionPrefix, getDataProvider, getObjectClass, isValid, itemAppended, itemDeleted, itemInserted, itemReloaded, itemUndeleted, itemUpdated, load, load, selected, selected, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, sort, sort, validateAppend, validateDelete, validateInsert, validateReload, validateUndelete, validateUpdate
Methods inherited from class com.storedobject.vaadin.ListGrid
add, add, addAll, addAll, addViewFilter, clearViewFilters, contains, containsAll, get, getData, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, onDetach, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, setData, setViewFilter, size, subList, toArray, toArray
Methods inherited from class com.storedobject.vaadin.DataGrid
addConstructedListener, appendFooter, clearConstructedListeners, getColumnByKey, getColumns, getSOGrid, isColumnReorderingAllowed, setColumnReorderingAllowed, streamConstructedListeners
Methods inherited from class com.vaadin.flow.component.grid.Grid
addCellFocusListener, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumnReorderListener, addColumnResizeListener, addColumns, addComponentColumn, addContextMenu, addDataGenerator, addDragEndListener, addDragStartListener, addDropListener, addFirstHeaderRow, addItemClickListener, addItemDoubleClickListener, addSelectionListener, addSortListener, addThemeVariants, addValueProvider, appendFooterRow, appendHeaderRow, asMultiSelect, asSingleSelect, compareMaybeComparables, configureBeanType, createColumn, createColumnId, createDefaultArrayUpdater, createEditor, createSortingComparator, deselect, deselectAll, getAriaLabel, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnLayers, getColumnRendering, getDataCommunicator, getDefaultColumnFactory, getDefaultHeaderRow, getDragFilter, getDropFilter, getDropMode, getEditor, getEmptyStateComponent, getEmptyStateText, getFooterRows, getGenericDataView, getHeaderRows, getLazyDataView, getListDataView, getNestedNullBehavior, getPageSize, getPartNameGenerator, getPropertySet, getSelectedItems, getSelectionMode, getSelectionModel, getSelectionPreservationMode, getSortOrder, getTooltipPosition, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isAllRowsVisible, isDetailsVisible, isDetailsVisibleOnClick, isMultiSort, isRowsDraggable, onDataProviderChange, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeAllFooterRows, removeAllHeaderRows, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeFooterRow, removeHeaderRow, removeThemeVariants, scrollToEnd, scrollToIndex, scrollToItem, scrollToStart, select, setAllRowsVisible, setAriaLabel, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnRendering, setColumns, setDataProvider, setDefaultMultiSortPriority, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setEmptyStateComponent, setEmptyStateText, setItemDetailsRenderer, setItemSelectableProvider, setItemsPageable, setItemsPageable, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSelectionPreservationMode, setSortableColumns, setTooltipGenerator, setTooltipPosition, setUniqueKeyProperty, setUniqueKeyProvider, updateSelectionModeOnClient
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, removeFromParent, scrollIntoView, 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.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClicked
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface com.storedobject.common.Executable
act
Methods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clicked, close, createMenuItem, error, execute, execute, getMenuIconName, getMenuItem, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warning
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
Methods inherited from interface com.storedobject.vaadin.HasColumns
addItemSelectedListener, addItemsSelectedListener, appendHeader, clearAlerts, compact, configure, createColumn, createColumn, createColumn, createColumn, createColumn, createComponentColumn, createDecoratedWindow, createHeaders, createHierarchyColumn, createHTMLColumn, createHTMLHierarchyColumn, createView, customizeColumn, customizeRenderer, deselect, deselect, executing, getApplication, getCaption, getColumn, getColumnCaption, getColumnCount, getColumnDetail, getColumnFunction, getColumnHeaderComponent, getColumnMethodName, getColumnNames, getColumnOrder, getColumnSorter, getColumnTemplate, getConfigureButton, getDataClass, getDefinedColumnCount, getFixedColumnWidth, getMenuItem, getObjectRendered, getObjectUnwrapped, getRelativeColumnWidth, getSelected, getTextAlign, getView, getViewComponent, ignoreCaseForColumnSorting, includeColumn, isColumnFrozen, isColumnResizable, isColumnSortable, isColumnVisible, prependFooter, prependHeader, refresh, refresh, refresh, removeItemSelectedListener, render, select, select, setCaption, setColumnFrozen, setColumnResizable, setColumnVisible, setMethodHandlerHost, sort, sort, sortOrder, sortOrder, unwrap
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.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, reversed, spliterator
Methods inherited from interface com.storedobject.common.Reentrant
isReentrant
Methods inherited from interface com.storedobject.vaadin.util.SupportWindowMode
createWindow
Methods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl
Methods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
Methods inherited from interface com.storedobject.ui.util.ViewFilterSupport
configure, configure, configure, configureMatch, filterView, getViewFilter
-
Constructor Details
-
LocateItem
public LocateItem()Constructor. -
LocateItem
Constructor.- Parameters:
caption
- This could be "Caption", "Caption|Class Name", "Caption|INSPECT", "Caption|Class Name|INSPECT", "Caption|INSPECT,EDIT_COST", "Caption|Class Name|INSPECT,EDIT_COST", "Caption|EDIT_COST", "Caption|Class Name|EDIT_COST".
-
LocateItem
-
LocateItem
public LocateItem(boolean canInspect) Constructor.- Parameters:
canInspect
- Whether the item details can be inspected/re-binned or not.
-
LocateItem
Constructor.- Parameters:
caption
- Caption.canInspect
- Whether the item details can be inspected/re-binned or not.
-
LocateItem
Constructor.- Parameters:
partNumber
- Part number.canInspect
- Whether the item details can be inspected/re-binned or not.
-
LocateItem
Constructor.- Parameters:
caption
- Caption.partNumber
- Part number.
-
LocateItem
Constructor.- Parameters:
caption
- Caption.partNumber
- Part number.canInspect
- Whether the item details can be inspected/re-binned or not.
-
LocateItem
Constructor.- Parameters:
itemClass
- Item class.
-
LocateItem
Constructor.- Parameters:
caption
- Caption.itemClass
- Item class.
-
LocateItem
Constructor.- Parameters:
caption
- Caption.itemClass
- Item class.canInspect
- Whether the item details can be inspected/re-binned or not.
-
-
Method Details
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
onAttach
in classListGrid<InventoryItem>
-
constructed
public void constructed()Description copied from interface:HasColumns
This method is invoked once all the columns are built and the grid is ready to display.- Specified by:
constructed
in interfaceHasColumns<InventoryItem>
-
createHeader
public com.vaadin.flow.component.Component createHeader()Description copied from interface:HasColumns
You can have a "header row" (as the first row) that covers the whole grid. Typically, such a row is to show your own buttons or components to customize the grid. The default implementation returns null and thus, no such row is created. (Please note thatHasColumns.createHeaders()
} is invoked before this method for adding other header rows just above the main header row. This may be used for column grouping etc.)- Specified by:
createHeader
in interfaceHasColumns<InventoryItem>
- Returns:
- Component to be used as the "header row".
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<InventoryItem>
- Specified by:
clear
in interfaceList<InventoryItem>
- Overrides:
clear
in classListGrid<InventoryItem>
-
clean
public void clean()Description copied from interface:ExecutableView
Clean this up by closing resources if any.- Specified by:
clean
in interfaceExecutableView
-
getLocationDisplay
-
setStore
Set a store so that the search is limited to the specified store.- Parameters:
store
- Store.
-
setAllowBreaking
public void setAllowBreaking(boolean allowBreaking) Allow breaking of assemblies.- Parameters:
allowBreaking
- True/false.
-
setAllowEditCost
public void setAllowEditCost(boolean allowEditCost) Allow editing of cost. (By default, editing of cost is allowed in the inspection mode).- Parameters:
allowEditCost
- True/false.
-
setAllowInspection
public void setAllowInspection(boolean allowInspection) Sets whether inspection is allowed or not.- Parameters:
allowInspection
- A boolean flag indicating whether inspection is allowed. (By default, it is not allowed).
-