Class Table
java.lang.Object
org.patternfly.component.BaseComponent<elemental2.dom.HTMLTableElement, Table>
org.patternfly.component.table.Table
- All Implemented Interfaces:
Iterable<Tbody>, Attachable, ElementAttributeMethods<elemental2.dom.HTMLTableElement, Table>, ElementClassListMethods<elemental2.dom.HTMLTableElement, Table>, ElementConsumerMethods<elemental2.dom.HTMLTableElement, Table>, ElementContainerMethods<elemental2.dom.HTMLTableElement, Table>, ElementEventMethods<elemental2.dom.HTMLTableElement, Table>, ElementIdMethods<elemental2.dom.HTMLTableElement, Table>, ElementQueryMethods<elemental2.dom.HTMLTableElement>, HTMLElementAttributeMethods<elemental2.dom.HTMLTableElement, Table>, HTMLElementDataMethods<elemental2.dom.HTMLTableElement, Table>, HTMLElementStyleMethods<elemental2.dom.HTMLTableElement, Table>, HTMLElementVisibilityMethods<elemental2.dom.HTMLTableElement, Table>, IsElement<elemental2.dom.HTMLTableElement>, TypedBuilder<elemental2.dom.HTMLTableElement, Table>, Component, HasItems<elemental2.dom.HTMLTableElement, Table, Tbody>, OuiaSupport<elemental2.dom.HTMLTableElement, Table>, Modifiers.Compact<elemental2.dom.HTMLTableElement, Table>, Modifiers.Plain<elemental2.dom.HTMLTableElement, Table>
public class Table
extends BaseComponent<elemental2.dom.HTMLTableElement, Table>
implements Attachable, Modifiers.Compact<elemental2.dom.HTMLTableElement, Table>, HasItems<elemental2.dom.HTMLTableElement, Table, Tbody>, Modifiers.Plain<elemental2.dom.HTMLTableElement, Table>
A table is used to display large data sets that can be easily laid out in a simple grid with column headers.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds an item to the component.addCaption(TableCaption caption) voidattach(elemental2.dom.MutationRecord mutationRecord) voidclear()Clears all items from the component.booleanChecks whether the component contains an item associated with the given identifier.gridBreakpoint(GridBreakpoint breakpoint) booleanisEmpty()Checks whether the collection of items in the component is empty.Retrieves the item associated with the specified identifier from the component.iterator()Same as borders(true)noBorders(boolean borders) Adds/removes modifier(noBorderRows)onAdd(AddItemHandler<Table, Tbody> onAdd) Registers a callback to be invoked whenever a new item is added to the component.onMultiSelect(MultiSelectHandler<Table, Tr> selectHandler) onRemove(RemoveItemHandler<Table, Tbody> onRemove) Registers a callback to be invoked whenever an item is removed from the component.onSingleSelect(SelectHandler<Tr> selectHandler) onUpdate(UpdateItemHandler<Table, Tbody> onUpdate) Registers a callback to be invoked whenever an item is updated in the component.voidremoveItem(String identifier) Removes an item from the component based on the provided identifier.voidreset()voidvoidvoidvoidvoidvoidvoidvoidselectAll(boolean fireEvent) selectionMode(SelectionMode selectionMode) Sets the selection mode for the table.voidvoidselectNone(boolean fireEvent) intsize()Retrieves the total number of items currently contained in the component.Same as stickyHeader(true)stickyHeader(boolean stickyHeader) Adds/removes modifier(stickyHeader)static Tabletable()static Tabletbody()that()thead()treeViewGridBreakpoint(TreeViewGridBreakpoint breakpoint) voidupdateItem(Tbody item) Updates an existing item in the component.Methods inherited from class BaseComponent
componentType, element, ouiaComponentType, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Attachable
detachMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface HasItems
addItem, addItems, items, replaceItemElement, updateItem, updateItemMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Modifiers.Compact
compact, compactMethods inherited from interface Modifiers.Plain
plain, plainMethods inherited from interface OuiaSupport
initOuia, ouiaId, ouiaSafe, ouiaTransition
-
Method Details
-
table
-
table
-
attach
public void attach(elemental2.dom.MutationRecord mutationRecord) - Specified by:
attachin interfaceAttachable
-
addCaption
-
addHead
-
addBody
-
add
Description copied from interface:HasItemsAdds an item to the component. -
stickyHeader
Same as stickyHeader(true) -
stickyHeader
Adds/removes modifier(stickyHeader) -
noBorders
Same as borders(true) -
noBorders
Adds/removes modifier(noBorderRows) -
gridBreakpoint
-
selectionMode
Sets the selection mode for the table. If not set, the table does not support selection.- Parameters:
selectionMode- theSelectionModethat specifies how rows are selected in the table. Supported modes include:single- Only a single item can be selected at any time.multi- Multiple items can be selected simultaneously.
- Returns:
- the current
Tableinstance to allow for method chaining.
-
treeViewGridBreakpoint
-
that
- Specified by:
thatin interfaceTypedBuilder<elemental2.dom.HTMLTableElement, Table>
-
ariaLabel
-
onAdd
Description copied from interface:HasItemsRegisters a callback to be invoked whenever a new item is added to the component.- Specified by:
onAddin interfaceHasItems<elemental2.dom.HTMLTableElement, Table, Tbody>- Parameters:
onAdd- aAddItemHandlerthat takes the builder instance and the item being added as arguments- Returns:
- the builder instance after adding the callback
-
onUpdate
Description copied from interface:HasItemsRegisters a callback to be invoked whenever an item is updated in the component.- Specified by:
onUpdatein interfaceHasItems<elemental2.dom.HTMLTableElement, Table, Tbody>- Parameters:
onUpdate- aUpdateItemHandlerthat takes the component, the previous state of the item, and the updated state of the item as arguments- Returns:
- the builder instance after adding the callback
-
onRemove
Description copied from interface:HasItemsRegisters a callback to be invoked whenever an item is removed from the component.- Specified by:
onRemovein interfaceHasItems<elemental2.dom.HTMLTableElement, Table, Tbody>- Parameters:
onRemove- aRemoveItemHandlerthat takes the component and the item being removed as arguments- Returns:
- the builder instance after adding the callback
-
onSingleSelect
-
onMultiSelect
-
iterator
-
size
-
isEmpty
-
contains
Description copied from interface:HasItemsChecks whether the component contains an item associated with the given identifier. -
item
Description copied from interface:HasItemsRetrieves the item associated with the specified identifier from the component. -
updateItem
-
removeItem
Description copied from interface:HasItemsRemoves an item from the component based on the provided identifier.- Specified by:
removeItemin interfaceHasItems<elemental2.dom.HTMLTableElement, Table, Tbody>- Parameters:
identifier- the identifier of the item to be removed
-
clear
public void clear()Description copied from interface:HasItemsClears all items from the component. This method removes any existing items within the component, leaving it empty. Any associated or registered callbacks related to the removal of items may be invoked as part of this operation. -
reset
public void reset() -
select
-
select
-
select
-
select
-
select
-
select
-
selectAll
public void selectAll() -
selectAll
public void selectAll(boolean fireEvent) -
selectNone
public void selectNone() -
selectNone
public void selectNone(boolean fireEvent) -
selectedItems
-
thead
-
tbody
-