Package com.storedobject.ui.inventory
Class AbstractSendAndReceiveMaterial<T extends InventoryTransfer,L extends InventoryTransferItem>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<T>
com.storedobject.vaadin.DataGrid<T>
com.storedobject.vaadin.ListGrid<T>
com.storedobject.ui.DataGrid<T>
com.storedobject.ui.ObjectListGrid<T>
com.storedobject.ui.ObjectGrid<T>
com.storedobject.ui.ObjectBrowser<T>
com.storedobject.ui.inventory.AbstractSendAndReceiveMaterial<T,L>
- All Implemented Interfaces:
Executable,Reentrant,FilterMethods<T>,HasLogic,ObjectLoader<T>,ObjectSearcher<T>,ObjectSetter<T>,ObjectsSetter<T>,EditableDataGrid<T>,ObjectEditorListener,ObjectGridData<T,,T> ObjectLoader<T>,Transactional,ViewFilterSupport<T>,ClickHandler,ExecutableView,HasColumns<T>,SupportWindowMode,ValueChangeHandler,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.grid.Grid<T>>,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<T>>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.grid.Grid<T>>,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<T>,,com.vaadin.flow.component.grid.GridSortOrder<T>> com.vaadin.flow.data.provider.HasDataGenerators<T>,com.vaadin.flow.data.provider.HasDataView<T,,Void, com.vaadin.flow.component.grid.dataview.GridDataView<T>> com.vaadin.flow.data.provider.HasLazyDataView<T,,Void, com.vaadin.flow.component.grid.dataview.GridLazyDataView<T>> com.vaadin.flow.data.provider.HasListDataView<T,,com.vaadin.flow.component.grid.dataview.GridListDataView<T>> Serializable,Iterable<T>,Runnable,Collection<T>,EventListener,Consumer<T>,List<T>,SequencedCollection<T>
- Direct Known Subclasses:
AbstractReceiveMaterialReturned,AbstractReceiveMaterialTransferred,AbstractReturnMaterial,AbstractSale,SendItemsOut,TransferMaterial
public abstract class AbstractSendAndReceiveMaterial<T extends InventoryTransfer,L extends InventoryTransferItem>
extends ObjectBrowser<T>
- 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> -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, boolean receiveMode) AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, boolean receiveMode, InventoryLocation otherLocation) AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, InventoryLocation fromOrTo, boolean receiveMode) AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, InventoryLocation fromOrTo, boolean receiveMode, InventoryLocation otherLocation) AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, InventoryLocation fromOrTo, boolean receiveMode, String caption) AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, String fromOrTo, boolean receiveMode) AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, String fromOrTo, boolean receiveMode, String caption) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidConfigures and adds additional buttons to the user interface.protected final booleancanAmend()protected final booleanprotected final booleancanClose()booleanCheck whether an item can be deleted or not.booleanCheck whether an item can be edited or not.protected final booleanbooleanprotected final booleancanSend()voidCreate extra header rows if required here by invokingHasColumns.prependHeader()orHasColumns.appendHeader()(typically useful for creating column grouping etc.).protected ObjectEditor<T> Creates and returns an instance of ObjectEditor for managing the editing of objects of type T.getConsignment(T it) final InventoryLocationfinal InventoryLocationgetReceived(T mt) protected Buttonprotected Class<? extends InventoryItem> voidloaded()This method will be invoked whenever data is loaded.protected booleanvoidrowDoubleClicked(T object) Handles the event of a row being double-clicked.protected voidvoidsetFixedFilter(String fixedFilter) Set a fixed filter that will be automatically added to any filter that is set later.Methods inherited from class com.storedobject.ui.ObjectBrowser
actionAllowed, anchorFieldsCreated, anchorsCancelled, anchorsSet, canAdd, cancelRowEdit, canRowEdit, clicked, close, constructObjectEditor, create, create, create, create, create, create, create, createEditor, createExtraButtons, createHeader, doAdd, doDelete, doEdit, doReport, doView, editRow, executeAnchorForm, extraInfoCreated, extraInfoLoaded, filterActions, getEditingItem, getExitAction, getLogic, getObjectEditor, getRowEditor, getSearchBuilder, getViewComponent, isColumnEditable, isReadOnly, isSearchMode, listMoreButtons, load, load, postLedger, resetAnchor, saveEditedRow, savingExtraInfo, selected, setCaption, setExitAction, setLogic, setObjectEditor, setReadOnly, setSplitView, streamEditableFields, validateAnchorValuesMethods inherited from class com.storedobject.ui.ObjectGrid
search, setObjectSetterMethods inherited from class com.storedobject.ui.ObjectListGrid
addObjectChangedListener, configure, createListDataProvider, doDeleteAction, doInsertAction, doUndeleteAction, doUpdateAction, getApplication, getDataProvider, getDelegatedLoader, isValid, load, load, removeObjectChangedListener, setProcessor, setViewFilterMethods inherited from class com.storedobject.ui.DataGrid
append, canAllowAction, doAppendAction, doReloadAction, doReloadAllAction, getActionPrefix, getObjectClass, itemAppended, itemDeleted, itemInserted, itemReloaded, itemUndeleted, itemUpdated, load, selected, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, sort, sort, validateAppend, validateDelete, validateInsert, validateReload, validateUndelete, validateUpdateMethods inherited from class com.storedobject.vaadin.ListGrid
add, add, addAll, addAll, addViewFilter, clear, clearViewFilters, contains, containsAll, get, getData, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, onAttach, onDetach, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, setData, size, subList, toArray, toArrayMethods inherited from class com.storedobject.vaadin.DataGrid
addConstructedListener, appendFooter, clearConstructedListeners, getColumnByKey, getColumns, getSOGrid, isColumnReorderingAllowed, setColumnReorderingAllowed, streamConstructedListenersMethods 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, createSortingComparator, deselect, deselectAll, getAriaLabel, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnByInternalId, 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, updateSelectionModeOnClientMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.storedobject.ui.EditableDataGrid
canPostLedger, canViewLedgerMethods inherited from interface com.storedobject.common.Executable
actMethods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clean, createMenuItem, error, execute, execute, getMenuIconName, getMenuItem, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warningMethods inherited from interface com.storedobject.core.FilterMethods
getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilterMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.storedobject.vaadin.HasColumns
addConstructedListener, addItemSelectedListener, addItemsSelectedListener, appendFooter, appendHeader, clearAlerts, clearConstructedListeners, compact, configure, constructed, createColumn, createColumn, createColumn, createColumn, createColumn, createComponentColumn, createDecoratedWindow, createFooters, 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, getRenderedColumnNames, getSelected, getSOGrid, getTextAlign, getView, ignoreCaseForColumnSorting, includeColumn, isColumnFrozen, isColumnResizable, isColumnSortable, isColumnVisible, prependFooter, prependHeader, refresh, refresh, refresh, removeItemSelectedListener, render, select, select, setColumnFrozen, setColumnResizable, setColumnVisible, setMethodHandlerHost, sort, sort, sortOrder, sortOrder, streamConstructedListeners, unwrapMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods 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, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, reversed, spliteratorMethods inherited from interface com.storedobject.ui.ObjectEditorListener
editingCancelled, editingEnded, editingStartedMethods inherited from interface com.storedobject.ui.ObjectGridData
convert, createSearchBuilder, deselect, deselectAll, doLoad, getEntityFilter, getItem, getLoadFilter, getObjectClass, getObjectCount, getSelectionModel, isAllowAny, populate, populate, populate, resetSearch, scrollTo, search, search, search, select, setLoadFilter, setObject, setObjectConsumer, setObjectConsumer, setObjects, setSelectionMode, validateFilterConditionMethods inherited from interface com.storedobject.core.ObjectLoader
applyFilter, canContain, clear, getAllowAny, getLinkType, getMaster, getObjectClass, getOrderBy, isAllowAny, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, reload, setLinkType, setLinkType, setMaster, setMaster, setOrderBy, setOrderByMethods inherited from interface com.storedobject.ui.ObjectLoader
addDataLoadedListener, applyFilterPredicate, clear, get, getCacheLevel, getDelegatedLoader, getEffectiveCondition, getFixedFilter, getLoadFilter, getObjectCount, indexOf, load, setExtraFilter, setExtraFilter, setFilter, setFilter, setFixedFilter, setFixedFilter, setFixedFilter, size, streamAll, streamFilteredMethods inherited from interface com.storedobject.core.ObjectSetter
accept, setObjectMethods inherited from interface com.storedobject.common.Reentrant
isReentrantMethods inherited from interface com.storedobject.vaadin.util.SupportWindowMode
createWindowMethods inherited from interface com.storedobject.ui.Transactional
commit, execute, getTransactionManager, run, transact, transact, transactControl, transactControl, transactControl, transactControlMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChangedMethods inherited from interface com.storedobject.ui.util.ViewFilterSupport
configure, configure, configureMatch, filterView, getViewFilter
-
Constructor Details
-
AbstractSendAndReceiveMaterial
-
AbstractSendAndReceiveMaterial
public AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, boolean receiveMode, InventoryLocation otherLocation) -
AbstractSendAndReceiveMaterial
-
AbstractSendAndReceiveMaterial
-
AbstractSendAndReceiveMaterial
public AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, InventoryLocation fromOrTo, boolean receiveMode) -
AbstractSendAndReceiveMaterial
-
AbstractSendAndReceiveMaterial
public AbstractSendAndReceiveMaterial(Class<T> transferClass, Class<L> itemClass, InventoryLocation fromOrTo, boolean receiveMode, InventoryLocation otherLocation)
-
-
Method Details
-
getConsignment
-
getItemClass
-
selectLocation
protected void selectLocation() -
getLocationFrom
-
getLocationTo
-
setFixedFilter
Description copied from interface:ObjectLoaderSet a fixed filter that will be automatically added to any filter that is set later.- Parameters:
fixedFilter- Filter condition to set.
-
createHeaders
public void createHeaders()Description copied from interface:HasColumnsCreate extra header rows if required here by invokingHasColumns.prependHeader()orHasColumns.appendHeader()(typically useful for creating column grouping etc.). The default implementation does nothing. This is invoked beforeHasColumns.createHeader(). -
getSwitchLocationButton
-
addExtraButtons
protected void addExtraButtons()Description copied from class:ObjectBrowserConfigures and adds additional buttons to the user interface. This method is intended to be overridden by subclasses to provide specific behavior or additional UI elements. Subclasses can use this method to enhance the default layout with custom buttons based on their requirements. The base implementation does not add any buttons.- Overrides:
addExtraButtonsin classObjectBrowser<T extends InventoryTransfer>
-
canReceive
protected final boolean canReceive() -
canSend
protected final boolean canSend() -
canApprove
protected final boolean canApprove() -
canAmend
protected final boolean canAmend() -
canClose
protected final boolean canClose() -
rowDoubleClicked
Description copied from class:ObjectBrowserHandles the event of a row being double-clicked. The behavior varies depending on the state of the application, such as whether a search dialog is visible and enabled, or whether editing is allowed for the given object.- Overrides:
rowDoubleClickedin classObjectBrowser<T extends InventoryTransfer>- Parameters:
object- The object associated with the double-clicked row.
-
getReceived
-
createObjectEditor
Description copied from class:ObjectBrowserCreates and returns an instance of ObjectEditor for managing the editing of objects of type T. This method can be overridden by subclasses to provide specific editor implementations.- Overrides:
createObjectEditorin classObjectBrowser<T extends InventoryTransfer>- Returns:
- an instance of ObjectEditor for the generic type T, or null if no implementation is provided.
-
canEdit
Description copied from interface:EditableDataGridCheck whether an item can be edited or not. (This control will be applied only for user interaction).- Parameters:
object- Item.- Returns:
- True/false.
-
canDelete
Description copied from interface:EditableDataGridCheck whether an item can be deleted or not. (This control will be applied only for user interaction).- Parameters:
object- Item to delete.- Returns:
- True/false.
-
itemClass
-
requiresInvoiceDate
protected boolean requiresInvoiceDate() -
loaded
public void loaded()Description copied from class:ObjectListGridThis method will be invoked whenever data is loaded.- Overrides:
loadedin classObjectListGrid<T extends InventoryTransfer>
-
canSearch
public boolean canSearch()
-