ADAPTER - is the generic type of AbstractUiWidgetNative.getWidgetAdapter().ROW - is the generic type of a row in the value list.ITEM_CONTAINER - is the generic type of the ItemContainer.public abstract class AbstractUiWidgetAbstractListTable<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>> extends AbstractUiWidgetAbstractDataTable<ADAPTER,List<ROW>,ROW,ITEM_CONTAINER> implements UiWidgetAbstractListTable<ROW>
UiWidgetAbstractListTable.AbstractUiWidgetNative.SizeImplAbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer| Modifier and Type | Field and Description |
|---|---|
private ColumnContainerComparator<ROW> |
comparator
The
ColumnContainerComparator for this table. |
private Map<HashKey<ROW>,ITEM_CONTAINER> |
rowMap |
private List<ITEM_CONTAINER> |
rows |
STYLE_DATA_TABLEPROPERTY_SUMMARYPROPERTY_TITLESTYLE_HEADERHTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_IDPROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLEWAI_ARIAACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY| Constructor and Description |
|---|
AbstractUiWidgetAbstractListTable(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(ROW row)
Adds the given row at the end of this list table.
|
void |
addRow(ROW row,
int index)
Adds the given row to this list table.
|
protected void |
doSetSelected(ITEM_CONTAINER container,
boolean selected)
Internal method to set the selection of the item in the given
container. |
List<ITEM_CONTAINER> |
getAllAvailableItems()
Internal method to get the
Collection with all items (currently) available in this widget. |
protected ITEM_CONTAINER |
getItemContainer(ROW item)
Gets the existing container for the given
item. |
protected ITEM_CONTAINER |
getLastAvailableItem() |
int |
getRowIndex(ROW row)
Gets the index of the given
row. |
protected Class<List<ROW>> |
getValueClass() |
protected void |
initializeWidgetAdapter(ADAPTER adapter)
This method is called from
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter. |
boolean |
removeRow(ROW row)
This method removes the given
row. |
private ITEM_CONTAINER |
removeRowFromMap(ROW row)
Removes the given row from the internal
Map. |
boolean |
replaceRow(ROW oldRow,
ROW newRow)
This method replaces a <ROW> in this list table.
|
(package private) void |
sort(AbstractUiWidgetTableColumn<?,ROW,?> column,
SortOrder sortOrder)
This method sorts this list according to the given
column. |
createColumn, createColumn, createRowContainer, createRowContainer, createSelectionColumn, createTableColumnAdapter, dragColumn, getColumn, getColumnById, getColumnCount, getItem, getRowNumberColumn, getSelectionColumn, getSortColumn, hasRowNumberColumn, setColumns, setDragOverColumnaddSelectionHandler, asFeatureSelectedValue, clearSelection, doGetSelected, getFirstAvailableItem, getSelectedValue, getSelectedValues, getSelectedValuesInternal, getSelectionCount, getSelectionMode, getSummary, getTitle, hasSelectedValue, isEditable, isSelected, isTitleVisible, onItemSelection, removeSelectionHandler, setEditable, setSelectedValue, setSelectedValues, setSelectedValues, setSelection, setSelection, setSelectionMode, setSummary, setTitle, setTitleVisibleaddFocusHandler, getAccessKey, isFocused, onAccessKeyPressed, removeFocusHandler, setAccessKey, setFocused, setFocusedaddChangeHandler, addStyle, clearMessages, clearValidity, createSize, createUniqueId, createWidgetAdapter, dispose, doGetValue, doSetMode, doSetValue, doValidate, getAriaRole, getAriaRoleFixedType, getChild, getChild, getChildCount, getChildIndex, getId, getIndexOfStyle, getMode, getModeFixed, getParent, getPrimaryStyle, getSize, getStyles, getTooltip, getVisibleFlag, getWidgetAdapter, getWidgetAdapter, hasStyle, hasWidgetAdapter, isDisposed, isEnabled, isModifiedRecursive, isVisible, isVisibleRecursive, removeChangeHandler, removeFromParent, removeStyle, setAriaRole, setEnabled, setId, setIdPrefix, setMode, setMode, setModeFixed, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, setVisible, toString, visibilityChangedaddEventHandler, addValidator, clearMessagesLocal, clearValidationFailure, convertValueToString, fireEvent, fireValueChange, getBasicUtil, getContext, getDataBinding, getDataBinding, getDataBindingForWidget, getEventSender, getFactory, getLogger, getObserverSource, getOriginalValue, getRecentValue, getSource, getValueDirect, getValueOrException, getWidgetAdapter, hasEventSender, isMandatory, isModified, removeEventHandler, removeFromParent, removeValidator, setMandatory, setModified, setParent, setValueaddValidatorMandatory, createValidationFailure, getValue, getValueAndValidate, handleGetValueError, resetValue, setValue, setValueForUser, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateColumn, createColumn, getColumn, getColumnById, getColumnCount, getRowNumberColumn, getSelectionColumn, setColumnsgetTitle, setTitleaddSelectionHandler, isSelected, removeSelectionHandler, setSelectionsetSelectedValue, setSelectedValuesgetSelectedValue, getSelectedValues, getSelectionCount, hasSelectedValuesetSelectionModegetSelectionModesetSummarygetSummarysetTitleVisibleisTitleVisiblesetEditableisEditableasFeatureSelectedValuegetValuegetValueAndValidate, getValueDirectaddChangeHandler, removeChangeHandlerresetValue, setValue, setValue, setValueForUsergetOriginalValue, getValueOrExceptionaddValidatorMandatory, isMandatoryaddValidator, removeValidatorvalidategetContext, getParent, getSizeclearMessagesaddEventHandler, removeEventHandlersetModegetModesetModeFixedgetModeFixedsetIdgetIdsetTooltipgetTooltipgetVisibleFlag, isVisible, setVisible, setVisibleisVisibleRecursivesetEnabledisEnabledaddStyle, removeStylehasStylesetStylesgetStylessetPrimaryStylegetPrimaryStyledisposeisDisposedisModifiedgetAriaRoleprivate final List<ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>> rows
getAllAvailableItems()private final Map<HashKey<ROW>,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>> rowMap
getItemContainer(Object)private final ColumnContainerComparator<ROW> comparator
ColumnContainerComparator for this table.public AbstractUiWidgetAbstractListTable(UiContext context, ADAPTER widgetAdapter)
context - is the context.widgetAdapter - is the widget adapter. Typically null for
lazy initialization.protected Class<List<ROW>> getValueClass()
getValueClass in class AbstractUiWidget<List<ROW>>Class reflecting <VALUE>. May also be null for Void.public List<ITEM_CONTAINER> getAllAvailableItems()
Collection with all items (currently) available in this widget. In
case of lazy loading only those that have already been loaded. Collection must NOT be modified if retrieved via this method. Implementations will provide
separate addItem and removeItem methods.getAllAvailableItems in class AbstractUiWidgetAbstractDataSet<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,List<ROW>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>Collection with all items (currently) available in this widget. In case of lazy
loading only those that have already been loaded.protected ITEM_CONTAINER getLastAvailableItem()
getLastAvailableItem in class AbstractUiWidgetAbstractDataSet<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,List<ROW>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>last of the available items.protected ITEM_CONTAINER getItemContainer(ROW item)
item. This method has to be very efficient. You
should use a Map for this purpose.getItemContainer in class AbstractUiWidgetAbstractDataSet<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,List<ROW>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>item - is the item to lookup.item or null if no such container exists.protected void doSetSelected(ITEM_CONTAINER container, boolean selected)
container. Shall not do
anything else (e.g. firing event).doSetSelected in class AbstractUiWidgetAbstractDataSet<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,List<ROW>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>container - is the container with the item to mark.selected - - true to select, false to deselect.public void addRow(ROW row)
addRow in interface UiWidgetAbstractListTable<ROW>row - is the <ROW> to add.UiWidgetAbstractListTable.addRow(Object, int)public void addRow(ROW row, int index)
UiWidgetAbstractListTable.getRowIndex(Object).addRow in interface UiWidgetAbstractListTable<ROW>row - is the <ROW> to add.index - is the index where to add the given row.public boolean removeRow(ROW row)
row.removeRow in interface UiWidgetAbstractListTable<ROW>row - is the <ROW> to remove.true if the row was found and removed, false otherwise (if
this list table does not contain oldRow and nothing was changed).private ITEM_CONTAINER removeRowFromMap(ROW row)
Map.row - is the <ROW> to remove or replace.ItemContainer for the given row that has been removed or
null if none was found.public int getRowIndex(ROW row)
row. UiWidgetAbstractListTable.addRow(Object, int) to insert a row before
or after a given row such as the selected row. Please avoid storing such
index and use it later as this can cause fatal bugs.getRowIndex in interface UiWidgetAbstractListTable<ROW>row - is the <ROW> to locate.-1 if not found.List.indexOf(Object)public boolean replaceRow(ROW oldRow, ROW newRow)
replaceRow in interface UiWidgetAbstractListTable<ROW>oldRow - is the old <ROW> to replace.newRow - is the new <ROW> to insert in place of the old one.true if oldRow was found and replaced, false otherwise (if
this list table does not contain oldRow and nothing was changed).protected void initializeWidgetAdapter(ADAPTER adapter)
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter. All
attributes of this widget need to be set in the UiWidgetAdapter.initializeWidgetAdapter in class AbstractUiWidgetAbstractDataTable<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,List<ROW>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>adapter - is the UiWidgetAdapter to initialize.void sort(AbstractUiWidgetTableColumn<?,ROW,?> column, SortOrder sortOrder)
column.sort in class AbstractUiWidgetAbstractDataTable<ADAPTER extends UiWidgetAdapterAbstractListTable<ROW,ITEM_CONTAINER>,List<ROW>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>column - is the AbstractUiWidgetTableColumn to sort by.sortOrder - is the SortOrder.Copyright © 2001–2016 mmm-Team. All rights reserved.